Probabilistic-Programming-and-Bayesian-Methods-for-Hackers icon indicating copy to clipboard operation
Probabilistic-Programming-and-Bayesian-Methods-for-Hackers copied to clipboard

fail to install requirements

Open OmriTreidel opened this issue 6 years ago • 4 comments

I created a new virtual environment and tried to install the requirement via pip install -r requirements.txt On ububtu 16.04 and python 2.7.12.

the error:

Collecting ipython>=2.0 (from -r requirements.txt (line 1)) Using cached ipython-5.5.0-py2-none-any.whl Collecting matplotlib>=1.2.1 (from -r requirements.txt (line 2)) Downloading matplotlib-2.1.2-cp27-cp27mu-manylinux1_x86_64.whl (15.0MB) 100% |████████████████████████████████| 15.0MB 90kB/s Collecting numpy>=1.7.1 (from -r requirements.txt (line 3)) Downloading numpy-1.14.0-cp27-cp27mu-manylinux1_x86_64.whl (16.9MB) 100% |████████████████████████████████| 16.9MB 81kB/s Collecting pymc==2.3.4 (from -r requirements.txt (line 4)) Downloading pymc-2.3.4.tar.gz (13.1MB) 100% |████████████████████████████████| 13.1MB 95kB/s Complete output from command python setup.py egg_info: Traceback (most recent call last): File "", line 1, in File "/tmp/pip-build-d1jvAH/pymc/setup.py", line 8, in from numpy.distutils.misc_util import Configuration ImportError: No module named numpy.distutils.misc_util

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-d1jvAH/pymc/

OmriTreidel avatar Feb 17 '18 00:02 OmriTreidel

For me, same command worked in Ubuntu 14.04 and python 3.6. Although it said: Ignoring wsgiref: markers 'python_version < "3.0"' don't match your environment I'm not sure if I am going to run into some problems later.

rraadd88 avatar Feb 18 '18 10:02 rraadd88

UPDATE: did ran into problems. The jupyter notebooks are written in python 2.7. (Should have been mentioned clearly in the README). I have now made a conda environment file to install whatever is required for the book. Here's a link. The environment file (yml) can be installed by this command: conda env create -f baye.yml

rraadd88 avatar Feb 18 '18 10:02 rraadd88

I see the same problem. It seems that pymc expects numpy to be completely installed before its setup.py is run.

See a related issue and background at statsmodels: 0.8.0rc1 implicitly requires numpy to be pre-installed · Issue #3207 · statsmodels/statsmodels

nealmcb avatar Jan 31 '19 20:01 nealmcb

Thankfully, pymc3 installs with requirements.txt seem to work, as seen in #441

nealmcb avatar Feb 01 '19 04:02 nealmcb