Skip to content

Installing in Anaconda #112

Open
Open

Description

@hmedal

Hello,

I am trying to install GPFlowOpt in Anaconda. Here is the error I am getting:

(base) CEEITs-MacBook-Pro:GPflowOpt hmedal$ conda activate gpflowopt
(gpflowopt) CEEITs-MacBook-Pro:GPflowOpt hmedal$ pip install git+git://github.com/GPflow/GPflowOpt.git
Collecting git+git://github.com/GPflow/GPflowOpt.git
Cloning git://github.com/GPflow/GPflowOpt.git to /private/var/folders/fj/nbbxj0td0lbdvgq33y96w3mm0000gp/T/pip-req-build-57jmjtlx
Collecting numpy>=1.9 (from gpflowopt==0.1.1)
Using cached https://files.pythonhosted.org/packages/a6/6f/cb20ccd8f0f8581e0e090775c0e3c3e335b037818416e6fa945d924397d2/numpy-1.16.2-cp37-cp37m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Collecting scipy>=0.16 (from gpflowopt==0.1.1)
Using cached https://files.pythonhosted.org/packages/dd/6c/ccf7403d14f0ab0f20ce611696921f204f4ffce99a4fd383c892a6a7e9eb/scipy-1.2.1-cp37-cp37m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Collecting GPflow==0.5.0 (from gpflowopt==0.1.1)
Could not find a version that satisfies the requirement GPflow==0.5.0 (from gpflowopt==0.1.1) (from versions: 1.0.0, 1.1.0, 1.1.1, 1.2.0, 1.3.0)
No matching distribution found for GPflow==0.5.0 (from gpflowopt==0.1.1)

Any guidance you can provide is appreciated.

Activity

  1. outboundbird commented on Apr 8, 2019

    @outboundbird

    Try pip install git+https://github.com/GPflow/GPflowOpt.git --process-dependency-links to get the dependency

  2. hmedal commented on Apr 8, 2019

    @hmedal
    Author

    Thank you! Unfortunately, it looks like pip no longer supports --process-dependency-links (pypa/pip#6162).

    $ pip install git+https://github.com/GPflow/GPflowOpt.git --process-dependency-links
    
    Usage:   
      pip install [options] <requirement specifier> [package-index-options] ...
      pip install [options] -r <requirements file> [package-index-options] ...
      pip install [options] [-e] <vcs project url> ...
      pip install [options] [-e] <local project path> ...
      pip install [options] <archive url/path> ...
    
    no such option: --process-dependency-links
    

    I am using pip version 19.0.3.

    pip 19.0.3 from /anaconda2/envs/gpflowopt/lib/python3.7/site-packages/pip (python 3.7)```
    
  3. icouckuy commented on Apr 17, 2019

    @icouckuy
    Contributor

    You can install GPFlow 0.5.0 directly from git:
    https://github.com/GPflow/GPflow/tree/0.5.0

  4. Raychiu123 commented on Jun 18, 2019

    @Raychiu123

    I have faced the same problem.
    Because pip doesn't support --process-dependency-links at all, I use pip install pip==18.1 to reinstall pip to previous version and it works.

  5. abyvinod commented on Apr 18, 2020

    @abyvinod

    The following instructions worked for me. The instructions assumes that the current directory has both GPflow and GPflowOpt folders (clone them from github if needed).

    conda create -n GPflowOpt python=3.5 numpy scipy jupyter matplotlib pip=10
    conda activate GPflowOpt
    pip install https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.2.1-cp35-cp35m-linux_x86_64.whl
    cd GPflow
    git checkout tags/0.5.0 -b 0.5.0            # GPFlowOpt requires GPflow=0.5.0
    python setup.py install
    cd ../GPflowOpt/
    pip install -e . --process-dependency-links

    These instructions follow from:

    1. https://github.com/GPflow/GPflow/blob/ce5ad7ea75687fb0bf178b25f62855fc861eb10f/.travis.yml#L20
    2. Older version of pip required for process-dependency-links. pip==18.1 did not work for me.

    These instructions allowed me to run the examples

  6. pallavimitra commented on Sep 24, 2020

    @pallavimitra

    Faced the same issue. I have Python of version 3.8.3.
    For gpflow a version='>=3.6,<3.7.0a0' is required.
    Therefore, my solution was as follows:

    1. install a venv with the given python version.

    2. install GPFlow 0.5.0 directly from git: https://github.com/GPflow/GPflow/tree/0.5.0
      check the version before cloning (better to download the 0.5.0 version and use pip install .)

    3. Check the insatllation and version. Can face an error like "GPflow-0.5.0\gpflow\session.py", line 8, in AttributeError: module 'tensorflow' has no attribute 'Session'"
      Solution: in TF 2.0 you should use tf.compat.v1.Session() instead of tf.Session()

    4. Then install gpflowopt using "pip install git+git://github.com/GPflow/GPflowOpt.git"

    5. Check the insatllation and version. anaconda3\envs\OPT\lib\site-packages\gpflow\session.py", line 8, in
      class TracerSession(tf.Session)
      Solution: in TF 2.0 you should use tf.compat.v1.Session() instead of tf.Session()

    6. Now it is installed properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions