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

ImportError: Numerical Python (NumPy) is not installed. #24

Open
andrecp opened this issue Nov 6, 2015 · 5 comments
Open

ImportError: Numerical Python (NumPy) is not installed. #24

andrecp opened this issue Nov 6, 2015 · 5 comments

Comments

@andrecp
Copy link

andrecp commented Nov 6, 2015

Hello, I a trying to use the buildpack in my heroku project.

My requirements.txt has

numpy==1.8.1
scipy==0.14.0
scikit-learn==0.17b1

I am using python-2.7.10

I've done

heroku buildpacks:set https://github.com/thenovices/heroku-buildpack-scipy

I get

ImportError: Numerical Python (NumPy) is not installed.

I got some error in the process like

-----> Downloading BLAS/LAPACK/ATLAS/Fortran binaries.
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
Traceback (most recent call last):
  File "/tmp/buildpack20151106-157-n5ixfp/vendor/pip-pop/pip-grep", line 81, in <module>
    main()
  File "/tmp/buildpack20151106-157-n5ixfp/vendor/pip-pop/pip-grep", line 77, in main
    grep(**kwargs)
  File "/tmp/buildpack20151106-157-n5ixfp/vendor/pip-pop/pip-grep", line 45, in grep
    r = Requirements(reqfile)
  File "/tmp/buildpack20151106-157-n5ixfp/vendor/pip-pop/pip-grep", line 27, in __init__
    self.load(reqfile)
  File "/tmp/buildpack20151106-157-n5ixfp/vendor/pip-pop/pip-grep", line 38, in load
    for requirement in parse_requirements(reqfile, finder=finder, session=requests):
  File "/app/.heroku/python/lib/python2.7/site-packages/pip-6.0.6-py2.7.egg/pip/req/req_file.py", line 129, in parse_requirements
    isolated=options.isolated_mode if options else False,
  File "/app/.heroku/python/lib/python2.7/site-packages/pip-6.0.6-py2.7.egg/pip/req/req_install.py", line 92, in from_editable
    editable_req, default_vcs)
  File "/app/.heroku/python/lib/python2.7/site-packages/pip-6.0.6-py2.7.egg/pip/req/req_install.py", line 1045, in parse_editable
    url_no_extras
pip.exceptions.InstallationError: Directory '.' is not installable. File 'setup.py' not found.
Traceback (most recent call last):
  File "/tmp/buildpack20151106-157-n5ixfp/vendor/pip-pop/pip-grep", line 81, in <module>
    main()
  File "/tmp/buildpack20151106-157-n5ixfp/vendor/pip-pop/pip-grep", line 77, in main
    grep(**kwargs)
  File "/tmp/buildpack20151106-157-n5ixfp/vendor/pip-pop/pip-grep", line 45, in grep
    r = Requirements(reqfile)
  File "/tmp/buildpack20151106-157-n5ixfp/vendor/pip-pop/pip-grep", line 27, in __init__
    self.load(reqfile)
  File "/tmp/buildpack20151106-157-n5ixfp/vendor/pip-pop/pip-grep", line 38, in load
    for requirement in parse_requirements(reqfile, finder=finder, session=requests):
  File "/app/.heroku/python/lib/python2.7/site-packages/pip-6.0.6-py2.7.egg/pip/req/req_file.py", line 129, in parse_requirements
    isolated=options.isolated_mode if options else False,
  File "/app/.heroku/python/lib/python2.7/site-packages/pip-6.0.6-py2.7.egg/pip/req/req_install.py", line 92, in from_editable
    editable_req, default_vcs)
  File "/app/.heroku/python/lib/python2.7/site-packages/pip-6.0.6-py2.7.egg/pip/req/req_install.py", line 1045, in parse_editable
    url_no_extras
pip.exceptions.InstallationError: Directory '.' is not installable. File 'setup.py' not found.
remote:            /tmp/easy_install-g1b60o/numpy-1.10.1/_configtest.c:6: undefined reference to `exp'
remote:            collect2: error: ld returned 1 exit status
remote:            _configtest.o: In function `main':
remote:            /tmp/easy_install-g1b60o/numpy-1.10.1/_configtest.c:6: undefined reference to `exp'
remote:            collect2: error: ld returned 1 exit status

Any idea what I could do? Thanks

@andrecp
Copy link
Author

andrecp commented Nov 6, 2015

I've tried python 2.7.8 and
numpy==1.7.0
scipy==0.11.0
scikit-learn==0.13.1

but no joy...

If I go with

numpy==1.9.2
scipy==0.15.1

I get

Collecting numpy==1.9.2 (from -r requirements.txt (line 36))
         Downloading numpy-1.9.2.tar.gz (4.0MB)
           Running from numpy source directory.

but then

ollecting scipy==0.15.1 (from -r requirements.txt (line 37))
         Downloading scipy-0.15.1.tar.gz (11.4MB)
           Running from numpy source directory.
           /tmp/easy_install-qNpPQk/numpy-1.10.1/numpy/distutils/system_info.py:1651: UserWarning:
               Atlas (http://math-atlas.sourceforge.net/) libraries not found.
               Directories to search for the libraries can be specified in the
               numpy/distutils/site.cfg file (section [atlas]) or by setting
               the ATLAS environment variable.
             warnings.warn(AtlasNotFoundError.__doc__)
           /tmp/easy_install-qNpPQk/numpy-1.10.1/numpy/distutils/system_info.py:1660: UserWarning:
               Blas (http://www.netlib.org/blas/) libraries not found.
               Directories to search for the libraries can be specified in the
               numpy/distutils/site.cfg file (section [blas]) or by setting
               the BLAS environment variable.
             warnings.warn(BlasNotFoundError.__doc__)
           /tmp/easy_install-qNpPQk/numpy-1.10.1/numpy/distutils/system_info.py:1663: UserWarning:
               Blas (http://www.netlib.org/blas/) sources not found.
               Directories to search for the sources can be specified in the
               numpy/distutils/site.cfg file (section [blas_src]) or by setting
               the BLAS_SRC environment variable.
             warnings.warn(BlasSrcNotFoundError.__doc__)
           /bin/sh: 1: svnversion: not found
           non-existing path in 'numpy/distutils': 'site.cfg'
           /bin/sh: 1: svnversion: not found
           /tmp/easy_install-qNpPQk/numpy-1.10.1/numpy/distutils/system_info.py:1552: UserWarning:
               Atlas (http://math-atlas.sourceforge.net/) libraries not found.
               Directories to search for the libraries can be specified in the
               numpy/distutils/site.cfg file (section [atlas]) or by setting
               the ATLAS environment variable.
             warnings.warn(AtlasNotFoundError.__doc__)
           /tmp/easy_install-qNpPQk/numpy-1.10.1/numpy/distutils/system_info.py:1563: UserWarning:
               Lapack (http://www.netlib.org/lapack/) libraries not found.
               Directories to search for the libraries can be specified in the
               numpy/distutils/site.cfg file (section [lapack]) or by setting
               the LAPACK environment variable.
             warnings.warn(LapackNotFoundError.__doc__)
           /tmp/easy_install-qNpPQk/numpy-1.10.1/numpy/distutils/system_info.py:1566: UserWarning:
               Lapack (http://www.netlib.org/lapack/) sources not found.
               Directories to search for the sources can be specified in the
               numpy/distutils/site.cfg file (section [lapack_src]) or by setting
               the LAPACK_SRC environment variable.
             warnings.warn(LapackSrcNotFoundError.__doc__)
           /app/.heroku/python/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'define_macros'
             warnings.warn(msg)
           Could not locate executable gfortran
           Could not locate executable f95
           Could not locate executable ifort
           Could not locate executable ifc
           Could not locate executable lf95
           Could not locate executable pgfortran
           Could not locate executable f90
           Could not locate executable f77
           Could not locate executable fort
           Could not locate executable efort
           Could not locate executable efc
           Could not locate executable g77
           Could not locate executable g95
           Could not locate executable pathf95
           don't know how to compile Fortran code on platform 'posix'

@andrecp
Copy link
Author

andrecp commented Nov 6, 2015

And my last attempt:

numpy==1.8.1
scipy==0.14.0
 ImportError: No module named numpy.distutils.core
           Complete output from command /app/.heroku/python/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-JxpeWb/scipy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-hAt4gU-record/install-record.txt --single-version-externally-managed --compile:
           Traceback (most recent call last):

             File "<string>", line 1, in <module>

             File "/tmp/pip-build-JxpeWb/scipy/setup.py", line 237, in <module>

               setup_package()

             File "/tmp/pip-build-JxpeWb/scipy/setup.py", line 225, in setup_package

               from numpy.distutils.core import setup

           ImportError: No module named numpy.distutils.core

@iansprice
Copy link

Running into this today w/-
Python 3.5.2
numpy==1.9.2
scipy==0.15.1

@branliu0
Copy link
Owner

This buildpack doesn't support python 3

@simranjotsandhu
Copy link

I'm all ears to this one...

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

4 participants