I am trying to build a Docker application that uses Python's gensim library, version 2.1.0, which is being installed via pip from a requirements.txt file.
However, Docker seems to have trouble installing numpy, scipy, and gensim. I googled the error messages and found other users who experienced the same problem, but in other environments. Many of their solutions do not seem to work in Docker.
The following is the error message:
<pre> Step 4 : RUN pip install -r requirements.txt
---> Running in a86d07e229d7
Collecting Flask==0.12 (from -r requirements.txt (line 1))
Downloading Flask-0.12-py2.py3-none-any.whl (82kB)
Collecting requests==2.17.3 (from -r requirements.txt (line 2))
Downloading requests-2.17.3-py2.py3-none-any.whl (87kB)
Collecting numpy==1.12.1 (from -r requirements.txt (line 3))
Downloading numpy-1.12.1.zip (4.8MB)
Collecting nltk==3.2.2 (from -r requirements.txt (line 4))
Downloading nltk-3.2.2.tar.gz (1.2MB)
Collecting scipy==0.19.0 (from -r requirements.txt (line 5))
Downloading scipy-0.19.0.zip (15.3MB)
Complete output from command python setup.py egg_info:
/bin/sh: svnversion: not found
/bin/sh: svnversion: not found
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
don't know how to compile Fortran code on platform 'posix'
Running from numpy source directory.
/tmp/easy_install-ocgjhe9m/numpy-1.13.0/setup.py:367: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates
run_build = parse_setuppy_commands()
/tmp/easy_install-ocgjhe9m/numpy-1.13.0/numpy/distutils/system_info.py:572: 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-ocgjhe9m/numpy-1.13.0/numpy/distutils/system_info.py:572: 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-ocgjhe9m/numpy-1.13.0/numpy/distutils/system_info.py:572: 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()
/tmp/easy_install-ocgjhe9m/numpy-1.13.0/numpy/distutils/system_info.py:572: 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-ocgjhe9m/numpy-1.13.0/numpy/distutils/system_info.py:572: 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/local/lib/python3.5/distutils/dist.py:261: UserWarning: Unknown distribution option: 'define_macros'
warnings.warn(msg)
Traceback (most recent call last):
File "/usr/local/lib/python3.5/site-packages/setuptools/sandbox.py", line 158, in save_modules
yield saved
File "/usr/local/lib/python3.5/site-packages/setuptools/sandbox.py", line 199, in setup_context
yield
File "/usr/local/lib/python3.5/site-packages/setuptools/sandbox.py", line 254, in run_setup
_execfile(setup_script, ns)
File "/usr/local/lib/python3.5/site-packages/setuptools/sandbox.py", line 48, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-ocgjhe9m/numpy-1.13.0/setup.py", line 392, in <module>
# higher up in this file.
File "/tmp/easy_install-ocgjhe9m/numpy-1.13.0/setup.py", line 384, in setup_package
if "--force" in sys.argv:
File "/tmp/easy_install-ocgjhe9m/numpy-1.13.0/numpy/distutils/core.py", line 169, in setup
File "/usr/local/lib/python3.5/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/local/lib/python3.5/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/local/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.5/site-packages/setuptools/command/bdist_egg.py", line 152, in run
self.run_command("egg_info")
File "/usr/local/lib/python3.5/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/easy_install-ocgjhe9m/numpy-1.13.0/numpy/distutils/command/egg_info.py", line 26, in run
File "/usr/local/lib/python3.5/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/easy_install-ocgjhe9m/numpy-1.13.0/numpy/distutils/command/build_src.py", line 148, in run
File "/tmp/easy_install-ocgjhe9m/numpy-1.13.0/numpy/distutils/command/build_src.py", line 159, in build_sources
File "/tmp/easy_install-ocgjhe9m/numpy-1.13.0/numpy/distutils/command/build_src.py", line 294, in build_library_sources
File "/tmp/easy_install-ocgjhe9m/numpy-1.13.0/numpy/distutils/command/build_src.py", line 377, in generate_sources
File "numpy/core/setup.py", line 674, in get_mathlib_info
RuntimeError: Broken toolchain: cannot link a simple C program
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-j8py_tat/scipy/setup.py", line 416, in <module>
setup_package()
File "/tmp/pip-build-j8py_tat/scipy/setup.py", line 412, in setup_package
setup(**metadata)
File "/usr/local/lib/python3.5/distutils/core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/local/lib/python3.5/site-packages/setuptools/dist.py", line 320, in __init__
self.fetch_build_eggs(attrs['setup_requires'])
File "/usr/local/lib/python3.5/site-packages/setuptools/dist.py", line 377, in fetch_build_eggs
replace_conflicting=True,
File "/usr/local/lib/python3.5/site-packages/pkg_resources/__init__.py", line 852, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/usr/local/lib/python3.5/site-packages/pkg_resources/__init__.py", line 1124, in best_match
return self.obtain(req, installer)
File "/usr/local/lib/python3.5/site-packages/pkg_resources/__init__.py", line 1136, in obtain
return installer(requirement)
File "/usr/local/lib/python3.5/site-packages/setuptools/dist.py", line 445, in fetch_build_egg
return cmd.easy_install(req)
File "/usr/local/lib/python3.5/site-packages/setuptools/command/easy_install.py", line 673, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/usr/local/lib/python3.5/site-packages/setuptools/command/easy_install.py", line 699, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/usr/local/lib/python3.5/site-packages/setuptools/command/easy_install.py", line 880, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/usr/local/lib/python3.5/site-packages/setuptools/command/easy_install.py", line 1119, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/usr/local/lib/python3.5/site-packages/setuptools/command/easy_install.py", line 1105, in run_setup
run_setup(setup_script, args)
File "/usr/local/lib/python3.5/site-packages/setuptools/sandbox.py", line 257, in run_setup
raise
File "/usr/local/lib/python3.5/contextlib.py", line 77, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.5/site-packages/setuptools/sandbox.py", line 199, in setup_context
yield
File "/usr/local/lib/python3.5/contextlib.py", line 77, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.5/site-packages/setuptools/sandbox.py", line 170, in save_modules
saved_exc.resume()
File "/usr/local/lib/python3.5/site-packages/setuptools/sandbox.py", line 145, in resume
six.reraise(type, exc, self._tb)
File "/usr/local/lib/python3.5/site-packages/pkg_resources/_vendor/six.py", line 685, in reraise
raise value.with_traceback(tb)
File "/usr/local/lib/python3.5/site-packages/setuptools/sandbox.py", line 158, in save_modules
yield saved
File "/usr/local/lib/python3.5/site-packages/setuptools/sandbox.py", line 199, in setup_context
yield
File "/usr/local/lib/python3.5/site-packages/setuptools/sandbox.py", line 254, in run_setup
_execfile(setup_script, ns)
File "/usr/local/lib/python3.5/site-packages/setuptools/sandbox.py", line 48, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-ocgjhe9m/numpy-1.13.0/setup.py", line 392, in <module>
# higher up in this file.
File "/tmp/easy_install-ocgjhe9m/numpy-1.13.0/setup.py", line 384, in setup_package
if "--force" in sys.argv:
File "/tmp/easy_install-ocgjhe9m/numpy-1.13.0/numpy/distutils/core.py", line 169, in setup
File "/usr/local/lib/python3.5/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/local/lib/python3.5/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/local/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.5/site-packages/setuptools/command/bdist_egg.py", line 152, in run
self.run_command("egg_info")
File "/usr/local/lib/python3.5/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/easy_install-ocgjhe9m/numpy-1.13.0/numpy/distutils/command/egg_info.py", line 26, in run
File "/usr/local/lib/python3.5/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/easy_install-ocgjhe9m/numpy-1.13.0/numpy/distutils/command/build_src.py", line 148, in run
File "/tmp/easy_install-ocgjhe9m/numpy-1.13.0/numpy/distutils/command/build_src.py", line 159, in build_sources
File "/tmp/easy_install-ocgjhe9m/numpy-1.13.0/numpy/distutils/command/build_src.py", line 294, in build_library_sources
File "/tmp/easy_install-ocgjhe9m/numpy-1.13.0/numpy/distutils/command/build_src.py", line 377, in generate_sources
File "numpy/core/setup.py", line 674, in get_mathlib_info
RuntimeError: Broken toolchain: cannot link a simple C program
/bin/sh: gcc: not found
/bin/sh: gcc: not found
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-j8py_tat/scipy/
Removing intermediate container a86d07e229d7
The command '/bin/sh -c pip install -r requirements.txt' returned a non-zero code: 1 </pre>
I'm using the python:3.5-alpine image. The versions of the packages are numpy==1.12.1, scipy==0.19.0, and gensim==2.1.0.
To install numpy, scipy, or gensim, the following lines need to be added to the Dockerfile before RUN pip install -r requirements.txt:
RUN apt-get -y install libc-dev
RUN apt-get -y install build-essential
RUN pip install -U pip
The first two lines install the C build tools required for the libraries. The tihrd line upgrades pip to the newest available version.
Related
I get a very large error log when i am trying to install scipy 0.19.1 (it is needed by a project i am trying to run) and I'm actually not sure which part is the main error because there seem to be many errors happening:
C:\Users\John>pip install scipy==0.19.1
Collecting scipy==0.19.1
Using cached https://files.pythonhosted.org/packages/52/67/d9ef9b5058d4a9e3f0ae641ec151790622cbeb37f157de5773358e2bf3da/scipy-0.19.1.tar.gz
Complete output from command python setup.py egg_info:
Processing numpy/random\_bounded_integers.pxd.in
Processing numpy/random\bit_generator.pyx
Processing numpy/random\mtrand.pyx
Processing numpy/random\_bounded_integers.pyx.in
Processing numpy/random\_common.pyx
Processing numpy/random\_generator.pyx
Processing numpy/random\_mt19937.pyx
Processing numpy/random\_pcg64.pyx
Processing numpy/random\_philox.pyx
Processing numpy/random\_sfc64.pyx
Cythonizing sources
Could not locate executable g77
Could not locate executable f77
Could not locate executable ifort
Could not locate executable ifl
Could not locate executable f90
Could not locate executable DF
Could not locate executable efl
Could not locate executable gfortran
Could not locate executable f95
Could not locate executable g95
Could not locate executable efort
Could not locate executable efc
Could not locate executable flang
don't know how to compile Fortran code on platform 'nt'
non-existing path in 'numpy\\distutils': 'site.cfg'
Running from numpy source directory.
C:\Users\John\AppData\Local\Temp\easy_install-wq9y_09v\numpy-1.19.4\setup.py:480: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates
run_build = parse_setuppy_commands()
c:\users\John\appdata\local\programs\python\python36\lib\distutils\dist.py:261: UserWarning: Unknown distribution option: 'project_urls'
warnings.warn(msg)
C:\Users\John\AppData\Local\Temp\easy_install-wq9y_09v\numpy-1.19.4\numpy\distutils\system_info.py:1914: UserWarning:
Optimized (vendor) Blas libraries are not found.
Falls back to netlib Blas library which has worse performance.
A better performance should be easily gained by switching
Blas library.
if self._calc_info(blas):
C:\Users\John\AppData\Local\Temp\easy_install-wq9y_09v\numpy-1.19.4\numpy\distutils\system_info.py:1914: 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.
if self._calc_info(blas):
C:\Users\John\AppData\Local\Temp\easy_install-wq9y_09v\numpy-1.19.4\numpy\distutils\system_info.py:1914: 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.
if self._calc_info(blas):
C:\Users\John\AppData\Local\Temp\easy_install-wq9y_09v\numpy-1.19.4\numpy\distutils\system_info.py:1748: 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.
return getattr(self, '_calc_info_{}'.format(name))()
C:\Users\John\AppData\Local\Temp\easy_install-wq9y_09v\numpy-1.19.4\numpy\distutils\system_info.py:1748: 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.
return getattr(self, '_calc_info_{}'.format(name))()
c:\users\John\appdata\local\programs\python\python36\lib\distutils\dist.py:261: UserWarning: Unknown distribution option: 'project_urls'
warnings.warn(msg)
c:\users\John\appdata\local\programs\python\python36\lib\distutils\dist.py:261: UserWarning: Unknown distribution option: 'define_macros'
warnings.warn(msg)
Traceback (most recent call last):
File "c:\users\John\appdata\local\programs\python\python36\lib\site-packages\setuptools\sandbox.py", line 157, in save_modules
yield saved
File "c:\users\John\appdata\local\programs\python\python36\lib\site-packages\setuptools\sandbox.py", line 198, in setup_context
yield
File "c:\users\John\appdata\local\programs\python\python36\lib\site-packages\setuptools\sandbox.py", line 248, in run_setup
DirectorySandbox(setup_dir).run(runner)
File "c:\users\John\appdata\local\programs\python\python36\lib\site-packages\setuptools\sandbox.py", line 278, in run
return func()
File "c:\users\John\appdata\local\programs\python\python36\lib\site-packages\setuptools\sandbox.py", line 246, in runner
_execfile(setup_script, ns)
File "c:\users\John\appdata\local\programs\python\python36\lib\site-packages\setuptools\sandbox.py", line 47, in _execfile
exec(code, globals, locals)
File "C:\Users\John\AppData\Local\Temp\easy_install-wq9y_09v\numpy-1.19.4\setup.py", line 508, in <module>
File "C:\Users\John\AppData\Local\Temp\easy_install-wq9y_09v\numpy-1.19.4\setup.py", line 500, in setup_package
File "C:\Users\John\AppData\Local\Temp\easy_install-wq9y_09v\numpy-1.19.4\numpy\distutils\core.py", line 169, in setup
File "c:\users\John\appdata\local\programs\python\python36\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\users\John\appdata\local\programs\python\python36\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "c:\users\John\appdata\local\programs\python\python36\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "c:\users\John\appdata\local\programs\python\python36\lib\site-packages\setuptools\command\bdist_egg.py", line 152, in run
self.run_command("egg_info")
File "c:\users\John\appdata\local\programs\python\python36\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\John\appdata\local\programs\python\python36\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\John\AppData\Local\Temp\easy_install-wq9y_09v\numpy-1.19.4\numpy\distutils\command\egg_info.py", line 24, in run
File "c:\users\John\appdata\local\programs\python\python36\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\John\appdata\local\programs\python\python36\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\John\AppData\Local\Temp\easy_install-wq9y_09v\numpy-1.19.4\numpy\distutils\command\build_src.py", line 144, in run
File "C:\Users\John\AppData\Local\Temp\easy_install-wq9y_09v\numpy-1.19.4\numpy\distutils\command\build_src.py", line 155, in build_sources
File "C:\Users\John\AppData\Local\Temp\easy_install-wq9y_09v\numpy-1.19.4\numpy\distutils\command\build_src.py", line 288, in build_library_sources
File "C:\Users\John\AppData\Local\Temp\easy_install-wq9y_09v\numpy-1.19.4\numpy\distutils\command\build_src.py", line 378, in generate_sources
File "numpy\core\setup.py", line 663, in get_mathlib_info
RuntimeError: Broken toolchain: cannot link a simple C program
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\John\AppData\Local\Temp\pip-build-9ky_jp3j\scipy\setup.py", line 416, in <module>
setup_package()
File "C:\Users\John\AppData\Local\Temp\pip-build-9ky_jp3j\scipy\setup.py", line 412, in setup_package
setup(**metadata)
File "c:\users\John\appdata\local\programs\python\python36\lib\distutils\core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "c:\users\John\appdata\local\programs\python\python36\lib\site-packages\setuptools\dist.py", line 315, in __init__
self.fetch_build_eggs(attrs['setup_requires'])
File "c:\users\John\appdata\local\programs\python\python36\lib\site-packages\setuptools\dist.py", line 361, in fetch_build_eggs
replace_conflicting=True,
File "c:\users\John\appdata\local\programs\python\python36\lib\site-packages\pkg_resources\__init__.py", line 850, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "c:\users\John\appdata\local\programs\python\python36\lib\site-packages\pkg_resources\__init__.py", line 1122, in best_match
return self.obtain(req, installer)
File "c:\users\John\appdata\local\programs\python\python36\lib\site-packages\pkg_resources\__init__.py", line 1134, in obtain
return installer(requirement)
File "c:\users\John\appdata\local\programs\python\python36\lib\site-packages\setuptools\dist.py", line 429, in fetch_build_egg
return cmd.easy_install(req)
File "c:\users\John\appdata\local\programs\python\python36\lib\site-packages\setuptools\command\easy_install.py", line 665, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "c:\users\John\appdata\local\programs\python\python36\lib\site-packages\setuptools\command\easy_install.py", line 695, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "c:\users\John\appdata\local\programs\python\python36\lib\site-packages\setuptools\command\easy_install.py", line 876, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "c:\users\John\appdata\local\programs\python\python36\lib\site-packages\setuptools\command\easy_install.py", line 1115, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "c:\users\John\appdata\local\programs\python\python36\lib\site-packages\setuptools\command\easy_install.py", line 1101, in run_setup
run_setup(setup_script, args)
File "c:\users\John\appdata\local\programs\python\python36\lib\site-packages\setuptools\sandbox.py", line 251, in run_setup
raise
File "c:\users\John\appdata\local\programs\python\python36\lib\contextlib.py", line 100, in __exit__
self.gen.throw(type, value, traceback)
File "c:\users\John\appdata\local\programs\python\python36\lib\site-packages\setuptools\sandbox.py", line 198, in setup_context
yield
File "c:\users\John\appdata\local\programs\python\python36\lib\contextlib.py", line 100, in __exit__
self.gen.throw(type, value, traceback)
File "c:\users\John\appdata\local\programs\python\python36\lib\site-packages\setuptools\sandbox.py", line 169, in save_modules
saved_exc.resume()
File "c:\users\John\appdata\local\programs\python\python36\lib\site-packages\setuptools\sandbox.py", line 144, in resume
six.reraise(type, exc, self._tb)
File "c:\users\John\appdata\local\programs\python\python36\lib\site-packages\pkg_resources\_vendor\six.py", line 685, in reraise
raise value.with_traceback(tb)
File "c:\users\John\appdata\local\programs\python\python36\lib\site-packages\setuptools\sandbox.py", line 157, in save_modules
yield saved
File "c:\users\John\appdata\local\programs\python\python36\lib\site-packages\setuptools\sandbox.py", line 198, in setup_context
yield
File "c:\users\John\appdata\local\programs\python\python36\lib\site-packages\setuptools\sandbox.py", line 248, in run_setup
DirectorySandbox(setup_dir).run(runner)
File "c:\users\John\appdata\local\programs\python\python36\lib\site-packages\setuptools\sandbox.py", line 278, in run
return func()
File "c:\users\John\appdata\local\programs\python\python36\lib\site-packages\setuptools\sandbox.py", line 246, in runner
_execfile(setup_script, ns)
File "c:\users\John\appdata\local\programs\python\python36\lib\site-packages\setuptools\sandbox.py", line 47, in _execfile
exec(code, globals, locals)
File "C:\Users\John\AppData\Local\Temp\easy_install-wq9y_09v\numpy-1.19.4\setup.py", line 508, in <module>
File "C:\Users\John\AppData\Local\Temp\easy_install-wq9y_09v\numpy-1.19.4\setup.py", line 500, in setup_package
File "C:\Users\John\AppData\Local\Temp\easy_install-wq9y_09v\numpy-1.19.4\numpy\distutils\core.py", line 169, in setup
File "c:\users\John\appdata\local\programs\python\python36\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\users\John\appdata\local\programs\python\python36\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "c:\users\John\appdata\local\programs\python\python36\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "c:\users\John\appdata\local\programs\python\python36\lib\site-packages\setuptools\command\bdist_egg.py", line 152, in run
self.run_command("egg_info")
File "c:\users\John\appdata\local\programs\python\python36\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\John\appdata\local\programs\python\python36\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\John\AppData\Local\Temp\easy_install-wq9y_09v\numpy-1.19.4\numpy\distutils\command\egg_info.py", line 24, in run
File "c:\users\John\appdata\local\programs\python\python36\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\John\appdata\local\programs\python\python36\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\John\AppData\Local\Temp\easy_install-wq9y_09v\numpy-1.19.4\numpy\distutils\command\build_src.py", line 144, in run
File "C:\Users\John\AppData\Local\Temp\easy_install-wq9y_09v\numpy-1.19.4\numpy\distutils\command\build_src.py", line 155, in build_sources
File "C:\Users\John\AppData\Local\Temp\easy_install-wq9y_09v\numpy-1.19.4\numpy\distutils\command\build_src.py", line 288, in build_library_sources
File "C:\Users\John\AppData\Local\Temp\easy_install-wq9y_09v\numpy-1.19.4\numpy\distutils\command\build_src.py", line 378, in generate_sources
File "numpy\core\setup.py", line 663, in get_mathlib_info
RuntimeError: Broken toolchain: cannot link a simple C program
Generating code
Finished generating code
LINK : fatal error LNK1158: cannot run 'rc.exe'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\John\AppData\Local\Temp\pip-build-9ky_jp3j\scipy\
You are using pip version 8.1.1, however version 20.2.4 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
at first it was giving me errors about not finding Cython, so i installed it, not this is happening, how can i solve it?
my python version is 3.6.1, and pip version is 8.1.1, both of which is needed by the project so i don't think i can change them.
I am trying to install a reasonable python 3 on an AWS m6g instance - this is their latest and greatest, and therein lies the rub. It is an ARM64 box, so there is no anaconda install for that (that I know of). I am installing packages manually via pip3, and after much loading of the requisite system packages, compilers, and so on, things mostly work WITH THE EXCEPTION OF matplotlib, which comes up with (sorry, don't know how to indent all of the below four spaces). Any ideas?
pip3 install matplotlib --user
Collecting matplotlib
Using cached https://files.pythonhosted.org/packages/9c/4b/06f4aa9bef6b5e4f177881b4dedd94faa6e7cb3d95dfaeaa8a1a8b541095/matplotlib-3.2.2.tar.gz
Collecting cycler>=0.10 (from matplotlib)
Using cached https://files.pythonhosted.org/packages/f7/d2/e07d3ebb2bd7af696440ce7e754c59dd546ffe1bbe732c8ab68b9c834e61/cycler-0.10.0-py2.py3-none-any.whl
Collecting kiwisolver>=1.0.1 (from matplotlib)
Using cached https://files.pythonhosted.org/packages/62/b8/db619d97819afb52a3ff5ff6ad3f7de408cc83a8ec2dfb31a1731c0a97c2/kiwisolver-1.2.0.tar.gz
Complete output from command python setup.py egg_info:
warning: no files found matching '*.png' under directory 'docs/source'
no previously-included directories found matching '.git'
no previously-included directories found matching 'dist'
no previously-included directories found matching 'build'
no previously-included directories found matching 'docs/build'
zip_safe flag not set; analyzing archive contents...
Traceback (most recent call last):
File "/usr/lib/python3.7/site-packages/setuptools/sandbox.py", line 154, in save_modules
yield saved
File "/usr/lib/python3.7/site-packages/setuptools/sandbox.py", line 195, in setup_context
yield
File "/usr/lib/python3.7/site-packages/setuptools/sandbox.py", line 250, in run_setup
_execfile(setup_script, ns)
File "/usr/lib/python3.7/site-packages/setuptools/sandbox.py", line 45, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-c8bpoixa/cppy-1.1.0/setup.py", line 24, in <module>
'py/solver.cpp',
File "/usr/lib/python3.7/site-packages/setuptools/__init__.py", line 129, in setup
return distutils.core.setup(**attrs)
File "/usr/lib64/python3.7/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib64/python3.7/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/lib64/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/lib/python3.7/site-packages/setuptools/command/bdist_egg.py", line 218, in run
os.path.join(archive_root, 'EGG-INFO'), self.zip_safe()
File "/usr/lib/python3.7/site-packages/setuptools/command/bdist_egg.py", line 269, in zip_safe
return analyze_egg(self.bdist_dir, self.stubs)
File "/usr/lib/python3.7/site-packages/setuptools/command/bdist_egg.py", line 379, in analyze_egg
safe = scan_module(egg_dir, base, name, stubs) and safe
File "/usr/lib/python3.7/site-packages/setuptools/command/bdist_egg.py", line 416, in scan_module
code = marshal.load(f)
ValueError: bad marshal data (unknown type code)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-6x1f9zgp/kiwisolver/setup.py", line 80, in <module>
cmdclass={'build_ext': BuildExt},
File "/usr/lib/python3.7/site-packages/setuptools/__init__.py", line 128, in setup
_install_setup_requires(attrs)
File "/usr/lib/python3.7/site-packages/setuptools/__init__.py", line 123, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "/usr/lib/python3.7/site-packages/setuptools/dist.py", line 461, in fetch_build_eggs
replace_conflicting=True,
File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 866, in resolve
replace_conflicting=replace_conflicting
File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1146, in best_match
return self.obtain(req, installer)
File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1158, in obtain
return installer(requirement)
File "/usr/lib/python3.7/site-packages/setuptools/dist.py", line 528, in fetch_build_egg
return cmd.easy_install(req)
File "/usr/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 672, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/usr/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 698, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/usr/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 881, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/usr/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 1149, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/usr/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 1135, in run_setup
run_setup(setup_script, args)
File "/usr/lib/python3.7/site-packages/setuptools/sandbox.py", line 253, in run_setup
raise
File "/usr/lib64/python3.7/contextlib.py", line 130, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/lib/python3.7/site-packages/setuptools/sandbox.py", line 195, in setup_context
yield
File "/usr/lib64/python3.7/contextlib.py", line 130, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/lib/python3.7/site-packages/setuptools/sandbox.py", line 166, in save_modules
saved_exc.resume()
File "/usr/lib/python3.7/site-packages/setuptools/sandbox.py", line 141, in resume
six.reraise(type, exc, self._tb)
File "/usr/lib/python3.7/site-packages/pkg_resources/_vendor/six.py", line 685, in reraise
raise value.with_traceback(tb)
File "/usr/lib/python3.7/site-packages/setuptools/sandbox.py", line 154, in save_modules
yield saved
File "/usr/lib/python3.7/site-packages/setuptools/sandbox.py", line 195, in setup_context
yield
File "/usr/lib/python3.7/site-packages/setuptools/sandbox.py", line 250, in run_setup
_execfile(setup_script, ns)
File "/usr/lib/python3.7/site-packages/setuptools/sandbox.py", line 45, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-c8bpoixa/cppy-1.1.0/setup.py", line 24, in <module>
'py/solver.cpp',
File "/usr/lib/python3.7/site-packages/setuptools/__init__.py", line 129, in setup
return distutils.core.setup(**attrs)
File "/usr/lib64/python3.7/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib64/python3.7/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/lib64/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/lib/python3.7/site-packages/setuptools/command/bdist_egg.py", line 218, in run
os.path.join(archive_root, 'EGG-INFO'), self.zip_safe()
File "/usr/lib/python3.7/site-packages/setuptools/command/bdist_egg.py", line 269, in zip_safe
return analyze_egg(self.bdist_dir, self.stubs)
File "/usr/lib/python3.7/site-packages/setuptools/command/bdist_egg.py", line 379, in analyze_egg
safe = scan_module(egg_dir, base, name, stubs) and safe
File "/usr/lib/python3.7/site-packages/setuptools/command/bdist_egg.py", line 416, in scan_module
code = marshal.load(f)
ValueError: bad marshal data (unknown type code)
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-6x1f9zgp/kiwisolver/
[ec2-user#ip-172-31-71-160 bin]$
Many of the dependencies of matplotlib have had new aarch64 wheels uploaded to pypi.org in the last few months since you posted this question. matplotlib itself doesn't have an aarch64 wheel available yet, but recently a change was merged to build one, so it probably will have one available soon. Even though matplotlib doesn't have a binary wheel published yet, I was able to install it on Ubuntu 20.04. It takes a minute or two to build, but it works:
$ sudo apt update
$ sudo apt install python3-pip
$ sudo pip3 install matplotlib
For completeness, I was able to get a full suite of python data science packages installed on Ubuntu 20.04 Arm with the following Dockerfile. (Just run the apt and pip commands if you aren't using Docker.) It takes a long time to complete since it builds many of these packages from source.
As more python packages begin publishing aarch64 wheels, this should become obsolete.
FROM ubuntu:focal
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
build-essential \
python3-pip \
python3-dev \
libfreetype-dev \
libopenblas64-dev \
mklibs \
libmlpack-dev \
libatlas-base-dev \
liblapack64-dev \
libffi-dev \
gfortran
RUN pip3 install jupyterlab matplotlib numpy pandas seaborn
This is what i get for an error. I have checked my updates, tried pip3 still same error. I have also tried to run command prompt as administrator. Is there something else I need to install before getting matplotlib?
ERROR: Command errored out with exit status 1:
command: 'c:\users\broc\appdata\local\programs\python\python38-32\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\broc\\AppData\\Local\\Temp\\pip-install-dapj3ew6\\matplotlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\broc\\AppData\\Local\\Temp\\pip-install-dapj3ew6\\matplotlib\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\broc\AppData\Local\Temp\pip-install-dapj3ew6\matplotlib\pip-egg-info'
cwd: C:\Users\broc\AppData\Local\Temp\pip-install-dapj3ew6\matplotlib\
Complete output (198 lines):
================================================================================
Edit setup.cfg to change the build options
BUILDING MATPLOTLIB
matplotlib: yes [3.1.1]
python: yes [3.8.0 (tags/v3.8.0:fa919fd, Oct 14 2019, 19:21:23) [MSC
v.1916 32 bit (Intel)]]
platform: yes [win32]
OPTIONAL SUBPACKAGES
sample_data: yes [installing]
tests: no [skipping due to configuration]
OPTIONAL BACKEND EXTENSIONS
agg: yes [installing]
tkagg: yes [installing; run-time loading from Python Tcl/Tk]
macosx: no [Mac OS-X only]
OPTIONAL PACKAGE DATA
dlls: no [skipping due to configuration]
Could not locate executable g77
Could not locate executable f77
Could not locate executable ifort
Could not locate executable ifl
Could not locate executable f90
Could not locate executable DF
Could not locate executable efl
Could not locate executable gfortran
Could not locate executable f95
Could not locate executable g95
Could not locate executable efort
Could not locate executable efc
Could not locate executable flang
don't know how to compile Fortran code on platform 'nt'
'svnversion' is not recognized as an internal or external command,
operable program or batch file.
non-existing path in 'numpy\\distutils': 'site.cfg'
Running from numpy source directory.
C:\Users\broc\AppData\Local\Temp\easy_install-90gtdhd8\numpy-1.17.4\setup.py:419: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates
run_build = parse_setuppy_commands()
C:\Users\broc\AppData\Local\Temp\easy_install-90gtdhd8\numpy-1.17.4\numpy\distutils\system_info.py:690: UserWarning:
Optimized (vendor) Blas libraries are not found.
Falls back to netlib Blas library which has worse performance.
A better performance should be easily gained by switching
Blas library.
self.calc_info()
C:\Users\broc\AppData\Local\Temp\easy_install-90gtdhd8\numpy-1.17.4\numpy\distutils\system_info.py:690: 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()
C:\Users\broc\AppData\Local\Temp\easy_install-90gtdhd8\numpy-1.17.4\numpy\distutils\system_info.py:690: 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()
C:\Users\broc\AppData\Local\Temp\easy_install-90gtdhd8\numpy-1.17.4\numpy\distutils\system_info.py:1712: 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.
if getattr(self, '_calc_info_{}'.format(lapack))():
C:\Users\broc\AppData\Local\Temp\easy_install-90gtdhd8\numpy-1.17.4\numpy\distutils\system_info.py:1712: 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.
if getattr(self, '_calc_info_{}'.format(lapack))():
c:\users\broc\appdata\local\programs\python\python38-32\lib\distutils\dist.py:274: UserWarning: Unknown distribution option: 'define_macros'
warnings.warn(msg)
Traceback (most recent call last):
File "c:\users\broc\appdata\local\programs\python\python38-32\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\users\broc\appdata\local\programs\python\python38-32\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "c:\users\broc\appdata\local\programs\python\python38-32\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\users\broc\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\command\bdist_egg.py", line 163, in run
self.run_command("egg_info")
File "c:\users\broc\appdata\local\programs\python\python38-32\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\broc\appdata\local\programs\python\python38-32\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\broc\AppData\Local\Temp\easy_install-90gtdhd8\numpy-1.17.4\numpy\distutils\command\egg_info.py", line 26, in run
File "c:\users\broc\appdata\local\programs\python\python38-32\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\broc\appdata\local\programs\python\python38-32\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\broc\AppData\Local\Temp\easy_install-90gtdhd8\numpy-1.17.4\numpy\distutils\command\build_src.py", line 142, in run
File "C:\Users\broc\AppData\Local\Temp\easy_install-90gtdhd8\numpy-1.17.4\numpy\distutils\command\build_src.py", line 153, in build_sources
File "C:\Users\broc\AppData\Local\Temp\easy_install-90gtdhd8\numpy-1.17.4\numpy\distutils\command\build_src.py", line 286, in build_library_sources
File "C:\Users\broc\AppData\Local\Temp\easy_install-90gtdhd8\numpy-1.17.4\numpy\distutils\command\build_src.py", line 369, in generate_sources
File "numpy\core\setup.py", line 667, in get_mathlib_info
File "c:\users\broc\appdata\local\programs\python\python38-32\lib\distutils\command\config.py", line 241, in try_link
self._check_compiler()
File "C:\Users\broc\AppData\Local\Temp\easy_install-90gtdhd8\numpy-1.17.4\numpy\distutils\command\config.py", line 54, in _check_compiler
File "c:\users\broc\appdata\local\programs\python\python38-32\lib\distutils\_msvccompiler.py", line 253, in initialize
vc_env = _get_vc_env(plat_spec)
File "c:\users\broc\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\msvc.py", line 171, in msvc14_get_vc_env
return EnvironmentInfo(plat_spec, vc_min_ver=14.0).return_env()
File "c:\users\broc\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\msvc.py", line 1075, in __init__
self.si = SystemInfo(self.ri, vc_ver)
File "c:\users\broc\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\msvc.py", line 547, in __init__
vc_ver or self._find_latest_available_vs_ver())
File "c:\users\broc\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\msvc.py", line 561, in _find_latest_available_vs_ver
raise distutils.errors.DistutilsPlatformError(
distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\users\broc\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\sandbox.py", line 154, in save_modules
yield saved
File "c:\users\broc\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\sandbox.py", line 195, in setup_context
yield
File "c:\users\broc\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\sandbox.py", line 250, in run_setup
_execfile(setup_script, ns)
File "c:\users\broc\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\sandbox.py", line 45, in _execfile
exec(code, globals, locals)
File "C:\Users\broc\AppData\Local\Temp\easy_install-90gtdhd8\numpy-1.17.4\setup.py", line 444, in <module>
File "C:\Users\broc\AppData\Local\Temp\easy_install-90gtdhd8\numpy-1.17.4\setup.py", line 436, in setup_package
File "C:\Users\broc\AppData\Local\Temp\easy_install-90gtdhd8\numpy-1.17.4\numpy\distutils\core.py", line 171, in setup
File "c:\users\broc\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "c:\users\broc\appdata\local\programs\python\python38-32\lib\distutils\core.py", line 163, in setup
raise SystemExit("error: " + str(msg))
SystemExit: error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\users\broc\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\command\easy_install.py", line 1144, in run_setup
run_setup(setup_script, args)
File "c:\users\broc\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\sandbox.py", line 253, in run_setup
raise
File "c:\users\broc\appdata\local\programs\python\python38-32\lib\contextlib.py", line 131, in __exit__
self.gen.throw(type, value, traceback)
File "c:\users\broc\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\sandbox.py", line 195, in setup_context
yield
File "c:\users\broc\appdata\local\programs\python\python38-32\lib\contextlib.py", line 131, in __exit__
self.gen.throw(type, value, traceback)
File "c:\users\broc\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\sandbox.py", line 166, in save_modules
saved_exc.resume()
File "c:\users\broc\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\sandbox.py", line 141, in resume
six.reraise(type, exc, self._tb)
File "c:\users\broc\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\_vendor\six.py", line 685, in reraise
raise value.with_traceback(tb)
File "c:\users\broc\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\sandbox.py", line 154, in save_modules
yield saved
File "c:\users\broc\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\sandbox.py", line 195, in setup_context
yield
File "c:\users\broc\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\sandbox.py", line 250, in run_setup
_execfile(setup_script, ns)
File "c:\users\broc\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\sandbox.py", line 45, in _execfile
exec(code, globals, locals)
File "C:\Users\broc\AppData\Local\Temp\easy_install-90gtdhd8\numpy-1.17.4\setup.py", line 444, in <module>
File "C:\Users\broc\AppData\Local\Temp\easy_install-90gtdhd8\numpy-1.17.4\setup.py", line 436, in setup_package
File "C:\Users\broc\AppData\Local\Temp\easy_install-90gtdhd8\numpy-1.17.4\numpy\distutils\core.py", line 171, in setup
File "c:\users\broc\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "c:\users\broc\appdata\local\programs\python\python38-32\lib\distutils\core.py", line 163, in setup
raise SystemExit("error: " + str(msg))
SystemExit: error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\broc\AppData\Local\Temp\pip-install-dapj3ew6\matplotlib\setup.py", line 262, in <module>
setup(
File "c:\users\broc\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\__init__.py", line 144, in setup
_install_setup_requires(attrs)
File "c:\users\broc\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\__init__.py", line 139, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "c:\users\broc\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\dist.py", line 717, in fetch_build_eggs
resolved_dists = pkg_resources.working_set.resolve(
File "c:\users\broc\appdata\local\programs\python\python38-32\lib\site-packages\pkg_resources\__init__.py", line 780, in resolve
dist = best[req.key] = env.best_match(
File "c:\users\broc\appdata\local\programs\python\python38-32\lib\site-packages\pkg_resources\__init__.py", line 1065, in best_match
return self.obtain(req, installer)
File "c:\users\broc\appdata\local\programs\python\python38-32\lib\site-packages\pkg_resources\__init__.py", line 1077, in obtain
return installer(requirement)
File "c:\users\broc\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\dist.py", line 787, in fetch_build_egg
return cmd.easy_install(req)
File "c:\users\broc\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\command\easy_install.py", line 679, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "c:\users\broc\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\command\easy_install.py", line 705, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "c:\users\broc\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\command\easy_install.py", line 890, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "c:\users\broc\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\command\easy_install.py", line 1158, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "c:\users\broc\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\command\easy_install.py", line 1146, in run_setup
raise DistutilsError("Setup script exited with %s" % (v.args[0],))
distutils.errors.DistutilsError: Setup script exited with error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
I am not sure what I have to do to download this. I have been searching for hours trying to find the solution.
I'm trying to install Keras but having diffuculty. I have looked at similar threads and tried their solutions but none seemed to work. I have tried the following:
pip install keras
pip install unroll
both returning the same results as shown below:
Command "python setup.py egg_info" failed with error code 1 in C:\Users\Ahmad\AppData\Local\Temp\pip-build-6qx6kw9h\unroll\
Also here is the output when I pip Install Keras:
C:\Users\Ahmad\Desktop\HouseProject>pip install keras
Collecting keras
Collecting theano (from keras)
Requirement already satisfied: pyyaml in c:\users\ahmad\appdata\local\programs\python\python35\lib\site-packages (from keras)
Requirement already satisfied: six in c:\users\ahmad\appdata\local\programs\python\python35\lib\site-packages (from keras)
Collecting scipy>=0.14 (from theano->keras)
Using cached scipy-0.19.1.tar.gz
Complete output from command python setup.py egg_info:
non-existing path in 'numpy\\distutils': 'site.cfg'
Running from numpy source directory.
C:\Users\Ahmad\AppData\Local\Temp\easy_install-3yj2htrd\numpy- 1.13.1\setup.py:367: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates
run_build = parse_setuppy_commands()
C:\Users\Ahmad\AppData\Local\Temp\easy_install-3yj2htrd\numpy- 1.13.1\numpy\distutils\system_info.py:572: 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()
C:\Users\Ahmad\AppData\Local\Temp\easy_install-3yj2htrd\numpy- 1.13.1\numpy\distutils\system_info.py:572: 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()
C:\Users\Ahmad\AppData\Local\Temp\easy_install-3yj2htrd\numpy-1.13.1\numpy\distutils\system_info.py:572: 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()
C:\Users\Ahmad\AppData\Local\Temp\easy_install-3yj2htrd\numpy- 1.13.1\numpy\distutils\system_info.py:572: 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()
C:\Users\Ahmad\AppData\Local\Temp\easy_install-3yj2htrd\numpy- 1.13.1\numpy\distutils\system_info.py:572: 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()
c:\users\ahmad\appdata\local\programs\python\python35\lib\distutils\dist.py:261: UserWarning: Unknown distribution option: 'define_macros'
warnings.warn(msg)
Traceback (most recent call last):
File "c:\users\ahmad\appdata\local\programs\python\python35\lib\site- packages\setuptools\msvc.py", line 481, in _find_latest_available_vc_ver
return self.find_available_vc_vers()[-1]
IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\users\ahmad\appdata\local\programs\python\python35\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\users\ahmad\appdata\local\programs\python\python35\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "c:\users\ahmad\appdata\local\programs\python\python35\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "c:\users\ahmad\appdata\local\programs\python\python35\lib\site- packages\setuptools\command\bdist_egg.py", line 152, in run
self.run_command("egg_info")
File "c:\users\ahmad\appdata\local\programs\python\python35\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\ahmad\appdata\local\programs\python\python35\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\Ahmad\AppData\Local\Temp\easy_install-3yj2htrd\numpy- 1.13.1\numpy\distutils\command\egg_info.py", line 26, in run
File "c:\users\ahmad\appdata\local\programs\python\python35\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\ahmad\appdata\local\programs\python\python35\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\Ahmad\AppData\Local\Temp\easy_install-3yj2htrd\numpy- 1.13.1\numpy\distutils\command\build_src.py", line 148, in run
File "C:\Users\Ahmad\AppData\Local\Temp\easy_install-3yj2htrd\numpy- 1.13.1\numpy\distutils\command\build_src.py", line 159, in build_sources
File "C:\Users\Ahmad\AppData\Local\Temp\easy_install-3yj2htrd\numpy-1.13.1\numpy\distutils\command\build_src.py", line 294, in build_library_sources
File "C:\Users\Ahmad\AppData\Local\Temp\easy_install-3yj2htrd\numpy-1.13.1\numpy\distutils\command\build_src.py", line 377, in generate_sources
File "numpy\core\setup.py", line 672, in get_mathlib_info
File "c:\users\ahmad\appdata\local\programs\python\python35\lib\distutils\command\config.py", line 243, in try_link
self._check_compiler()
File "C:\Users\Ahmad\AppData\Local\Temp\easy_install-3yj2htrd\numpy-1.13.1\numpy\distutils\command\config.py", line 51, in _check_compiler
File "c:\users\ahmad\appdata\local\programs\python\python35\lib\distutils\_msvccompiler.py", line 197, in initialize
vc_env = _get_vc_env(plat_spec)
File "c:\users\ahmad\appdata\local\programs\python\python35\lib\site- packages\setuptools\msvc.py", line 176, in msvc14_get_vc_env
return EnvironmentInfo(plat_spec, vc_min_ver=14.0).return_env()
File "c:\users\ahmad\appdata\local\programs\python\python35\lib\site- packages\setuptools\msvc.py", line 835, in __init__
self.si = SystemInfo(self.ri, vc_ver)
File "c:\users\ahmad\appdata\local\programs\python\python35\lib\site-packages\setuptools\msvc.py", line 477, in __init__
self.vc_ver = vc_ver or self._find_latest_available_vc_ver()
File "c:\users\ahmad\appdata\local\programs\python\python35\lib\site-packages\setuptools\msvc.py", line 484, in _find_latest_available_vc_ver
raise distutils.errors.DistutilsPlatformError(err)
distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\users\ahmad\appdata\local\programs\python\python35\lib\site-packages\setuptools\sandbox.py", line 158, in save_modules
yield saved
File "c:\users\ahmad\appdata\local\programs\python\python35\lib\site-packages\setuptools\sandbox.py", line 199, in setup_context
yield
File "c:\users\ahmad\appdata\local\programs\python\python35\lib\site-packages\setuptools\sandbox.py", line 254, in run_setup
_execfile(setup_script, ns)
File "c:\users\ahmad\appdata\local\programs\python\python35\lib\site-packages\setuptools\sandbox.py", line 49, in _execfile
exec(code, globals, locals)
File "C:\Users\Ahmad\AppData\Local\Temp\easy_install-3yj2htrd\numpy-1.13.1\setup.py", line 392, in <module>
# higher up in this file.
File "C:\Users\Ahmad\AppData\Local\Temp\easy_install-3yj2htrd\numpy-1.13.1\setup.py", line 384, in setup_package
if "--force" in sys.argv:
File "C:\Users\Ahmad\AppData\Local\Temp\easy_install-3yj2htrd\numpy-1.13.1\numpy\distutils\core.py", line 169, in setup
File "c:\users\ahmad\appdata\local\programs\python\python35\lib\distutils\core.py", line 163, in setup
raise SystemExit("error: " + str(msg))
SystemExit: error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\users\ahmad\appdata\local\programs\python\python35\lib\site-packages\setuptools\command\easy_install.py", line 1104, in run_setup
run_setup(setup_script, args)
File "c:\users\ahmad\appdata\local\programs\python\python35\lib\site-packages\setuptools\sandbox.py", line 257, in run_setup
raise
File "c:\users\ahmad\appdata\local\programs\python\python35\lib\contextlib.py", line 77, in __exit__
self.gen.throw(type, value, traceback)
File "c:\users\ahmad\appdata\local\programs\python\python35\lib\site-packages\setuptools\sandbox.py", line 199, in setup_context
yield
File "c:\users\ahmad\appdata\local\programs\python\python35\lib\contextlib.py", line 77, in __exit__
self.gen.throw(type, value, traceback)
File "c:\users\ahmad\appdata\local\programs\python\python35\lib\site-packages\setuptools\sandbox.py", line 170, in save_modules
saved_exc.resume()
File "c:\users\ahmad\appdata\local\programs\python\python35\lib\site-packages\setuptools\sandbox.py", line 145, in resume
six.reraise(type, exc, self._tb)
File "c:\users\ahmad\appdata\local\programs\python\python35\lib\site-packages\pkg_resources\_vendor\six.py", line 685, in reraise
raise value.with_traceback(tb)
File "c:\users\ahmad\appdata\local\programs\python\python35\lib\site-packages\setuptools\sandbox.py", line 158, in save_modules
yield saved
File "c:\users\ahmad\appdata\local\programs\python\python35\lib\site-packages\setuptools\sandbox.py", line 199, in setup_context
yield
File "c:\users\ahmad\appdata\local\programs\python\python35\lib\site-packages\setuptools\sandbox.py", line 254, in run_setup
_execfile(setup_script, ns)
File "c:\users\ahmad\appdata\local\programs\python\python35\lib\site-packages\setuptools\sandbox.py", line 49, in _execfile
exec(code, globals, locals)
File "C:\Users\Ahmad\AppData\Local\Temp\easy_install-3yj2htrd\numpy-1.13.1\setup.py", line 392, in <module>
# higher up in this file.
File "C:\Users\Ahmad\AppData\Local\Temp\easy_install-3yj2htrd\numpy-1.13.1\setup.py", line 384, in setup_package
if "--force" in sys.argv:
File "C:\Users\Ahmad\AppData\Local\Temp\easy_install-3yj2htrd\numpy-1.13.1\numpy\distutils\core.py", line 169, in setup
File "c:\users\ahmad\appdata\local\programs\python\python35\lib\distutils\core.py", line 163, in setup
raise SystemExit("error: " + str(msg))
SystemExit: error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Ahmad\AppData\Local\Temp\pip-build-xgjhugze\scipy\setup.py", line 416, in <module>
setup_package()
File "C:\Users\Ahmad\AppData\Local\Temp\pip-build-xgjhugze\scipy\setup.py", line 412, in setup_package
setup(**metadata)
File "c:\users\ahmad\appdata\local\programs\python\python35\lib\distutils\core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "c:\users\ahmad\appdata\local\programs\python\python35\lib\site-packages\setuptools\dist.py", line 325, in __init__
self.fetch_build_eggs(attrs['setup_requires'])
File "c:\users\ahmad\appdata\local\programs\python\python35\lib\site-packages\setuptools\dist.py", line 446, in fetch_build_eggs
replace_conflicting=True,
File "c:\users\ahmad\appdata\local\programs\python\python35\lib\site-packages\pkg_resources\__init__.py", line 855, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "c:\users\ahmad\appdata\local\programs\python\python35\lib\site-packages\pkg_resources\__init__.py", line 1127, in best_match
return self.obtain(req, installer)
File "c:\users\ahmad\appdata\local\programs\python\python35\lib\site-packages\pkg_resources\__init__.py", line 1139, in obtain
return installer(requirement)
File "c:\users\ahmad\appdata\local\programs\python\python35\lib\site-packages\setuptools\dist.py", line 518, in fetch_build_egg
return cmd.easy_install(req)
File "c:\users\ahmad\appdata\local\programs\python\python35\lib\site-packages\setuptools\command\easy_install.py", line 672, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "c:\users\ahmad\appdata\local\programs\python\python35\lib\site-packages\setuptools\command\easy_install.py", line 698, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "c:\users\ahmad\appdata\local\programs\python\python35\lib\site-packages\setuptools\command\easy_install.py", line 879, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "c:\users\ahmad\appdata\local\programs\python\python35\lib\site-packages\setuptools\command\easy_install.py", line 1118, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "c:\users\ahmad\appdata\local\programs\python\python35\lib\site-packages\setuptools\command\easy_install.py", line 1106, in run_setup
raise DistutilsError("Setup script exited with %s" % (v.args[0],))
distutils.errors.DistutilsError: Setup script exited with error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in
C:\Users\Ahmad\AppData\Local\Temp\pip-build-xgjhugze\scipy\
I dont know if this helps but this is whats inside my pip list:
backports.weakref (1.0rc1)
beautifulsoup4 (4.6.0)
bleach (1.5.0)
bs4 (0.0.1)
certifi (2017.7.27.1)
chardet (3.0.4)
distribute (0.7.3)
ez-setup (0.9)
html5lib (0.9999999)
idna (2.5)
inflection (0.3.1)
Markdown (2.6.8)
more-itertools (3.2.0)
pandas (0.20.3)
pip (9.0.1)
protobuf (3.3.0)
python-dateutil (2.6.1)
pytz (2017.2)
PyYAML (3.12)
Quandl (3.2.0)
requests (2.17.3)
scikit-learn (0.18.2)
setuptools (36.2.7)
six (1.10.0)
sklearn (0.0)
tensorflow (1.2.1)
urllib3 (1.21.1)
Werkzeug (0.12.2)
wheel (0.29.0)
whenever I installed Visual studio again I received this error.
Command "c:\users\ahmad\appdata\local\programs\python\python35\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Ahmad\\AppData\\Local\\Temp\\pip-build-si1p7x2k\\scipy\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\Ahmad\AppData\Local\Temp\pip-zrxmip_u-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Ahmad\AppData\Local\Temp\pip-build-si1p7x2k\scipy\
Thanks for the help By the way!!
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Ahmad\AppData\Local\Temp\pip-build-si1p7x2k\scipy\setup.py", line 416, in <module>
setup_package()
File "C:\Users\Ahmad\AppData\Local\Temp\pip-build-si1p7x2k\scipy\setup.py", line 412, in setup_package
setup(**metadata)
File "c:\users\ahmad\appdata\local\programs\python\python35\lib\site-packages\numpy\distutils\core.py", line 135, in setup
config = configuration()
File "C:\Users\Ahmad\AppData\Local\Temp\pip-build-si1p7x2k\scipy\setup.py", line 336, in configuration
config.add_subpackage('scipy')
File "c:\users\ahmad\appdata\local\programs\python\python35\lib\site-packages\numpy\distutils\misc_util.py", line 1029, in add_subpackage
caller_level = 2)
File "c:\users\ahmad\appdata\local\programs\python\python35\lib\site-packages\numpy\distutils\misc_util.py", line 998, in get_subpackage
caller_level = caller_level + 1)
File "c:\users\ahmad\appdata\local\programs\python\python35\lib\site-packages\numpy\distutils\misc_util.py", line 935, in _get_configuration_from_setup_py
config = setup_module.configuration(*args)
File "scipy\setup.py", line 15, in configuration
config.add_subpackage('linalg')
File "c:\users\ahmad\appdata\local\programs\python\python35\lib\site-packages\numpy\distutils\misc_util.py", line 1029, in add_subpackage
caller_level = 2)
File "c:\users\ahmad\appdata\local\programs\python\python35\lib\site-packages\numpy\distutils\misc_util.py", line 998, in get_subpackage
caller_level = caller_level + 1)
File "c:\users\ahmad\appdata\local\programs\python\python35\lib\site-packages\numpy\distutils\misc_util.py", line 935, in _get_configuration_from_setup_py
config = setup_module.configuration(*args)
File "scipy\linalg\setup.py", line 20, in configuration
raise NotFoundError('no lapack/blas resources found')
numpy.distutils.system_info.NotFoundError: no lapack/blas resources found
I fixed the problem... It was because I wasn't using anaconda. I uninstalled and reinstalled using anaconda and it worked :)
Happy new year,
I tried to install the ggplot on my ubuntu 14.04 and got the following error message (code)
my verson of python-dev 2.7.5-5ubuntu3.
I have already did the following
sudo apt-get update
sudo apt-get upgrade gcc
sudo apt-get install python2.7-dev
william#ubuntu:~$ sudo pip install ggplot
[sudo] password for william:
Downloading/unpacking ggplot
Downloading ggplot-0.6.5.tar.gz (8.4MB): 8.4MB downloaded
Running setup.py (path:/tmp/pip_build_root/ggplot/setup.py) egg_info for package ggplot
Requirement already satisfied (use --upgrade to upgrade): six in /usr/lib/python3/dist-packages (from ggplot)
Downloading/unpacking statsmodels (from ggplot)
Downloading statsmodels-0.6.1.tar.gz (7.0MB): 7.0MB downloaded
Running setup.py (path:/tmp/pip_build_root/statsmodels/setup.py) egg_info for package statsmodels
/bin/sh: 1: svnversion: not found
/bin/sh: 1: svnversion: not found
_configtest.c:1:5: warning: conflicting types for built-in function ‘exp’ [enabled by default]
int exp (void);
^
_configtest.o: In function `main':
/tmp/easy_install-1xuwcszp/numpy-1.9.1/_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’ [enabled by default]
int exp (void);
^
_configtest.c:1:20: fatal error: Python.h: No such file or directory
#include <Python.h>
^
compilation terminated.
Running from numpy source directory.
/tmp/easy_install-1xuwcszp/numpy-1.9.1/numpy/distutils/system_info.py:1526: 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-1xuwcszp/numpy-1.9.1/numpy/distutils/system_info.py:1432: 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__)
/usr/lib/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: 'define_macros'
warnings.warn(msg)
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip_build_root/statsmodels/setup.py", line 449, in <module>
**setuptools_kwargs)
File "/usr/lib/python3.4/distutils/core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/local/lib/python3.4/dist-packages/setuptools/dist.py", line 262, in __init__
self.fetch_build_eggs(attrs['setup_requires'])
File "/usr/local/lib/python3.4/dist-packages/setuptools/dist.py", line 287, in fetch_build_eggs
replace_conflicting=True,
File "/usr/local/lib/python3.4/dist-packages/pkg_resources.py", line 618, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/usr/local/lib/python3.4/dist-packages/pkg_resources.py", line 870, in best_match
return self.obtain(req, installer)
File "/usr/local/lib/python3.4/dist-packages/pkg_resources.py", line 882, in obtain
return installer(requirement)
File "/usr/local/lib/python3.4/dist-packages/setuptools/dist.py", line 338, in fetch_build_egg
return cmd.easy_install(req)
File "/usr/local/lib/python3.4/dist-packages/setuptools/command/easy_install.py", line 613, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/usr/local/lib/python3.4/dist-packages/setuptools/command/easy_install.py", line 643, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/usr/local/lib/python3.4/dist-packages/setuptools/command/easy_install.py", line 833, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/usr/local/lib/python3.4/dist-packages/setuptools/command/easy_install.py", line 1055, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/usr/local/lib/python3.4/dist-packages/setuptools/command/easy_install.py", line 1040, in run_setup
run_setup(setup_script, args)
File "/usr/local/lib/python3.4/dist-packages/setuptools/sandbox.py", line 68, in run_setup
DirectorySandbox(setup_dir).run(runner)
File "/usr/local/lib/python3.4/dist-packages/setuptools/sandbox.py", line 114, in run
return func()
File "/usr/local/lib/python3.4/dist-packages/setuptools/sandbox.py", line 67, in runner
_execfile(setup_script, ns)
File "/usr/local/lib/python3.4/dist-packages/setuptools/sandbox.py", line 43, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-1xuwcszp/numpy-1.9.1/setup.py", line 251, in <module>
self._clean_exclude = ["bspline_ext.c",
File "/tmp/easy_install-1xuwcszp/numpy-1.9.1/setup.py", line 243, in setup_package
"""Custom distutils command to clean the .so and .pyc files."""
File "/tmp/easy_install-1xuwcszp/numpy-1.9.1/numpy/distutils/core.py", line 169, in setup
File "/usr/lib/python3.4/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.4/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.4/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.4/dist-packages/setuptools/command/bdist_egg.py", line 152, in run
self.run_command("egg_info")
File "/usr/lib/python3.4/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.4/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/easy_install-1xuwcszp/numpy-1.9.1/numpy/distutils/command/egg_info.py", line 10, in run
File "/usr/lib/python3.4/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.4/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/easy_install-1xuwcszp/numpy-1.9.1/numpy/distutils/command/build_src.py", line 153, in run
File "/tmp/easy_install-1xuwcszp/numpy-1.9.1/numpy/distutils/command/build_src.py", line 170, in build_sources
File "/tmp/easy_install-1xuwcszp/numpy-1.9.1/numpy/distutils/command/build_src.py", line 329, in build_extension_sources
File "/tmp/easy_install-1xuwcszp/numpy-1.9.1/numpy/distutils/command/build_src.py", line 386, in generate_sources
File "numpy/core/setup.py", line 432, in generate_config_h
File "numpy/core/setup.py", line 42, in check_types
File "numpy/core/setup.py", line 293, in check_types
if not os.path.exists(src):
SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.
non-existing path in 'numpy/distutils': 'site.cfg'
non-existing path in 'numpy/f2py': 'docs'
non-existing path in 'numpy/f2py': 'f2py.1'
non-existing path in 'numpy/lib': 'benchmarks'
_configtest.o: In function `main':
/tmp/easy_install-1xuwcszp/numpy-1.9.1/_configtest.c:6: undefined reference to `exp'
collect2: error: ld returned 1 exit status
_configtest.c:1:20: fatal error: Python.h: No such file or directory
#include <Python.h>
^
compilation terminated.
Complete output from command python setup.py egg_info:
/bin/sh: 1: svnversion: not found
/bin/sh: 1: svnversion: not found
_configtest.c:1:5: warning: conflicting types for built-in function ‘exp’ [enabled by default]
int exp (void);
^
_configtest.o: In function `main':
/tmp/easy_install-1xuwcszp/numpy-1.9.1/_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’ [enabled by default]
int exp (void);
^
_configtest.c:1:20: fatal error: Python.h: No such file or directory
#include <Python.h>
^
compilation terminated.
Running from numpy source directory.
/tmp/easy_install-1xuwcszp/numpy-1.9.1/numpy/distutils/system_info.py:1526: 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-1xuwcszp/numpy-1.9.1/numpy/distutils/system_info.py:1432: 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__)
/usr/lib/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: 'define_macros'
warnings.warn(msg)
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip_build_root/statsmodels/setup.py", line 449, in <module>
**setuptools_kwargs)
File "/usr/lib/python3.4/distutils/core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/local/lib/python3.4/dist-packages/setuptools/dist.py", line 262, in __init__
self.fetch_build_eggs(attrs['setup_requires'])
File "/usr/local/lib/python3.4/dist-packages/setuptools/dist.py", line 287, in fetch_build_eggs
replace_conflicting=True,
File "/usr/local/lib/python3.4/dist-packages/pkg_resources.py", line 618, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/usr/local/lib/python3.4/dist-packages/pkg_resources.py", line 870, in best_match
return self.obtain(req, installer)
File "/usr/local/lib/python3.4/dist-packages/pkg_resources.py", line 882, in obtain
return installer(requirement)
File "/usr/local/lib/python3.4/dist-packages/setuptools/dist.py", line 338, in fetch_build_egg
return cmd.easy_install(req)
File "/usr/local/lib/python3.4/dist-packages/setuptools/command/easy_install.py", line 613, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/usr/local/lib/python3.4/dist-packages/setuptools/command/easy_install.py", line 643, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/usr/local/lib/python3.4/dist-packages/setuptools/command/easy_install.py", line 833, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/usr/local/lib/python3.4/dist-packages/setuptools/command/easy_install.py", line 1055, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/usr/local/lib/python3.4/dist-packages/setuptools/command/easy_install.py", line 1040, in run_setup
run_setup(setup_script, args)
File "/usr/local/lib/python3.4/dist-packages/setuptools/sandbox.py", line 68, in run_setup
DirectorySandbox(setup_dir).run(runner)
File "/usr/local/lib/python3.4/dist-packages/setuptools/sandbox.py", line 114, in run
return func()
File "/usr/local/lib/python3.4/dist-packages/setuptools/sandbox.py", line 67, in runner
_execfile(setup_script, ns)
File "/usr/local/lib/python3.4/dist-packages/setuptools/sandbox.py", line 43, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-1xuwcszp/numpy-1.9.1/setup.py", line 251, in <module>
self._clean_exclude = ["bspline_ext.c",
File "/tmp/easy_install-1xuwcszp/numpy-1.9.1/setup.py", line 243, in setup_package
"""Custom distutils command to clean the .so and .pyc files."""
File "/tmp/easy_install-1xuwcszp/numpy-1.9.1/numpy/distutils/core.py", line 169, in setup
File "/usr/lib/python3.4/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.4/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.4/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.4/dist-packages/setuptools/command/bdist_egg.py", line 152, in run
self.run_command("egg_info")
File "/usr/lib/python3.4/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.4/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/easy_install-1xuwcszp/numpy-1.9.1/numpy/distutils/command/egg_info.py", line 10, in run
File "/usr/lib/python3.4/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.4/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/easy_install-1xuwcszp/numpy-1.9.1/numpy/distutils/command/build_src.py", line 153, in run
File "/tmp/easy_install-1xuwcszp/numpy-1.9.1/numpy/distutils/command/build_src.py", line 170, in build_sources
File "/tmp/easy_install-1xuwcszp/numpy-1.9.1/numpy/distutils/command/build_src.py", line 329, in build_extension_sources
File "/tmp/easy_install-1xuwcszp/numpy-1.9.1/numpy/distutils/command/build_src.py", line 386, in generate_sources
File "numpy/core/setup.py", line 432, in generate_config_h
File "numpy/core/setup.py", line 42, in check_types
File "numpy/core/setup.py", line 293, in check_types
if not os.path.exists(src):
SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.
non-existing path in 'numpy/distutils': 'site.cfg'
non-existing path in 'numpy/f2py': 'docs'
non-existing path in 'numpy/f2py': 'f2py.1'
non-existing path in 'numpy/lib': 'benchmarks'
_configtest.o: In function `main':
/tmp/easy_install-1xuwcszp/numpy-1.9.1/_configtest.c:6: undefined reference to `exp'
collect2: error: ld returned 1 exit status
_configtest.c:1:20: fatal error: Python.h: No such file or directory
#include <Python.h>
^
compilation terminated.
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/statsmodels
Storing debug log for failure in /home/william/.pip/pip.log
william#ubuntu:~$
Many thanks for your help
This is a common error when you're missing the python-dev package. You can install it using:
sudo apt-get install python-dev
Try installing after you have this package.
Edit:
As the other answer mentioned, to get python-dev for python 3:
sudo apt-get install python3-dev
From the paths in that log, it could be that your pip is installing this for Python 3. python-dev won't do in that case, you'd need package python3-dev to get Python.h for Python 3.