benitodelanoche
Posts: 1
Joined: Mon May 21, 2018 8:33 am

Can't install Python Packages QUANDL, NUMPY, ....

Mon May 21, 2018 8:38 am

Hello!

While trying to install QUANDL, I run into this nasty error.
Hopefully nothing about it has been posted before...
I would like to understand what the main problem is :D

Thanks in advance!

Code: Select all

[email protected]:~ $ sudo pip install quandl
Collecting quandl
  Using cached https://files.pythonhosted.org/packages/47/8c/b61f5c1e9167f4c1c1c2b86991bbbac51a2bd937b36cbc4cc39248dfb2d1/Quandl-3.3.0-py2.py3-none-any.whl
Collecting requests>=2.7.0 (from quandl)
  Using cached https://files.pythonhosted.org/packages/49/df/50aa1999ab9bde74656c2919d9c0c085fd2b3775fd3eca826012bef76d8c/requests-2.18.4-py2.py3-none-any.whl
Collecting more-itertools (from quandl)
  Using cached https://files.pythonhosted.org/packages/4a/88/c28e2a2da8f3dc3a391d9c97ad949f2ea0c05198222e7e6af176e5bf9b26/more_itertools-4.1.0-py2-none-any.whl
Collecting inflection>=0.3.1 (from quandl)
  Using cached https://files.pythonhosted.org/packages/d5/35/a6eb45b4e2356fe688b21570864d4aa0d0a880ce387defe9c589112077f8/inflection-0.3.1.tar.gz
Collecting ndg-httpsclient (from quandl)
  Using cached https://files.pythonhosted.org/packages/4b/a1/73ba15c5e56be36f184b0eabf7ea0873ea54022238313757e55781e8a2ad/ndg_httpsclient-0.5.0-py2-none-any.whl
Collecting pyasn1 (from quandl)
  Using cached https://files.pythonhosted.org/packages/ba/fe/02e3e2ee243966b143657fb8bd6bc97595841163b6d8c26820944acaec4d/pyasn1-0.4.2-py2.py3-none-any.whl
Collecting pyOpenSSL (from quandl)
  Using cached https://files.pythonhosted.org/packages/96/af/9d29e6bd40823061aea2e0574ccb2fcf72bfd6130ce53d32773ec375458c/pyOpenSSL-18.0.0-py2.py3-none-any.whl
Collecting numpy>=1.8 (from quandl)
  Using cached https://files.pythonhosted.org/packages/b0/2b/497c2bb7c660b2606d4a96e2035e92554429e139c6c71cdff67af66b58d2/numpy-1.14.3.zip
Collecting pandas>=0.14 (from quandl)
  Using cached https://files.pythonhosted.org/packages/45/12/1e1ba99fb65df9f7f3724d3232feef35cc044d18604d57492d561e90219f/pandas-0.23.0.tar.gz
    Complete output from command python setup.py egg_info:
    Running from numpy source directory.
    /tmp/easy_install-IO_X3s/numpy-1.14.3/setup.py:369: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates
      run_build = parse_setuppy_commands()
    /tmp/easy_install-IO_X3s/numpy-1.14.3/numpy/distutils/system_info.py:624: 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.
      self.calc_info()
    /tmp/easy_install-IO_X3s/numpy-1.14.3/numpy/distutils/system_info.py:624: 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.
      self.calc_info()
    /tmp/easy_install-IO_X3s/numpy-1.14.3/numpy/distutils/system_info.py:624: 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.
      self.calc_info()
    /bin/sh: 1: svnversion: not found
    /bin/sh: 1: svnversion: not found
    /tmp/easy_install-IO_X3s/numpy-1.14.3/numpy/distutils/system_info.py:624: 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.
      self.calc_info()
    /tmp/easy_install-IO_X3s/numpy-1.14.3/numpy/distutils/system_info.py:624: 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.
      self.calc_info()
    /usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'define_macros'
      warnings.warn(msg)
    non-existing path in 'numpy/distutils': 'site.cfg'
    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
    Could not locate executable nagfor
    don't know how to compile Fortran code on platform 'posix'
    _configtest.c:1:5: warning: conflicting types for built-in function ‘exp’
     int exp (void);
         ^~~
    _configtest.o: In function `main':
    /tmp/easy_install-IO_X3s/numpy-1.14.3/_configtest.c:6: undefined reference to `exp'
    collect2: error: ld returned 1 exit status
    _configtest.o: In function `main':
    /tmp/easy_install-IO_X3s/numpy-1.14.3/_configtest.c:6: undefined reference to `exp'
    collect2: error: ld returned 1 exit status
    _configtest.c:1:5: warning: conflicting types for built-in function ‘exp’
     int exp (void);
         ^~~
    _configtest.c:1:20: fatal error: Python.h: No such file or directory
     #include <Python.h>
                        ^
    compilation terminated.
    _configtest.c:1:20: fatal error: Python.h: No such file or directory
     #include <Python.h>
                        ^
    compilation terminated.
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-vHPEyH/pandas/setup.py", line 752, in <module>
        **setuptools_kwargs)
      File "/usr/local/lib/python2.7/dist-packages/setuptools/__init__.py", line 128, in setup
        _install_setup_requires(attrs)
      File "/usr/local/lib/python2.7/dist-packages/setuptools/__init__.py", line 123, in _install_setup_requires
        dist.fetch_build_eggs(dist.setup_requires)
      File "/usr/local/lib/python2.7/dist-packages/setuptools/dist.py", line 514, in fetch_build_eggs
        replace_conflicting=True,
      File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 770, in resolve
        replace_conflicting=replace_conflicting
      File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 1053, in best_match
        return self.obtain(req, installer)
      File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 1065, in obtain
        return installer(requirement)
      File "/usr/local/lib/python2.7/dist-packages/setuptools/dist.py", line 581, in fetch_build_egg
        return cmd.easy_install(req)
      File "/usr/local/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 673, in easy_install
        return self.install_item(spec, dist.location, tmpdir, deps)
      File "/usr/local/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 699, in install_item
        dists = self.install_eggs(spec, download, tmpdir)
      File "/usr/local/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 884, in install_eggs
        return self.build_and_install(setup_script, setup_base)
      File "/usr/local/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1152, in build_and_install
        self.run_setup(setup_script, setup_base, args)
      File "/usr/local/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1138, in run_setup
        run_setup(setup_script, args)
      File "/usr/local/lib/python2.7/dist-packages/setuptools/sandbox.py", line 253, in run_setup
        raise
      File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__
        self.gen.throw(type, value, traceback)
      File "/usr/local/lib/python2.7/dist-packages/setuptools/sandbox.py", line 195, in setup_context
        yield
      File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__
        self.gen.throw(type, value, traceback)
      File "/usr/local/lib/python2.7/dist-packages/setuptools/sandbox.py", line 166, in save_modules
        saved_exc.resume()
      File "/usr/local/lib/python2.7/dist-packages/setuptools/sandbox.py", line 141, in resume
        six.reraise(type, exc, self._tb)
      File "/usr/local/lib/python2.7/dist-packages/setuptools/sandbox.py", line 154, in save_modules
        yield saved
      File "/usr/local/lib/python2.7/dist-packages/setuptools/sandbox.py", line 195, in setup_context
        yield
      File "/usr/local/lib/python2.7/dist-packages/setuptools/sandbox.py", line 250, in run_setup
        _execfile(setup_script, ns)
      File "/usr/local/lib/python2.7/dist-packages/setuptools/sandbox.py", line 45, in _execfile
        exec(code, globals, locals)
      File "/tmp/easy_install-IO_X3s/numpy-1.14.3/setup.py", line 394, in <module>
        self.py_modules_dict = {}
      File "/tmp/easy_install-IO_X3s/numpy-1.14.3/setup.py", line 386, in setup_package

      File "/tmp/easy_install-IO_X3s/numpy-1.14.3/numpy/distutils/core.py", line 169, in setup
      File "/usr/local/lib/python2.7/dist-packages/setuptools/__init__.py", line 129, in setup
        return distutils.core.setup(**attrs)
      File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
        dist.run_commands()
      File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
        self.run_command(cmd)
      File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
        cmd_obj.run()
      File "/usr/local/lib/python2.7/dist-packages/setuptools/command/bdist_egg.py", line 163, in run
        self.run_command("egg_info")
      File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
        cmd_obj.run()
      File "/tmp/easy_install-IO_X3s/numpy-1.14.3/numpy/distutils/command/egg_info.py", line 26, in run
      File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
        cmd_obj.run()
      File "/tmp/easy_install-IO_X3s/numpy-1.14.3/numpy/distutils/command/build_src.py", line 148, in run
      File "/tmp/easy_install-IO_X3s/numpy-1.14.3/numpy/distutils/command/build_src.py", line 165, in build_sources
      File "/tmp/easy_install-IO_X3s/numpy-1.14.3/numpy/distutils/command/build_src.py", line 324, in build_extension_sources
      File "/tmp/easy_install-IO_X3s/numpy-1.14.3/numpy/distutils/command/build_src.py", line 377, in generate_sources
      File "numpy/core/setup.py", line 422, in generate_config_h
        cmdclass['build_ext'] = CheckingBuildExt
      File "numpy/core/setup.py", line 48, in check_types
        'pytz >= 2011k',
      File "numpy/core/setup.py", line 281, in check_types
        for clean_me in self._clean_me:
    SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-vHPEyH/pandas/

robbes
Posts: 144
Joined: Sun Jan 20, 2013 7:11 pm
Location: Canada - off the west coast

Re: Can't install Python Packages QUANDL, NUMPY, ....

Mon May 21, 2018 4:47 pm

Your error message ends with:
SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel
Do you have python-dev installed?

You are apparently using python2.7 for this installation. Obsolescence is rapidly approaching! Python3 would be a better choice.

Return to “Advanced users”