Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing in Anaconda #112

Open
hmedal opened this issue Mar 26, 2019 · 6 comments
Open

Installing in Anaconda #112

hmedal opened this issue Mar 26, 2019 · 6 comments

Comments

@hmedal
Copy link

hmedal commented Mar 26, 2019

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.

@outboundbird
Copy link

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

@hmedal
Copy link
Author

hmedal commented Apr 8, 2019

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)```

@icouckuy
Copy link
Contributor

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

@Raychiu123
Copy link

Raychiu123 commented Jun 18, 2019

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.

@abyvinod
Copy link

abyvinod commented Apr 18, 2020

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

@pallavimitra
Copy link

pallavimitra commented Sep 24, 2020

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants