diff --git a/.travis/install-dependencies.sh b/.travis/install-dependencies.sh index ed447f72d..d13cfe43d 100755 --- a/.travis/install-dependencies.sh +++ b/.travis/install-dependencies.sh @@ -24,7 +24,7 @@ if [[ "$PYTHON" == "2.7" ]] && [[ "$platform" == "linux" ]]; then wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh -nv bash miniconda.sh -b -p $HOME/miniconda export PATH="$HOME/miniconda/bin:$PATH" - pip install -q numpy cython cmake funcsigs click colorama psutil redis tensorflow gym==0.9.5 flatbuffers opencv-python pyyaml pandas requests + pip install -q cython cmake tensorflow gym opencv-python pyyaml pandas requests elif [[ "$PYTHON" == "3.5" ]] && [[ "$platform" == "linux" ]]; then sudo apt-get update sudo apt-get install -y cmake pkg-config python-dev python-numpy build-essential autoconf curl libtool unzip @@ -32,7 +32,7 @@ elif [[ "$PYTHON" == "3.5" ]] && [[ "$platform" == "linux" ]]; then wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh -nv bash miniconda.sh -b -p $HOME/miniconda export PATH="$HOME/miniconda/bin:$PATH" - pip install -q numpy cython cmake funcsigs click colorama psutil redis tensorflow gym flatbuffers opencv-python pyyaml pandas requests + pip install -q cython cmake tensorflow gym opencv-python pyyaml pandas requests elif [[ "$PYTHON" == "2.7" ]] && [[ "$platform" == "macosx" ]]; then # check that brew is installed which -s brew @@ -48,7 +48,7 @@ elif [[ "$PYTHON" == "2.7" ]] && [[ "$platform" == "macosx" ]]; then wget https://repo.continuum.io/miniconda/Miniconda2-latest-MacOSX-x86_64.sh -O miniconda.sh -nv bash miniconda.sh -b -p $HOME/miniconda export PATH="$HOME/miniconda/bin:$PATH" - pip install -q numpy cython cmake funcsigs click colorama psutil redis tensorflow gym==0.9.5 flatbuffers opencv-python pyyaml pandas requests + pip install -q cython cmake tensorflow gym opencv-python pyyaml pandas requests elif [[ "$PYTHON" == "3.5" ]] && [[ "$platform" == "macosx" ]]; then # check that brew is installed which -s brew @@ -64,7 +64,7 @@ elif [[ "$PYTHON" == "3.5" ]] && [[ "$platform" == "macosx" ]]; then wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh -nv bash miniconda.sh -b -p $HOME/miniconda export PATH="$HOME/miniconda/bin:$PATH" - pip install -q numpy cython cmake funcsigs click colorama psutil redis tensorflow gym flatbuffers opencv-python pyyaml pandas requests + pip install -q cython cmake tensorflow gym opencv-python pyyaml pandas requests elif [[ "$LINT" == "1" ]]; then sudo apt-get update sudo apt-get install -y cmake build-essential autoconf curl libtool unzip diff --git a/doc/source/development.rst b/doc/source/development.rst index 73c51ba7a..96e100b38 100644 --- a/doc/source/development.rst +++ b/doc/source/development.rst @@ -9,25 +9,23 @@ helpful. .. code-block:: shell cd ray/python - python setup.py develop + pip install -e . --verbose - (as opposed to ``python setup.py install``). When you do the "install" - version, files will be copied from the Ray directory to a directory of Python - packages (often something like + The ``-e`` means "editable", so changes you make to files in the Ray + directory will take effect without reinstalling the package. In contrast, if + you do ``python setup.py install``, files will be copied from the Ray + directory to a directory of Python packages (often something like ``/home/ubuntu/anaconda3/lib/python3.6/site-packages/ray``). This means that changes you make to files in the Ray directory will not have any effect. - However, when you run the "develop" version, no files will be copied and so - any changes you make to Python files will immediately take effect without - rerunning ``setup.py``. - If you run into **Permission Denied** errors when running ``setup.py``, you - can try doing ``python setup.py develop --user``. You may also need to run - something like ``sudo chown -R $USER /home/ubuntu/anaconda3`` (substituting - in the appropriate path). + If you run into **Permission Denied** errors when running ``pip install``, + you can try adding ``--user``. You may also need to run something like ``sudo + chown -R $USER /home/ubuntu/anaconda3`` (substituting in the appropriate + path). If you make changes to the C++ files, you will need to recompile them. - However, you do not need to rerun ``setup.py``. Instead, you can recompile - much more quickly by doing + However, you do not need to rerun ``pip install -e .``. Instead, you can + recompile much more quickly by doing .. code-block:: shell diff --git a/doc/source/example-cython.rst b/doc/source/example-cython.rst index 325a15941..5c34d2b7c 100644 --- a/doc/source/example-cython.rst +++ b/doc/source/example-cython.rst @@ -4,12 +4,13 @@ Cython Getting Started --------------- -This document provides examples of using Cython-generated code in ``ray``. To get started, run the following from directory ``$RAY_HOME/examples/cython``: +This document provides examples of using Cython-generated code in ``ray``. To +get started, run the following from directory ``$RAY_HOME/examples/cython``: .. code-block:: bash pip install scipy # For BLAS example - python setup.py develop + pip install -e . python cython_main.py --help You can import the ``cython_examples`` module from a Python script or interpreter. diff --git a/doc/source/install-on-macosx.rst b/doc/source/install-on-macosx.rst index 4934e31a4..e1861f2f8 100644 --- a/doc/source/install-on-macosx.rst +++ b/doc/source/install-on-macosx.rst @@ -28,7 +28,7 @@ To build Ray, first install the following dependencies. We recommend using brew update brew install cmake pkg-config automake autoconf libtool boost openssl bison wget - pip install numpy funcsigs click colorama psutil redis flatbuffers cython --ignore-installed six + pip install cython If you are using Anaconda, you may also need to run the following. @@ -46,7 +46,7 @@ Ray can be built from the repository as follows. git clone https://github.com/ray-project/ray.git cd ray/python - python setup.py install # Add --user if you see a permission denied error. + pip install -e . --verbose # Add --user if you see a permission denied error. Alternatively, Ray can be built from the repository without cloning using pip. diff --git a/doc/source/install-on-ubuntu.rst b/doc/source/install-on-ubuntu.rst index 800de2a87..218434cdf 100644 --- a/doc/source/install-on-ubuntu.rst +++ b/doc/source/install-on-ubuntu.rst @@ -35,7 +35,7 @@ To build Ray, first install the following dependencies. We recommend using # If you are on Ubuntu 14.04, you need the following. pip install cmake - pip install numpy funcsigs click colorama psutil redis flatbuffers cython + pip install cython If you are using Anaconda, you may also need to run the following. @@ -54,7 +54,7 @@ Ray can be built from the repository as follows. git clone https://github.com/ray-project/ray.git cd ray/python - python setup.py install # Add --user if you see a permission denied error. + pip install -e . --verbose # Add --user if you see a permission denied error. Alternatively, Ray can be built from the repository without cloning using pip. diff --git a/doc/source/using-ray-on-a-large-cluster.rst b/doc/source/using-ray-on-a-large-cluster.rst index 56e2e02b1..1b6127ab0 100644 --- a/doc/source/using-ray-on-a-large-cluster.rst +++ b/doc/source/using-ray-on-a-large-cluster.rst @@ -235,11 +235,10 @@ necessary to upgrade Ray. It should look something like the following: pushd . # Upgrade Ray. cd ray - git remote set-url origin https://github.com/ray-project/ray git checkout master git pull cd python - python setup.py install --user + pip install -e . --verbose popd This script executes a series of git commands to update the Ray source code, then builds diff --git a/docker/deploy/Dockerfile b/docker/deploy/Dockerfile index f3d797dee..6506524b5 100644 --- a/docker/deploy/Dockerfile +++ b/docker/deploy/Dockerfile @@ -5,5 +5,5 @@ FROM ray-project/base-deps ADD ray.tar /ray ADD git-rev /ray/git-rev WORKDIR /ray/python -RUN python setup.py install +RUN pip install -e . WORKDIR /ray diff --git a/python/ray/autoscaler/aws/development-example.yaml b/python/ray/autoscaler/aws/development-example.yaml index c3ba22d07..c0fec89e3 100644 --- a/python/ray/autoscaler/aws/development-example.yaml +++ b/python/ray/autoscaler/aws/development-example.yaml @@ -90,7 +90,7 @@ setup_commands: # Build Ray. - git clone https://github.com/ray-project/ray || true - pip install boto3==1.4.8 - - cd ray/python; python setup.py develop + - cd ray/python; pip install -e . --verbose # Custom commands that will be run on the head node after common setup. head_setup_commands: []