CamDavidsonPilon / Probabilistic-Programming-and-Bayesian-Methods-for-Hackers

aka "Bayesian Methods for Hackers": An introduction to Bayesian methods + probabilistic programming with a computation/understanding-first, mathematics-second point of view. All in pure Python ;)
http://camdavidsonpilon.github.io/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers/
MIT License
26.55k stars 7.85k forks source link

fail to install requirements #377

Open OmriTreidel opened 6 years ago

OmriTreidel commented 6 years ago

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/

rraadd88 commented 6 years ago

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 commented 6 years ago

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

nealmcb commented 5 years ago

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 commented 5 years ago

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