Related
ERROR: Exception:
Traceback (most recent call last):
File "C:\Users\Lenovo\AppData\Local\Temp\tmpj3_890qp\pip.zip\pip\_internal\cli\base_command.
py", line 216, in _main
status = self.run(options, args)
File "C:\Users\Lenovo\AppData\Local\Temp\tmpj3_890qp\pip.zip\pip\_internal\cli\req_command.p
y", line 182, in wrapper
return func(self, options, args)
File "C:\Users\Lenovo\AppData\Local\Temp\tmpj3_890qp\pip.zip\pip\_internal\commands\install.
py", line 324, in run
requirement_set = resolver.resolve(
File "C:\Users\Lenovo\AppData\Local\Temp\tmpj3_890qp\pip.zip\pip\_internal\resolution\legacy
\resolver.py", line 183, in resolve
discovered_reqs.extend(self._resolve_one(requirement_set, req))
File "C:\Users\Lenovo\AppData\Local\Temp\tmpj3_890qp\pip.zip\pip\_internal\resolution\legacy
\resolver.py", line 388, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "C:\Users\Lenovo\AppData\Local\Temp\tmpj3_890qp\pip.zip\pip\_internal\resolution\legacy
\resolver.py", line 340, in _get_abstract_dist_for
abstract_dist = self.preparer.prepare_linked_requirement(req)
File "C:\Users\Lenovo\AppData\Local\Temp\tmpj3_890qp\pip.zip\pip\_internal\operations\prepar
e.py", line 467, in prepare_linked_requirement
local_file = unpack_url(
File "C:\Users\Lenovo\AppData\Local\Temp\tmpj3_890qp\pip.zip\pip\_internal\operations\prepar
e.py", line 255, in unpack_url
file = get_http_url(
File "C:\Users\Lenovo\AppData\Local\Temp\tmpj3_890qp\pip.zip\pip\_internal\operations\prepar
e.py", line 129, in get_http_url
from_path, content_type = _download_http_url(
File "C:\Users\Lenovo\AppData\Local\Temp\tmpj3_890qp\pip.zip\pip\_internal\operations\prepar
e.py", line 282, in _download_http_url
for chunk in download.chunks:
File "C:\Users\Lenovo\AppData\Local\Temp\tmpj3_890qp\pip.zip\pip\_internal\cli\progress_bars
.py", line 172, in iter
self.next(len(x)) # noqa: B305
File "C:\Users\Lenovo\AppData\Local\Temp\tmpj3_890qp\pip.zip\pip\_vendor\progress\__init__.p
y", line 120, in next
self.update()
File "C:\Users\Lenovo\AppData\Local\Temp\tmpj3_890qp\pip.zip\pip\_vendor\progress\bar.py", l
ine 83, in update
self.writeln(line)
File "C:\Users\Lenovo\AppData\Local\Temp\tmpj3_890qp\pip.zip\pip\_vendor\progress\__init__.p
y", line 100, in writeln
if self.file and self.is_tty():
File "C:\Users\Lenovo\AppData\Local\Temp\tmpj3_890qp\pip.zip\pip\_vendor\progress\__init__.p
y", line 112, in is_tty
return self.file.isatty() if self.check_tty else True
File "C:\Users\Lenovo\AppData\Local\Temp\tmpj3_890qp\pip.zip\pip\_internal\cli\progress_bars
.py", line 200, in <lambda>
self.file.isatty = lambda: self.file.wrapped.isatty()
AttributeError: 'NoneType' object has no attribute 'isatty'
WARNING: You are using pip version 20.2; however, version 20.2.2 is available.
You should consider upgrading via the 'C:\Users\Lenovo\AppData\Local\Programs\Python\Python38\
python.exe -m pip install --upgrade pip' command.
Everytime I try to install anything with pip this error tends to show up. I tried to reinstall pip with get-pip.py from https://bootstrap.pypa.io/get-pip.py even for this I get the same error.
I am running python 3.8.5 and pip 20.2.
I'm a Mac user, and I frequently face frustrations when installing python packages.
This time, pipenv seems not working properly.
I successfully installed pipenv.
$pipenv --version
pipenv, version 11.10.1
However, When I try to init pipenv shell, I got error like this:
Creating a virtualenv for this project…
Using /Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 (3.6.4) to create virtualenv…
⠋Already using interpreter /Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6
Using base prefix '/Library/Frameworks/Python.framework/Versions/3.6'
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/virtualenv.py", line 2349, in <module>
main()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/virtualenv.py", line 712, in main
symlink=options.symlink)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/virtualenv.py", line 927, in create_environment
site_packages=site_packages, clear=clear, symlink=symlink))
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/virtualenv.py", line 1140, in install_python
copy_required_modules(home_dir, symlink)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/virtualenv.py", line 1070, in copy_required_modules
dst_filename = change_prefix(filename, dst_prefix)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/virtualenv.py", line 1044, in change_prefix
(filename, prefixes)
AssertionError: Filename /Users/ChaewonKong/Desktop/dev/re.py does not start with any of these prefixes: ['/Library/Frameworks/Python.framework/Versions/3.6/Extras/lib/python', '/Users/ChaewonKong/Library/Python/3.6/lib/python/site-packages', '/Users/ChaewonKong/.local/lib/python/3.6/site-packages', '/Users/ChaewonKong/Library/Python/3.6/site-packages', '/Library/Frameworks/Python.framework/Versions/3.6', '/Library/Frameworks/Python.framework/Versions/3.6', '/Library/Python/3.6/site-packages']
Virtualenv location:
Creating a Pipfile for this project…
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/bin/pipenv", line 11, in <module>
sys.exit(cli())
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pipenv/cli.py", line 607, in shell
three=three, python=python, fancy=fancy, shell_args=shell_args
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pipenv/core.py", line 2149, in do_shell
ensure_project(three=three, python=python, validate=False)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pipenv/core.py", line 648, in ensure_project
ensure_pipfile(validate=validate, skip_requirements=skip_requirements, system=system)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pipenv/core.py", line 302, in ensure_pipfile
project.create_pipfile(python=python)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pipenv/project.py", line 588, in create_pipfile
required_python = self.which('python')
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pipenv/core.py", line 126, in which
p = os.sep.join([location] + ['bin/{0}'.format(command)])
TypeError: sequence item 0: expected str instance, NoneType found
This pipenv issues page has the answer you are looking for:
TypeError issue
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.
I run the following command in terminal sudo python2.6 setup.py install and after some output I get the below error.
Traceback (most recent call last):
File "setup.py", line 16, in <module>
packages=find_packages()
File "/opt/python2.6/lib/python2.6/distutils/core.py", line 152, in setup
dist.run_commands()
File "/opt/python2.6/lib/python2.6/distutils/dist.py", line 975, in run_commands
self.run_command(cmd)
File "/opt/python2.6/lib/python2.6/distutils/dist.py", line 995, in run_command
cmd_obj.run()
File "/opt/python2.6/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/setuptools/command/install.py", line 76, in run
File "/opt/python2.6/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/setuptools/command/install.py", line 104, in do_egg_install
File "/opt/python2.6/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/setuptools/command/easy_install.py", line 211, in run
File "/opt/python2.6/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/setuptools/command/easy_install.py", line 427, in easy_install
File "/opt/python2.6/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/setuptools/command/easy_install.py", line 478, in install_item
File "/opt/python2.6/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/setuptools/command/easy_install.py", line 519, in process_distribution
File "/opt/python2.6/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/pkg_resources.py", line 570, in resolve
File "/opt/python2.6/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/pkg_resources.py", line 2149, in requires
File "/opt/python2.6/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/pkg_resources.py", line 2141, in _dep_map
File "/opt/python2.6/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/pkg_resources.py", line 2560, in split_sections
File "/opt/python2.6/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/pkg_resources.py", line 1854, in yield_lines
File "/opt/python2.6/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/pkg_resources.py", line 2163, in _get_metadata
File "/opt/python2.6/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/pkg_resources.py", line 1181, in get_metadata_lines
File "/opt/python2.6/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/pkg_resources.py", line 1178, in get_metadata
File "/opt/python2.6/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/pkg_resources.py", line 1238, in _get
zipimport.ZipImportError: bad local file header in /opt/python2.6/lib/python2.6/site-packages/businesscommon-5.63-py2.6.egg
I ran the command unzip -t /opt/python2.6/lib/python2.6/site-packages/businesscommon-5.63-py2.6.egg to see if the EGG file is a valid ZIP file and it returned 'No errors detected'.
I've done some research on zipimport.ZipImportError but can't seem to figure how really to debug or fix it. I don't have much experience with Python so any help or advice would be appreciated.
Looks like all I needed to do was run sudo python2.5 setup.py install instead of sudo python2.6 setup.py install
Notice that I was oringally using python2.6 instead of python2.5.
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.