Probability: Failed building wheel (Conda Install)

Created on 1 May 2018  路  4Comments  路  Source: tensorflow/probability

I'm having trouble installing tfp using pip from Anaconda - perhaps this isn't supported? I ran the command pip install --user --upgrade tfp-nightly-gpu and got the following errors

Building wheels for collected packages: tfp-nightly, tfp-nightly
  Running setup.py bdist_wheel for tfp-nightly ... done
  Stored in directory: ~/.cache/pip/wheels/71/3e/99/77aebe0e3796cf1322deb90448b4a5c2e30a35d4813eb831f5
  Running setup.py bdist_wheel for tfp-nightly ... error
  Complete output from command ~/anaconda/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-os72hn3m/tfp-nightly/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-uar327sb --python-tag cp36:
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "~/anaconda/lib/python3.6/tokenize.py", line 452, in open
      buffer = _builtin_open(filename, 'rb')
  FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-install-os72hn3m/tfp-nightly/setup.py'
  ----------------------------------------
  Failed building wheel for tfp-nightly

Cleaning the build then also fails, and finally I get

Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: '~/anaconda/lib/python3.6/site-packages/tfp_nightly-0.0.1.dev20180430.dist-info/METADATA'

(In all of the commands I've replaced my home directory with ~)

A little more information:

$ conda --version
conda 4.4.10
$ pip --version
pip 10.0.1 from ~/anaconda/lib/python3.6/site-packages/pip (python 3.6)

This machine is running Ubuntu 16.04.

Most helpful comment

Having the same issue.

My intuition is that, the error is caused by using a virtual environment within Anaconda.

The building wheel tries to look for setup.py in the system/user tmp path, which doesn't apply to a conda environment.

Adding "--no-cache-dir" to "pip install" seems to resolve the issue.

All 4 comments

@davmre @jvdillon

Hey Dave / Josh,
Do you know if this supported?

Having the same issue.

My intuition is that, the error is caused by using a virtual environment within Anaconda.

The building wheel tries to look for setup.py in the system/user tmp path, which doesn't apply to a conda environment.

Adding "--no-cache-dir" to "pip install" seems to resolve the issue.

I can confirm that @Srceh's solution works for me as well; I don't know if there's a way to detect that the user is using Anaconda and change this automatically, but as this solution is easy (and should be easy enough to find by somebody searching for the error message), I'll close this.

Having the same issue.

My intuition is that, the error is caused by using a virtual environment within Anaconda.

The building wheel tries to look for setup.py in the system/user tmp path, which doesn't apply to a conda environment.

Adding "--no-cache-dir" to "pip install" seems to resolve the issue.

Thanks a lot bro. Worked for me.

Was this page helpful?
0 / 5 - 0 ratings