Can't install modules? "ModuleNotFoundError: No Module Named Cython" - python

I have just installed python 3.8 and am using pycharm community edition as an interface. This has not happened previously, but when I install "pandas" module i receive the following error:
Executed command:
pip install pandas
"Try to run this command from the system terminal. Make sure that you use the correct version of 'pip' installed for your Python interpreter located at 'C:\Users\SMafl\PycharmProjects\venv\Scripts\python.exe'.
File "C:\Users\SMafl\PycharmProjects\venv\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\dist.py", line 721, in fetch_build_eggs
File "C:\Users\SMafl\PycharmProjects\venv\lib\site-packages\setuptools-40.8.0-py3.8.egg\pkg_resources\__init__.py", line 780, in resolve
File "C:\Users\SMafl\PycharmProjects\venv\lib\site-packages\setuptools-40.8.0-py3.8.egg\pkg_resources\__init__.py", line 1065, in best_match
File "C:\Users\SMafl\PycharmProjects\venv\lib\site-packages\setuptools-40.8.0-py3.8.egg\pkg_resources\__init__.py", line 1077, in obtain
File "C:\Users\SMafl\PycharmProjects\venv\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\dist.py", line 791, in fetch_build_egg
File "C:\Users\SMafl\PycharmProjects\venv\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\command\easy_install.py", line 679, in easy_install
File "C:\Users\SMafl\PycharmProjects\venv\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\command\easy_install.py", line 705, in install_item
File "C:\Users\SMafl\PycharmProjects\venv\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\command\easy_install.py", line 890, in install_eggs
File "C:\Users\SMafl\PycharmProjects\venv\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\command\easy_install.py", line 1158, in build_and_install
File "C:\Users\SMafl\PycharmProjects\venv\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\command\easy_install.py", line 1144, in run_setup
File "C:\Users\SMafl\PycharmProjects\venv\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\sandbox.py", line 253, in run_setup
File "C:\Users\SMafl\AppData\Local\Programs\Python\Python38\lib\contextlib.py", line 131, in __exit__
self.gen.throw(type, value, traceback)
File "C:\Users\SMafl\PycharmProjects\venv\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\sandbox.py", line 195, in setup_context
File "C:\Users\SMafl\AppData\Local\Programs\Python\Python38\lib\contextlib.py", line 131, in __exit__
self.gen.throw(type, value, traceback)
File "C:\Users\SMafl\PycharmProjects\venv\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\sandbox.py", line 166, in save_modules
File "C:\Users\SMafl\PycharmProjects\venv\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\sandbox.py", line 141, in resume
File "C:\Users\SMafl\PycharmProjects\venv\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\_vendor\six.py", line 685, in reraise
File "C:\Users\SMafl\PycharmProjects\venv\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\sandbox.py", line 154, in save_modules
File "C:\Users\SMafl\PycharmProjects\venv\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\sandbox.py", line 195, in setup_context
File "C:\Users\SMafl\PycharmProjects\venv\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\sandbox.py", line 250, in run_setup
File "C:\Users\SMafl\PycharmProjects\venv\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\sandbox.py", line 45, in _execfile
File "C:\Users\SMafl\AppData\Local\Temp\easy_install-av09bwyr\numpy-1.18.0\setup.py", line 450, in <module>
File "C:\Users\SMafl\AppData\Local\Temp\easy_install-av09bwyr\numpy-1.18.0\setup.py", line 433, in setup_package
def finalize_options(self):
File "C:\Users\SMafl\AppData\Local\Temp\easy_install-av09bwyr\numpy-1.18.0\setup.py", line 240, in generate_cython
"""Custom distutils command to clean the .so and .pyc files."""
RuntimeError: Running cythonize failed!
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\SMafl\AppData\Local\Temp\pycharm-packaging\pandas\

Related

Pip seems not to be installing module in setup.py

I have a setup.py file that looks like this:
from setuptools import setup
setup(
name='yeet',
install_requires=[
'cmake>=3.15.3',
'Cython>=0.29.21',
'glob2>=0.6',
'hdbscan>=0.8.24',
],
)
When I run python setup.py install using a Python 3.7 conda environment, I get:
Traceback (most recent call last):
File "setup.py", line 66, in <module>
'pixplot=pixplot:parse',
File "/Users/doug/anaconda/envs/3.7/lib/python3.7/site-packages/setuptools/__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/Users/doug/anaconda/envs/3.7/lib/python3.7/distutils/core.py", line 148, in setup
dist.run_commands()
File "/Users/doug/anaconda/envs/3.7/lib/python3.7/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/Users/doug/anaconda/envs/3.7/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Users/doug/anaconda/envs/3.7/lib/python3.7/site-packages/setuptools/command/install.py", line 67, in run
self.do_egg_install()
File "/Users/doug/anaconda/envs/3.7/lib/python3.7/site-packages/setuptools/command/install.py", line 117, in do_egg_install
cmd.run(show_deprecation=False)
File "/Users/doug/anaconda/envs/3.7/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 408, in run
self.easy_install(spec, not self.no_deps)
File "/Users/doug/anaconda/envs/3.7/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 650, in easy_install
return self.install_item(None, spec, tmpdir, deps, True)
File "/Users/doug/anaconda/envs/3.7/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 697, in install_item
self.process_distribution(spec, dist, deps)
File "/Users/doug/anaconda/envs/3.7/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 742, in process_distribution
[requirement], self.local_index, self.easy_install
File "/Users/doug/anaconda/envs/3.7/lib/python3.7/site-packages/pkg_resources/__init__.py", line 766, in resolve
replace_conflicting=replace_conflicting
File "/Users/doug/anaconda/envs/3.7/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1049, in best_match
return self.obtain(req, installer)
File "/Users/doug/anaconda/envs/3.7/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1061, in obtain
return installer(requirement)
File "/Users/doug/anaconda/envs/3.7/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 669, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/Users/doug/anaconda/envs/3.7/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 695, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/Users/doug/anaconda/envs/3.7/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 880, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/Users/doug/anaconda/envs/3.7/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 1150, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/Users/doug/anaconda/envs/3.7/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 1134, in run_setup
run_setup(setup_script, args)
File "/Users/doug/anaconda/envs/3.7/lib/python3.7/site-packages/setuptools/sandbox.py", line 257, in run_setup
raise
File "/Users/doug/anaconda/envs/3.7/lib/python3.7/contextlib.py", line 130, in __exit__
self.gen.throw(type, value, traceback)
File "/Users/doug/anaconda/envs/3.7/lib/python3.7/site-packages/setuptools/sandbox.py", line 193, in setup_context
yield
File "/Users/doug/anaconda/envs/3.7/lib/python3.7/contextlib.py", line 130, in __exit__
self.gen.throw(type, value, traceback)
File "/Users/doug/anaconda/envs/3.7/lib/python3.7/site-packages/setuptools/sandbox.py", line 164, in save_modules
saved_exc.resume()
File "/Users/doug/anaconda/envs/3.7/lib/python3.7/site-packages/setuptools/sandbox.py", line 139, in resume
raise exc.with_traceback(self._tb)
File "/Users/doug/anaconda/envs/3.7/lib/python3.7/site-packages/setuptools/sandbox.py", line 152, in save_modules
yield saved
File "/Users/doug/anaconda/envs/3.7/lib/python3.7/site-packages/setuptools/sandbox.py", line 193, in setup_context
yield
File "/Users/doug/anaconda/envs/3.7/lib/python3.7/site-packages/setuptools/sandbox.py", line 254, in run_setup
_execfile(setup_script, ns)
File "/Users/doug/anaconda/envs/3.7/lib/python3.7/site-packages/setuptools/sandbox.py", line 43, in _execfile
exec(code, globals, locals)
File "/var/folders/cy/ywx04ttn12n_xmgjf5s6sbzr0000gn/T/easy_install-ogn8e84n/hdbscan-0.8.26/setup.py", line 94, in <module>
ImportError: Cython not found! Please install cython and try again
Does anyone know why Cython isn't installed, given the fact that it's in my setup.py file? I know I can install Cython, but I'd like to prevent users from hitting this snag. Is the solution here for hdbscan to add Cython to its list of dependencies? Any pointers others can offer would be hugely appreciated!
I think you should try something like this.
from setuptools import setup, Extension
setup(
...
setup_requires=[
'setuptools>= 50.3.0',
'cython',
or something like this.
from setuptools import dist
dist.Distribution().fetch_build_eggs('Cython>=0.29.21')
Look in to the following post for more details.
https://luminousmen.com/post/resolve-cython-and-numpy-dependencies

pip install pandas without upgrading pip

I am now trying to run a program on a super computer on which I cannot run sudo or easy_install. The program needs pandas so I need to pip install pandas but I keep getting this error message even thought I have tried "pip install --upgrade pip" already.
You are using pip version 8.1.2, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
--edit--
Here is the error message when I pip3 install pandas.
pip3 install pandas
Collecting pandas
Using cached pandas-0.22.0.tar.gz
Complete output from command python setup.py egg_info:
Running from numpy source directory.
/tmp/easy_install-gv5il123/numpy-1.14.1/setup.py:369: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates
run_build = parse_setuppy_commands()
/usr/lib64/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: 'python_requires'
warnings.warn(msg)
/tmp/easy_install-gv5il123/numpy-1.14.1/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()
/usr/lib64/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: 'python_requires'
warnings.warn(msg)
/usr/lib64/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: 'define_macros'
warnings.warn(msg)
Traceback (most recent call last):
File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 154, in save_modules
yield saved
File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 195, in setup_context
yield
File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 239, in run_setup
DirectorySandbox(setup_dir).run(runner)
File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 269, in run
return func()
File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 238, in runner
_execfile(setup_script, ns)
File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 46, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-gv5il123/numpy-1.14.1/setup.py", line 394, in <module>
File "/tmp/easy_install-gv5il123/numpy-1.14.1/setup.py", line 386, in setup_package
File "/tmp/easy_install-gv5il123/numpy-1.14.1/numpy/distutils/core.py", line 169, in setup
File "/usr/lib64/python3.4/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib64/python3.4/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib64/python3.4/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib/python3.4/site-packages/setuptools/command/bdist_egg.py", line 151, in run
self.run_command("egg_info")
File "/usr/lib64/python3.4/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib64/python3.4/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/easy_install-gv5il123/numpy-1.14.1/numpy/distutils/command/egg_info.py", line 26, in run
File "/usr/lib64/python3.4/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib64/python3.4/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/easy_install-gv5il123/numpy-1.14.1/numpy/distutils/command/build_src.py", line 148, in run
File "/tmp/easy_install-gv5il123/numpy-1.14.1/numpy/distutils/command/build_src.py", line 165, in build_sources
File "/tmp/easy_install-gv5il123/numpy-1.14.1/numpy/distutils/command/build_src.py", line 324, in build_extension_sources
File "/tmp/easy_install-gv5il123/numpy-1.14.1/numpy/distutils/command/build_src.py", line 377, in generate_sources
File "numpy/core/setup.py", line 422, in generate_config_h
return tag
File "numpy/core/setup.py", line 48, in check_types
min_numpy_ver = '1.9.0'
File "numpy/core/setup.py", line 281, in check_types
pjoin(ujson_lib,'ultrajsondec.c'),
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-build-xqyfs1o1/pandas/setup.py", line 743, in <module>
**setuptools_kwargs)
File "/usr/lib64/python3.4/distutils/core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/lib/python3.4/site-packages/setuptools/dist.py", line 268, in __init__
self.fetch_build_eggs(attrs['setup_requires'])
File "/usr/lib/python3.4/site-packages/setuptools/dist.py", line 312, in fetch_build_eggs
replace_conflicting=True,
File "/usr/lib/python3.4/site-packages/pkg_resources/__init__.py", line 846, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/usr/lib/python3.4/site-packages/pkg_resources/__init__.py", line 1091, in best_match
return self.obtain(req, installer)
File "/usr/lib/python3.4/site-packages/pkg_resources/__init__.py", line 1103, in obtain
return installer(requirement)
File "/usr/lib/python3.4/site-packages/setuptools/dist.py", line 379, in fetch_build_egg
return cmd.easy_install(req)
File "/usr/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 638, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/usr/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 668, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/usr/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 851, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/usr/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 1079, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/usr/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 1065, in run_setup
run_setup(setup_script, args)
File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 242, in run_setup
raise
File "/usr/lib64/python3.4/contextlib.py", line 77, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 195, in setup_context
yield
File "/usr/lib64/python3.4/contextlib.py", line 77, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 166, in save_modules
saved_exc.resume()
File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 141, in resume
compat.reraise(type, exc, self._tb)
File "/usr/lib/python3.4/site-packages/setuptools/compat.py", line 69, in reraise
raise value.with_traceback(tb)
File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 154, in save_modules
yield saved
File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 195, in setup_context
yield
File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 239, in run_setup
DirectorySandbox(setup_dir).run(runner)
File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 269, in run
return func()
File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 238, in runner
_execfile(setup_script, ns)
File "/usr/lib/python3.4/site-packages/setuptools/sandbox.py", line 46, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-gv5il123/numpy-1.14.1/setup.py", line 394, in <module>
File "/tmp/easy_install-gv5il123/numpy-1.14.1/setup.py", line 386, in setup_package
File "/tmp/easy_install-gv5il123/numpy-1.14.1/numpy/distutils/core.py", line 169, in setup
File "/usr/lib64/python3.4/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib64/python3.4/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib64/python3.4/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib/python3.4/site-packages/setuptools/command/bdist_egg.py", line 151, in run
self.run_command("egg_info")
File "/usr/lib64/python3.4/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib64/python3.4/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/easy_install-gv5il123/numpy-1.14.1/numpy/distutils/command/egg_info.py", line 26, in run
File "/usr/lib64/python3.4/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib64/python3.4/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/easy_install-gv5il123/numpy-1.14.1/numpy/distutils/command/build_src.py", line 148, in run
File "/tmp/easy_install-gv5il123/numpy-1.14.1/numpy/distutils/command/build_src.py", line 165, in build_sources
File "/tmp/easy_install-gv5il123/numpy-1.14.1/numpy/distutils/command/build_src.py", line 324, in build_extension_sources
File "/tmp/easy_install-gv5il123/numpy-1.14.1/numpy/distutils/command/build_src.py", line 377, in generate_sources
File "numpy/core/setup.py", line 422, in generate_config_h
return tag
File "numpy/core/setup.py", line 48, in check_types
min_numpy_ver = '1.9.0'
File "numpy/core/setup.py", line 281, in check_types
pjoin(ujson_lib,'ultrajsondec.c'),
SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.
/tmp/easy_install-gv5il123/numpy-1.14.1/temp/tmpsx06jzi5/source.c:1:19: fatal error: cblas.h: No such file or directory
#include <cblas.h>
^
compilation terminated.
/tmp/easy_install-gv5il123/numpy-1.14.1/temp/tmpsx06jzi5/source.c:1:19: fatal error: cblas.h: No such file or directory
#include <cblas.h>
^
compilation terminated.
non-existing path in 'numpy/distutils': 'site.cfg'
_configtest.c:1:5: warning: conflicting types for built-in function ‘exp’
int exp (void);
^~~
_configtest.o: In function `main':
/tmp/easy_install-gv5il123/numpy-1.14.1/_configtest.c:6: undefined reference to `exp'
collect2: error: ld returned 1 exit status
_configtest.o: In function `main':
/tmp/easy_install-gv5il123/numpy-1.14.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’
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.
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in
/tmp/pip-build-xqyfs1o1/pandas/
You are using pip version 8.1.2, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
You are missing the packages python-dev and python-devel.
But since you are not root on that server you probably cannot install them yourself. Basically you could ask the administrator if he could install them for you.
I would recommend installing a local version of Python and install the packages there.
By the way: Since you are not root pip would fail anyways since you probably do not have the right to globally install packages. You should use pip install <package> --user instead.

Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 while Installing PyNaCl

I'm trying to install PyNaCl on Ubuntu 16.04 and I'm getting the error on the title; this is the whole traceback:
Collecting PyNaCl
Using cached PyNaCl-1.0.1.tar.gz
Complete output from command python setup.py egg_info:
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
warning: build_py: byte-compiling is disabled, skipping.
c/_cffi_backend.c:15:17: fatal error: ffi.h: No such file or directory
compilation terminated.
Traceback (most recent call last):
File "/usr/lib/python3.5/distutils/unixccompiler.py", line 118, in _compile
extra_postargs)
File "/usr/lib/python3.5/distutils/ccompiler.py", line 909, in spawn
spawn(cmd, dry_run=self.dry_run)
File "/usr/lib/python3.5/distutils/spawn.py", line 36, in spawn
_spawn_posix(cmd, search_path, dry_run=dry_run)
File "/usr/lib/python3.5/distutils/spawn.py", line 159, in _spawn_posix
% (cmd, exit_status))
distutils.errors.DistutilsExecError: command 'x86_64-linux-gnu-gcc' failed with exit status 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.5/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.5/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/home/miguel/PycharmProjects/Crossed/Crossedenv/lib/python3.5/site-packages/setuptools/command/bdist_egg.py", line 161, in run
cmd = self.call_command('install_lib', warn_dir=0)
File "/home/miguel/PycharmProjects/Crossed/Crossedenv/lib/python3.5/site-packages/setuptools/command/bdist_egg.py", line 147, in call_command
self.run_command(cmdname)
File "/usr/lib/python3.5/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/home/miguel/PycharmProjects/Crossed/Crossedenv/lib/python3.5/site-packages/setuptools/command/install_lib.py", line 11, in run
self.build()
File "/usr/lib/python3.5/distutils/command/install_lib.py", line 109, in build
self.run_command('build_ext')
File "/usr/lib/python3.5/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/home/miguel/PycharmProjects/Crossed/Crossedenv/lib/python3.5/site-packages/setuptools/command/build_ext.py", line 75, in run
_build_ext.run(self)
File "/usr/lib/python3.5/distutils/command/build_ext.py", line 338, in run
self.build_extensions()
File "/usr/lib/python3.5/distutils/command/build_ext.py", line 447, in build_extensions
self._build_extensions_serial()
File "/usr/lib/python3.5/distutils/command/build_ext.py", line 472, in _build_extensions_serial
self.build_extension(ext)
File "/home/miguel/PycharmProjects/Crossed/Crossedenv/lib/python3.5/site-packages/setuptools/command/build_ext.py", line 196, in build_extension
_build_ext.build_extension(self, ext)
File "/usr/lib/python3.5/distutils/command/build_ext.py", line 532, in build_extension
depends=ext.depends)
File "/usr/lib/python3.5/distutils/ccompiler.py", line 574, in compile
self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
File "/usr/lib/python3.5/distutils/unixccompiler.py", line 120, in _compile
raise CompileError(msg)
distutils.errors.CompileError: command 'x86_64-linux-gnu-gcc' failed with exit status 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/miguel/PycharmProjects/Crossed/Crossedenv/lib/python3.5/site-packages/setuptools/sandbox.py", line 157, in save_modules
yield saved
File "/home/miguel/PycharmProjects/Crossed/Crossedenv/lib/python3.5/site-packages/setuptools/sandbox.py", line 198, in setup_context
yield
File "/home/miguel/PycharmProjects/Crossed/Crossedenv/lib/python3.5/site-packages/setuptools/sandbox.py", line 248, in run_setup
DirectorySandbox(setup_dir).run(runner)
File "/home/miguel/PycharmProjects/Crossed/Crossedenv/lib/python3.5/site-packages/setuptools/sandbox.py", line 278, in run
return func()
File "/home/miguel/PycharmProjects/Crossed/Crossedenv/lib/python3.5/site-packages/setuptools/sandbox.py", line 246, in runner
_execfile(setup_script, ns)
File "/home/miguel/PycharmProjects/Crossed/Crossedenv/lib/python3.5/site-packages/setuptools/sandbox.py", line 47, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-ek_ikn33/cffi-1.8.3/setup.py", line 193, in <module>
subprocess.check_call(["make", "check"], cwd=build_temp)
File "/usr/lib/python3.5/distutils/core.py", line 163, in setup
raise SystemExit("error: " + str(msg))
SystemExit: error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/miguel/PycharmProjects/Crossed/Crossedenv/lib/python3.5/site-packages/setuptools/command/easy_install.py", line 1101, in run_setup
run_setup(setup_script, args)
File "/home/miguel/PycharmProjects/Crossed/Crossedenv/lib/python3.5/site-packages/setuptools/sandbox.py", line 251, in run_setup
raise
File "/usr/lib/python3.5/contextlib.py", line 77, in __exit__
self.gen.throw(type, value, traceback)
File "/home/miguel/PycharmProjects/Crossed/Crossedenv/lib/python3.5/site-packages/setuptools/sandbox.py", line 198, in setup_context
yield
File "/usr/lib/python3.5/contextlib.py", line 77, in __exit__
self.gen.throw(type, value, traceback)
File "/home/miguel/PycharmProjects/Crossed/Crossedenv/lib/python3.5/site-packages/setuptools/sandbox.py", line 169, in save_modules
saved_exc.resume()
File "/home/miguel/PycharmProjects/Crossed/Crossedenv/lib/python3.5/site-packages/setuptools/sandbox.py", line 144, in resume
six.reraise(type, exc, self._tb)
File "/home/miguel/PycharmProjects/Crossed/Crossedenv/lib/python3.5/site-packages/pkg_resources/_vendor/six.py", line 685, in reraise
raise value.with_traceback(tb)
File "/home/miguel/PycharmProjects/Crossed/Crossedenv/lib/python3.5/site-packages/setuptools/sandbox.py", line 157, in save_modules
yield saved
File "/home/miguel/PycharmProjects/Crossed/Crossedenv/lib/python3.5/site-packages/setuptools/sandbox.py", line 198, in setup_context
yield
File "/home/miguel/PycharmProjects/Crossed/Crossedenv/lib/python3.5/site-packages/setuptools/sandbox.py", line 248, in run_setup
DirectorySandbox(setup_dir).run(runner)
File "/home/miguel/PycharmProjects/Crossed/Crossedenv/lib/python3.5/site-packages/setuptools/sandbox.py", line 278, in run
return func()
File "/home/miguel/PycharmProjects/Crossed/Crossedenv/lib/python3.5/site-packages/setuptools/sandbox.py", line 246, in runner
_execfile(setup_script, ns)
File "/home/miguel/PycharmProjects/Crossed/Crossedenv/lib/python3.5/site-packages/setuptools/sandbox.py", line 47, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-ek_ikn33/cffi-1.8.3/setup.py", line 193, in <module>
subprocess.check_call(["make", "check"], cwd=build_temp)
File "/usr/lib/python3.5/distutils/core.py", line 163, in setup
raise SystemExit("error: " + str(msg))
SystemExit: error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pycharm-packaging/PyNaCl/setup.py", line 259, in <module>
"Programming Language :: Python :: 3.5",
File "/usr/lib/python3.5/distutils/core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "/home/miguel/PycharmProjects/Crossed/Crossedenv/lib/python3.5/site-packages/setuptools/dist.py", line 315, in __init__
self.fetch_build_eggs(attrs['setup_requires'])
File "/home/miguel/PycharmProjects/Crossed/Crossedenv/lib/python3.5/site-packages/setuptools/dist.py", line 361, in fetch_build_eggs
replace_conflicting=True,
File "/home/miguel/PycharmProjects/Crossed/Crossedenv/lib/python3.5/site-packages/pkg_resources/__init__.py", line 826, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/home/miguel/PycharmProjects/Crossed/Crossedenv/lib/python3.5/site-packages/pkg_resources/__init__.py", line 1092, in best_match
return self.obtain(req, installer)
File "/home/miguel/PycharmProjects/Crossed/Crossedenv/lib/python3.5/site-packages/pkg_resources/__init__.py", line 1104, in obtain
return installer(requirement)
File "/home/miguel/PycharmProjects/Crossed/Crossedenv/lib/python3.5/site-packages/setuptools/dist.py", line 429, in fetch_build_egg
return cmd.easy_install(req)
File "/home/miguel/PycharmProjects/Crossed/Crossedenv/lib/python3.5/site-packages/setuptools/command/easy_install.py", line 665, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/home/miguel/PycharmProjects/Crossed/Crossedenv/lib/python3.5/site-packages/setuptools/command/easy_install.py", line 695, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/home/miguel/PycharmProjects/Crossed/Crossedenv/lib/python3.5/site-packages/setuptools/command/easy_install.py", line 876, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/home/miguel/PycharmProjects/Crossed/Crossedenv/lib/python3.5/site-packages/setuptools/command/easy_install.py", line 1115, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/home/miguel/PycharmProjects/Crossed/Crossedenv/lib/python3.5/site-packages/setuptools/command/easy_install.py", line 1103, in run_setup
raise DistutilsError("Setup script exited with %s" % (v.args[0],))
distutils.errors.DistutilsError: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pycharm-packaging/PyNaCl/
I searched some workarounds that worked for other people but they're for oter packages and didn't work for me. Thanks for any help.
Looks like you are missing CFFI, which also has a couple of dependencies. According to this you need to install a couple of dependencies, probably python-dev and libffi-dev.

How do I install scipy and numpy with setuptools

I am developing a python 3.4 module which has scipy and numpy as dependencies. So I declared them in my setup.py under install_requires.
Here is the minimum running example of my setup.py
from setuptools import setup
setup(
name='MyModule',
version='1.0.5',
author='Alexander Mueller',
packages=[],
scripts=[],
license='LICENSE.txt',
description='Stuff',
install_requires=[
"pandas == 0.15.2",
"scikit-learn==0.17",
"seaborn == 0.5.1",
"scipy == 0.17.0",
"numpy==1.10.4"
]
)
While running python setup.py install the following exception occurs.
However, when I install all those packages in order with pip install, no error occurs at all. Might be easy_install the problem?
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "setup.py", line 16, in <module>
"numpy==1.10.4"
File "/usr/local/Cellar/python3/3.4.3_2/Frameworks/Python.framework/Versions/3.4/lib/python3.4/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/local/Cellar/python3/3.4.3_2/Frameworks/Python.framework/Versions/3.4/lib/python3.4/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/local/Cellar/python3/3.4.3_2/Frameworks/Python.framework/Versions/3.4/lib/python3.4/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/Users/alexandermueller/.virtualenvs/fpm_test3/lib/python3.4/site-packages/setuptools/command/install.py", line 67, in run
self.do_egg_install()
File "/Users/alexandermueller/.virtualenvs/fpm_test3/lib/python3.4/site-packages/setuptools/command/install.py", line 117, in do_egg_install
cmd.run()
File "/Users/alexandermueller/.virtualenvs/fpm_test3/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 380, in run
self.easy_install(spec, not self.no_deps)
File "/Users/alexandermueller/.virtualenvs/fpm_test3/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 610, in easy_install
return self.install_item(None, spec, tmpdir, deps, True)
File "/Users/alexandermueller/.virtualenvs/fpm_test3/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 661, in install_item
self.process_distribution(spec, dist, deps)
File "/Users/alexandermueller/.virtualenvs/fpm_test3/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 709, in process_distribution
[requirement], self.local_index, self.easy_install
File "/Users/alexandermueller/.virtualenvs/fpm_test3/lib/python3.4/site-packages/pkg_resources/__init__.py", line 830, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/Users/alexandermueller/.virtualenvs/fpm_test3/lib/python3.4/site-packages/pkg_resources/__init__.py", line 1075, in best_match
return self.obtain(req, installer)
File "/Users/alexandermueller/.virtualenvs/fpm_test3/lib/python3.4/site-packages/pkg_resources/__init__.py", line 1087, in obtain
return installer(requirement)
File "/Users/alexandermueller/.virtualenvs/fpm_test3/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 629, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/Users/alexandermueller/.virtualenvs/fpm_test3/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 659, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/Users/alexandermueller/.virtualenvs/fpm_test3/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 842, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/Users/alexandermueller/.virtualenvs/fpm_test3/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 1070, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/Users/alexandermueller/.virtualenvs/fpm_test3/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 1056, in run_setup
run_setup(setup_script, args)
File "/Users/alexandermueller/.virtualenvs/fpm_test3/lib/python3.4/site-packages/setuptools/sandbox.py", line 240, in run_setup
raise
File "/usr/local/Cellar/python3/3.4.3_2/Frameworks/Python.framework/Versions/3.4/lib/python3.4/contextlib.py", line 77, in __exit__
self.gen.throw(type, value, traceback)
File "/Users/alexandermueller/.virtualenvs/fpm_test3/lib/python3.4/site-packages/setuptools/sandbox.py", line 193, in setup_context
yield
File "/usr/local/Cellar/python3/3.4.3_2/Frameworks/Python.framework/Versions/3.4/lib/python3.4/contextlib.py", line 77, in __exit__
self.gen.throw(type, value, traceback)
File "/Users/alexandermueller/.virtualenvs/fpm_test3/lib/python3.4/site-packages/setuptools/sandbox.py", line 164, in save_modules
saved_exc.resume()
File "/Users/alexandermueller/.virtualenvs/fpm_test3/lib/python3.4/site-packages/setuptools/sandbox.py", line 139, in resume
compat.reraise(type, exc, self._tb)
File "/Users/alexandermueller/.virtualenvs/fpm_test3/lib/python3.4/site-packages/setuptools/compat.py", line 65, in reraise
raise value.with_traceback(tb)
File "/Users/alexandermueller/.virtualenvs/fpm_test3/lib/python3.4/site-packages/setuptools/sandbox.py", line 152, in save_modules
yield saved
File "/Users/alexandermueller/.virtualenvs/fpm_test3/lib/python3.4/site-packages/setuptools/sandbox.py", line 193, in setup_context
yield
File "/Users/alexandermueller/.virtualenvs/fpm_test3/lib/python3.4/site-packages/setuptools/sandbox.py", line 237, in run_setup
DirectorySandbox(setup_dir).run(runner)
File "/Users/alexandermueller/.virtualenvs/fpm_test3/lib/python3.4/site-packages/setuptools/sandbox.py", line 267, in run
return func()
File "/Users/alexandermueller/.virtualenvs/fpm_test3/lib/python3.4/site-packages/setuptools/sandbox.py", line 236, in runner
_execfile(setup_script, ns)
File "/Users/alexandermueller/.virtualenvs/fpm_test3/lib/python3.4/site-packages/setuptools/sandbox.py", line 46, in _execfile
exec(code, globals, locals)
File "/var/folders/b0/_y4bfk6x4bldrmtycxhmbtrm0000gn/T/easy_install-drrk1iwn/scipy-0.17.0/setup.py", line 265, in <module>
File "/var/folders/b0/_y4bfk6x4bldrmtycxhmbtrm0000gn/T/easy_install-drrk1iwn/scipy-0.17.0/setup.py", line 253, in setup_package
ImportError: No module named 'numpy'
Thank you guys in advance.
Order seems to matter here, with this order the required packages were installed
install_requires=[
"numpy == 1.10.4",
"pandas == 0.15.2",
"seaborn == 0.5.1",
"scipy == 0.17.0",
"scikit-learn == 0.17"
]
Tested with pip3 1.5.4, xubuntu 14.04

pip install requirement fails

I am facing an issue while trying to install the requirements for my django project.
I am unable to figure out why I'm getting this error.
Can someone lead me in the right direction?
>Running setup.py egg_info for package django-staticfiles
Traceback (most recent call last):
File "<string>", line 14, in <module>
File "/Users/glosseyvilly/Desktop/Workspace/chris_dev/mysite-env/build/django-staticfiles/setup.py", line 128, in <module>
'versiontools >= 1.6',
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/core.py", line 113, in setup
_setup_distribution = dist = klass(attrs)
File "build/bdist.linux-i686/egg/setuptools/dist.py", line 260, in __init__
File "build/bdist.linux-i686/egg/setuptools/dist.py", line 284, in fetch_build_eggs
File "build/bdist.linux-i686/egg/pkg_resources.py", line 563, in resolve
plugin_projects = list(plugin_env)
File "build/bdist.linux-i686/egg/pkg_resources.py", line 799, in best_match
File "build/bdist.linux-i686/egg/pkg_resources.py", line 811, in obtain
File "build/bdist.linux-i686/egg/setuptools/dist.py", line 327, in fetch_build_egg
File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py", line 446, in easy_install
File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py", line 476, in install_item
File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py", line 655, in install_eggs
File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py", line 930, in build_and_install
File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py", line 919, in run_setup
File "build/bdist.linux-i686/egg/setuptools/sandbox.py", line 62, in run_setup
File "build/bdist.linux-i686/egg/setuptools/sandbox.py", line 105, in run
File "build/bdist.linux-i686/egg/setuptools/sandbox.py", line 64, in <lambda>
File "setup.py", line 29, in <module>
in a distutils ``setup.py`` file.
File "/var/folders/zm/zmC41KkWH5ObUL0cyVjWL++++TI/-Tmp-/easy_install-wsSHXC/versiontools-1.8.1/versiontools/__init__.py", line 354, in format_version
File "/var/folders/zm/zmC41KkWH5ObUL0cyVjWL++++TI/-Tmp-/easy_install-wsSHXC/versiontools-1.8.1/versiontools/__init__.py", line 183, in from_tuple
File "/var/folders/zm/zmC41KkWH5ObUL0cyVjWL++++TI/-Tmp-/easy_install-wsSHXC/versiontools-1.8.1/versiontools/__init__.py", line 126, in __new__
File "/var/folders/zm/zmC41KkWH5ObUL0cyVjWL++++TI/-Tmp-/easy_install-wsSHXC/versiontools-1.8.1/versiontools/__init__.py", line 279, in _find_source_tree
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/inspect.py", line 936, in getouterframes
framelist.append((frame,) + getframeinfo(frame, context))
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/inspect.py", line 911, in getframeinfo
lines, lnum = findsource(frame)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/inspect.py", line 573, in findsource
if pat.match(lines[lnum]): break
IndexError: list index out of range
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 14, in <module>
File "/Users/glosseyvilly/Desktop/Workspace/chris_dev/mysite-env/build/django-staticfiles/setup.py", line 128, in <module>
'versiontools >= 1.6',
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/core.py", line 113, in setup
_setup_distribution = dist = klass(attrs)
File "build/bdist.linux-i686/egg/setuptools/dist.py", line 260, in __init__
File "build/bdist.linux-i686/egg/setuptools/dist.py", line 284, in fetch_build_eggs
File "build/bdist.linux-i686/egg/pkg_resources.py", line 563, in resolve
plugin_projects = list(plugin_env)
File "build/bdist.linux-i686/egg/pkg_resources.py", line 799, in best_match
File "build/bdist.linux-i686/egg/pkg_resources.py", line 811, in obtain
File "build/bdist.linux-i686/egg/setuptools/dist.py", line 327, in fetch_build_egg
File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py", line 446, in easy_install
File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py", line 476, in install_item
File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py", line 655, in install_eggs
File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py", line 930, in build_and_install
File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py", line 919, in run_setup
File "build/bdist.linux-i686/egg/setuptools/sandbox.py", line 62, in run_setup
File "build/bdist.linux-i686/egg/setuptools/sandbox.py", line 105, in run
File "build/bdist.linux-i686/egg/setuptools/sandbox.py", line 64, in <lambda>
File "setup.py", line 29, in <module>
in a distutils ``setup.py`` file.
File "/var/folders/zm/zmC41KkWH5ObUL0cyVjWL++++TI/-Tmp-/easy_install-wsSHXC/versiontools-1.8.1/versiontools/__init__.py", line 354, in format_version
File "/var/folders/zm/zmC41KkWH5ObUL0cyVjWL++++TI/-Tmp-/easy_install-wsSHXC/versiontools-1.8.1/versiontools/__init__.py", line 183, in from_tuple
File "/var/folders/zm/zmC41KkWH5ObUL0cyVjWL++++TI/-Tmp-/easy_install-wsSHXC/versiontools-1.8.1/versiontools/__init__.py", line 126, in __new__
File "/var/folders/zm/zmC41KkWH5ObUL0cyVjWL++++TI/-Tmp-/easy_install-wsSHXC/versiontools-1.8.1/versiontools/__init__.py", line 279, in _find_source_tree
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/inspect.py", line 936, in getouterframes
framelist.append((frame,) + getframeinfo(frame, context))
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/inspect.py", line 911, in getframeinfo
lines, lnum = findsource(frame)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/inspect.py", line 573, in findsource
if pat.match(lines[lnum]): break
IndexError: list index out of range
----------------------------------------
Command python setup.py egg_info failed with error code 1
Exception information:
Traceback (most recent call last):
File "/Library/Python/2.6/site-packages/pip-1.0.2-py2.6.egg/pip/basecommand.py", line 126, in main
self.run(options, args)
File "/Library/Python/2.6/site-packages/pip-1.0.2-py2.6.egg/pip/commands/install.py", line 223, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/Library/Python/2.6/site-packages/pip-1.0.2-py2.6.egg/pip/req.py", line 986, in prepare_files
req_to_install.run_egg_info()
File "/Library/Python/2.6/site-packages/pip-1.0.2-py2.6.egg/pip/req.py", line 222, in run_egg_info
command_desc='python setup.py egg_info')
File "/Library/Python/2.6/site-packages/pip-1.0.2-py2.6.egg/pip/__init__.py", line 255, in call_subprocess
% (command_desc, proc.returncode))
InstallationError: Command python setup.py egg_info failed with error code 1
I ran into this same error while using the native Python 2.6.1 on Mac OS X 10.6 to install django-imagekit. Some googling revealed this:
https://github.com/jezdez/django_compressor/issues/181
which suggested this:
pip install versiontools
and then I was able to install django-imagekit.
Same issue when I try to install MySQL-python
apt-get install libmysqlclient-dev python-dev
solved my problem.
I think you need to install the python-dev version. Hope that helps
From this error
framelist.append((frame,) + getframeinfo(frame, context))
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/inspect.py", line 911, in getframeinfo
lines, lnum = findsource(frame)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/inspect.py", line 573, in findsource
if pat.match(lines[lnum]): break
IndexError: list index out of range
it appears that findsource(frame) is unable to find a legal lnum for frame. Are you sure that all the programs are aligned to known compatible versions (python, django, pip, etc)?
Before risking to pollute your system installation of python, I suggest that you use virtualenv to isolate the python environment from the one shipped with the OS.

Categories