0
So I've been struggling to install python pandas that I need to run install another package. I am using Python 3.6 with MobaXTerm. Whenever I type the command to install pandas, I get the following (I attract your attention to the end of the code):
pip3 install pandas
ERROR: Command errored out with exit status 1:
command: /bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-3w3m809i/pandas/setup.py'"'"'; __file__='"'"'/tmp/pip-install-3w3m809i/pandas/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 /tmp/pip-install-3w3m809i/pandas/pip-egg-info
cwd: /tmp/pip-install-3w3m809i/pandas/
Complete output (184 lines):
non-existing path in 'numpy/distutils': 'site.cfg'
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 efl
_configtest.c:1:5: warning: conflicting types for built-in function ‘exp’
int exp (void);
^
In file included from /usr/include/stdio.h:800:0,
from /usr/include/python3.6m/Python.h:25,
from _configtest.c:1:
/lib/gcc/i686-pc-cygwin/4.9.2/include/ssp/stdio.h:38:17: fatal error: ssp.h: No such file or directory
#include <ssp.h>
^
compilation terminated.
Running from numpy source directory.
/tmp/easy_install-9ypi24jl/numpy-1.17.3/setup.py:418: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates
run_build = parse_setuppy_commands()
/tmp/easy_install-9ypi24jl/numpy-1.17.3/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()
/tmp/easy_install-9ypi24jl/numpy-1.17.3/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()
/tmp/easy_install-9ypi24jl/numpy-1.17.3/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()
/tmp/easy_install-9ypi24jl/numpy-1.17.3/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))():
/tmp/easy_install-9ypi24jl/numpy-1.17.3/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))():
/usr/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'define_macros'
warnings.warn(msg)
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/setuptools/sandbox.py", line 154, in save_modules
yield saved
File "/usr/lib/python3.6/site-packages/setuptools/sandbox.py", line 195, in setup_context
yield
File "/usr/lib/python3.6/site-packages/setuptools/sandbox.py", line 250, in run_setup
_execfile(setup_script, ns)
File "/usr/lib/python3.6/site-packages/setuptools/sandbox.py", line 45, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-9ypi24jl/numpy-1.17.3/setup.py", line 443, in <module>
suffix = ".pyx"
File "/tmp/easy_install-9ypi24jl/numpy-1.17.3/setup.py", line 435, in setup_package
File "/tmp/easy_install-9ypi24jl/numpy-1.17.3/numpy/distutils/core.py", line 171, in setup
File "/usr/lib/python3.6/site-packages/setuptools/__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib/python3.6/site-packages/setuptools/command/bdist_egg.py", line 163, in run
self.run_command("egg_info")
File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/easy_install-9ypi24jl/numpy-1.17.3/numpy/distutils/command/egg_info.py", line 26, in run
File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/easy_install-9ypi24jl/numpy-1.17.3/numpy/distutils/command/build_src.py", line 142, in run
File "/tmp/easy_install-9ypi24jl/numpy-1.17.3/numpy/distutils/command/build_src.py", line 159, in build_sources
File "/tmp/easy_install-9ypi24jl/numpy-1.17.3/numpy/distutils/command/build_src.py", line 316, in build_extension_sources
File "/tmp/easy_install-9ypi24jl/numpy-1.17.3/numpy/distutils/command/build_src.py", line 369, in generate_sources
File "numpy/core/setup.py", line 430, in generate_config_h
def initialize_options(self):
File "numpy/core/setup.py", line 49, in check_types
import Cython
File "numpy/core/setup.py", line 288, in check_types
SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-3w3m809i/pandas/setup.py", line 840, in <module>
**setuptools_kwargs
File "/usr/lib/python3.6/site-packages/setuptools/__init__.py", line 144, in setup
_install_setup_requires(attrs)
File "/usr/lib/python3.6/site-packages/setuptools/__init__.py", line 139, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "/usr/lib/python3.6/site-packages/setuptools/dist.py", line 724, in fetch_build_eggs
replace_conflicting=True,
File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 782, in resolve
replace_conflicting=replace_conflicting
File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1065, in best_match
return self.obtain(req, installer)
File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1077, in obtain
return installer(requirement)
File "/usr/lib/python3.6/site-packages/setuptools/dist.py", line 791, in fetch_build_egg
return cmd.easy_install(req)
File "/usr/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 679, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/usr/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 705, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/usr/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 890, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/usr/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 1158, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/usr/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 1144, in run_setup
run_setup(setup_script, args)
File "/usr/lib/python3.6/site-packages/setuptools/sandbox.py", line 253, in run_setup
raise
File "/usr/lib/python3.6/contextlib.py", line 99, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/lib/python3.6/site-packages/setuptools/sandbox.py", line 195, in setup_context
yield
File "/usr/lib/python3.6/contextlib.py", line 99, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/lib/python3.6/site-packages/setuptools/sandbox.py", line 166, in save_modules
saved_exc.resume()
File "/usr/lib/python3.6/site-packages/setuptools/sandbox.py", line 141, in resume
six.reraise(type, exc, self._tb)
File "/usr/lib/python3.6/site-packages/setuptools/_vendor/six.py", line 685, in reraise
raise value.with_traceback(tb)
File "/usr/lib/python3.6/site-packages/setuptools/sandbox.py", line 154, in save_modules
yield saved
File "/usr/lib/python3.6/site-packages/setuptools/sandbox.py", line 195, in setup_context
yield
File "/usr/lib/python3.6/site-packages/setuptools/sandbox.py", line 250, in run_setup
_execfile(setup_script, ns)
File "/usr/lib/python3.6/site-packages/setuptools/sandbox.py", line 45, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-9ypi24jl/numpy-1.17.3/setup.py", line 443, in <module>
suffix = ".pyx"
File "/tmp/easy_install-9ypi24jl/numpy-1.17.3/setup.py", line 435, in setup_package
File "/tmp/easy_install-9ypi24jl/numpy-1.17.3/numpy/distutils/core.py", line 171, in setup
File "/usr/lib/python3.6/site-packages/setuptools/__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib/python3.6/site-packages/setuptools/command/bdist_egg.py", line 163, in run
self.run_command("egg_info")
File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/easy_install-9ypi24jl/numpy-1.17.3/numpy/distutils/command/egg_info.py", line 26, in run
File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/easy_install-9ypi24jl/numpy-1.17.3/numpy/distutils/command/build_src.py", line 142, in run
File "/tmp/easy_install-9ypi24jl/numpy-1.17.3/numpy/distutils/command/build_src.py", line 159, in build_sources
File "/tmp/easy_install-9ypi24jl/numpy-1.17.3/numpy/distutils/command/build_src.py", line 316, in build_extension_sources
File "/tmp/easy_install-9ypi24jl/numpy-1.17.3/numpy/distutils/command/build_src.py", line 369, in generate_sources
File "numpy/core/setup.py", line 430, in generate_config_h
def initialize_options(self):
File "numpy/core/setup.py", line 49, in check_types
import Cython
File "numpy/core/setup.py", line 288, in check_types
SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.-
So it seems, from the last few lines, that Python.h cannot be compiled. I do however have the python-devel package (and python dev does not exist, probably another name?). I also have the plug-ins of usual development (C,C++,GCC), GFortran and SVN. The numpy package (which comes up in the error message) is installed.
I cannot really comprehend a way around this, my previous error messages were fixed by installing the suggested packages, but this one's solid...
I believe that installing Pandas on Moba has been done before, does anyone have an idea? Any input is welcome.
Best wishes,
Soto