So i am trying to setup a python virutalenv on my mac to run some tests.
I've installed MySQL Community Server 5.6.16 from here.
Downloading/unpacking MySQL-python==1.2.4
Using download cache from /Users/craig.vyvial/code/private/Cloud-Database/output/tox-cache/https%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2FM%2FMySQL-python%2FMySQL-python-1.2.4.zip
Running setup.py (path:/Users/craig.vyvial/.cdb-venv/build/MySQL-python/setup.py) egg_info for package MySQL-python
Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.28.tar.gz
Extracting in /var/folders/dk/_qm8gn1123xd68l5gwd5c8xxp9_yj1/T/tmpaIssac
Now working in /var/folders/dk/_qm8gn1123xd68l5gwd5c8xxp9_yj1/T/tmpaIssac/distribute-0.6.28
Building a Distribute egg in /Users/craig.vyvial/.cdb-venv/build/MySQL-python
Traceback (most recent call last):
File "setup.py", line 220, in <module>
scripts = scripts,
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 "/private/var/folders/dk/_qm8gn1123xd68l5gwd5c8xxp9_yj1/T/tmpaIssac/distribute-0.6.28/setuptools/dist.py", line 225, in __init__
_Distribution.__init__(self,attrs)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py", line 270, in __init__
self.finalize_options()
File "/private/var/folders/dk/_qm8gn1123xd68l5gwd5c8xxp9_yj1/T/tmpaIssac/distribute-0.6.28/setuptools/dist.py", line 257, in finalize_options
ep.require(installer=self.fetch_build_egg)
File "/private/var/folders/dk/_qm8gn1123xd68l5gwd5c8xxp9_yj1/T/tmpaIssac/distribute-0.6.28/pkg_resources.py", line 2029, in require
working_set.resolve(self.dist.requires(self.extras),env,installer))
File "/private/var/folders/dk/_qm8gn1123xd68l5gwd5c8xxp9_yj1/T/tmpaIssac/distribute-0.6.28/pkg_resources.py", line 580, in resolve
dist = best[req.key] = env.best_match(req, self, installer)
File "/private/var/folders/dk/_qm8gn1123xd68l5gwd5c8xxp9_yj1/T/tmpaIssac/distribute-0.6.28/pkg_resources.py", line 825, in best_match
return self.obtain(req, installer) # try and download/install
File "/private/var/folders/dk/_qm8gn1123xd68l5gwd5c8xxp9_yj1/T/tmpaIssac/distribute-0.6.28/pkg_resources.py", line 837, in obtain
return installer(requirement)
File "/private/var/folders/dk/_qm8gn1123xd68l5gwd5c8xxp9_yj1/T/tmpaIssac/distribute-0.6.28/setuptools/dist.py", line 272, in fetch_build_egg
dist = self.__class__({'script_args':['easy_install']})
File "/private/var/folders/dk/_qm8gn1123xd68l5gwd5c8xxp9_yj1/T/tmpaIssac/distribute-0.6.28/setuptools/dist.py", line 225, in __init__
_Distribution.__init__(self,attrs)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py", line 270, in __init__
self.finalize_options()
File "/private/var/folders/dk/_qm8gn1123xd68l5gwd5c8xxp9_yj1/T/tmpaIssac/distribute-0.6.28/setuptools/dist.py", line 257, in finalize_options
ep.require(installer=self.fetch_build_egg)
File "/private/var/folders/dk/_qm8gn1123xd68l5gwd5c8xxp9_yj1/T/tmpaIssac/distribute-0.6.28/pkg_resources.py", line 2029, in require
working_set.resolve(self.dist.requires(self.extras),env,installer))
File "/private/var/folders/dk/_qm8gn1123xd68l5gwd5c8xxp9_yj1/T/tmpaIssac/distribute-0.6.28/pkg_resources.py", line 580, in resolve
dist = best[req.key] = env.best_match(req, self, installer)
File "/private/var/folders/dk/_qm8gn1123xd68l5gwd5c8xxp9_yj1/T/tmpaIssac/distribute-0.6.28/pkg_resources.py", line 825, in best_match
return self.obtain(req, installer) # try and download/install
File "/private/var/folders/dk/_qm8gn1123xd68l5gwd5c8xxp9_yj1/T/tmpaIssac/distribute-0.6.28/pkg_resources.py", line 837, in obtain
return installer(requirement)
File "/private/var/folders/dk/_qm8gn1123xd68l5gwd5c8xxp9_yj1/T/tmpaIssac/distribute-0.6.28/setuptools/dist.py", line 272, in fetch_build_egg
dist = self.__class__({'script_args':['easy_install']})
File "/private/var/folders/dk/_qm8gn1123xd68l5gwd5c8xxp9_yj1/T/tmpaIssac/distribute-0.6.28/setuptools/dist.py", line 225, in __init__
_Distribution.__init__(self,attrs)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py", line 270, in __init__
... ... ...
File "/private/var/folders/dk/_qm8gn1123xd68l5gwd5c8xxp9_yj1/T/tmpaIssac/distribute-0.6.28/pkg_resources.py", line 2128, in __init__
self.project_name = safe_name(project_name or 'Unknown')
File "/private/var/folders/dk/_qm8gn1123xd68l5gwd5c8xxp9_yj1/T/tmpaIssac/distribute-0.6.28/pkg_resources.py", line 1139, in safe_name
return re.sub('[^A-Za-z0-9.]+', '-', name)
File "/Users/craig.vyvial/.cdb-venv/lib/python2.6/re.py", line 151, in sub
return _compile(pattern, 0).sub(repl, string, count)
RuntimeError: maximum recursion depth exceeded
/Users/craig.vyvial/.cdb-venv/build/MySQL-python/distribute-0.6.28-py2.6.egg
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/Users/craig.vyvial/.cdb-venv/build/MySQL-python/setup.py", line 7, in <module>
use_setuptools()
File "distribute_setup.py", line 145, in use_setuptools
return _do_download(version, download_base, to_dir, download_delay)
File "distribute_setup.py", line 125, in _do_download
_build_egg(egg, tarball, to_dir)
File "distribute_setup.py", line 116, in _build_egg
raise IOError('Could not build the egg.')
IOError: Could not build the egg.
Complete output from command python setup.py egg_info:
Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.28.tar.gz
Extracting in /var/folders/dk/_qm8gn1123xd68l5gwd5c8xxp9_yj1/T/tmpaIssac
Now working in /var/folders/dk/_qm8gn1123xd68l5gwd5c8xxp9_yj1/T/tmpaIssac/distribute-0.6.28
Building a Distribute egg in /Users/craig.vyvial/.cdb-venv/build/MySQL-python
Traceback (most recent call last):
So it errors out with a recursion depth.
With a bit of googling i've tried many things but nothing has resolved this issue yet. I did not see this when I setup my 10.8.5 Mac. This seems something related maybe to the way Mavericks is installed...
Ideas welcome.
Thanks,
Craig
I think this will solve your problem: https://stackoverflow.com/a/21477404/423218 Stackoverflow converted my "Trivial answer" to a comment instead, which is kind of garbage, because it's a legit answer. So maybe by adding a bit more text explaining that it's not a trivial answer, it won't do silly things like that any more.
The gist of it is you need to use vers 1.2.5 of the mysql thingy.
Related
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
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\
Under Ubuntu 16.04 and Python 2.7.12 sudo -H pip install pyublas fails with the following stacktrace:
Collecting pyublas
Using cached PyUblas-2013.1.tar.gz
Complete output from command python setup.py egg_info:
Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.35.tar.gz
Extracting in /tmp/tmpnYhYMx
Now working in /tmp/tmpnYhYMx/distribute-0.6.35
Building a Distribute egg in /tmp/pip-build-vvsChR/pyublas
Traceback (most recent call last):
File "setup.py", line 248, in <module>
scripts = scripts,
File "/usr/lib/python2.7/distutils/core.py", line 111, in setup
_setup_distribution = dist = klass(attrs)
File "/tmp/tmpnYhYMx/distribute-0.6.35/setuptools/dist.py", line 225, in __init__
_Distribution.__init__(self,attrs)
File "/usr/lib/python2.7/distutils/dist.py", line 287, in __init__
self.finalize_options()
File "/tmp/tmpnYhYMx/distribute-0.6.35/setuptools/dist.py", line 257, in finalize_options
ep.require(installer=self.fetch_build_egg)
File "/tmp/tmpnYhYMx/distribute-0.6.35/pkg_resources.py", line 2027, in require
working_set.resolve(self.dist.requires(self.extras),env,installer))
File "/tmp/tmpnYhYMx/distribute-0.6.35/pkg_resources.py", line 2237, in requires
dm = self._dep_map
File "/tmp/tmpnYhYMx/distribute-0.6.35/pkg_resources.py", line 2466, in _dep_map
self.__dep_map = self._compute_dependencies()
File "/tmp/tmpnYhYMx/distribute-0.6.35/pkg_resources.py", line 2499, in _compute_dependencies
common = frozenset(reqs_for_extra(None))
File "/tmp/tmpnYhYMx/distribute-0.6.35/pkg_resources.py", line 2496, in reqs_for_extra
if req.marker_fn(override={'extra':extra}):
File "/tmp/tmpnYhYMx/distribute-0.6.35/_markerlib/markers.py", line 109, in marker_fn
return eval(compiled_marker, environment)
File "<environment marker>", line 1, in <module>
NameError: name 'sys_platform' is not defined
/tmp/pip-build-vvsChR/pyublas/distribute-0.6.35-py2.7.egg
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-vvsChR/pyublas/setup.py", line 143, in <module>
main()
File "/tmp/pip-build-vvsChR/pyublas/setup.py", line 29, in main
from aksetup_helper import hack_distutils, get_config, setup, \
File "aksetup_helper.py", line 3, in <module>
distribute_setup.use_setuptools()
File "distribute_setup.py", line 152, in use_setuptools
return _do_download(version, download_base, to_dir, download_delay)
File "distribute_setup.py", line 132, in _do_download
_build_egg(egg, tarball, to_dir)
File "distribute_setup.py", line 123, in _build_egg
raise IOError('Could not build the egg.')
IOError: Could not build the egg.
Following various related SO answers, I have confirmed that distribute is not installed, setuptools is up to date (setuptools (36.0.1)).
I have also tried manually running setup per this answer to no avail.
I am using python 3 with Archlinux. Whenever I want to use pip to install packages, most packages fail to install and report the same problem:
Exception:
Traceback (most recent call last):
File "/usr/lib/python3.4/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/lib/python3.4/site-packages/pip/commands/install.py", line 339, in run
requirement_set.prepare_files(finder)
File "/usr/lib/python3.4/site-packages/pip/req/req_set.py", line 229, in prepare_files
req_to_install.check_if_exists()
File "/usr/lib/python3.4/site-packages/pip/req/req_install.py", line 928, check_if_exists
self.satisfied_by = pkg_resources.get_distribution(self.req)
File "/usr/lib/python3.4/site-packages/pip/_vendor/pkg_resources.py", line 461, in get_distribution
dist = get_provider(dist)
File "/usr/lib/python3.4/site-packages/pip/_vendor/pkg_resources.py", line 341, in get_provider
return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
File "/usr/lib/python3.4/site-packages/pip/_vendor/pkg_resources.py", line 870, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python3.4/site-packages/pip/_vendor/pkg_resources.py", line 740, in resolve
env = Environment(self.entries)
File "/usr/lib/python3.4/site-packages/pip/_vendor/pkg_resources.py", line 927, in __init__
self.scan(search_path)
File "/usr/lib/python3.4/site-packages/pip/_vendor/pkg_resources.py", line 957, in scan
self.add(dist)
File "/usr/lib/python3.4/site-packages/pip/_vendor/pkg_resources.py", line 977, in add
dists.sort(key=operator.attrgetter('hashcmp'), reverse=True)
TypeError: unorderable types: NoneType() < str()
Is it a bug of pip or setuptools?
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.