Unable to do pipenv install on Windows 10 - python

pipenv install gives me an error on Windows 10 on empty folder:
Traceback (most recent call last):
File "c:\python27\lib\runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "c:\python27\lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "C:\Users\ext.thipier1\AppData\Roaming\Python\Scripts\pipenv.exe\__main__.py", line 9, in <module>
File "C:\Users\ext.thipier1\AppData\Roaming\Python\Python27\site-packages\pipenv\vendor\click\core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "C:\Users\ext.thipier1\AppData\Roaming\Python\Python27\site-packages\pipenv\vendor\click\core.py", line 697, in main
rv = self.invoke(ctx)
File "C:\Users\ext.thipier1\AppData\Roaming\Python\Python27\site-packages\pipenv\vendor\click\core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Users\ext.thipier1\AppData\Roaming\Python\Python27\site-packages\pipenv\vendor\click\core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Users\ext.thipier1\AppData\Roaming\Python\Python27\site-packages\pipenv\vendor\click\core.py", line 535, in invoke
return callback(*args, **kwargs)
File "C:\Users\ext.thipier1\AppData\Roaming\Python\Python27\site-packages\pipenv\cli.py", line 366, in install
selective_upgrade=selective_upgrade,
File "C:\Users\ext.thipier1\AppData\Roaming\Python\Python27\site-packages\pipenv\core.py", line 1730, in do_install
skip_requirements=skip_requirements,
File "C:\Users\ext.thipier1\AppData\Roaming\Python\Python27\site-packages\pipenv\core.py", line 604, in ensure_project
three=three, python=python, site_packages=site_packages
File "C:\Users\ext.thipier1\AppData\Roaming\Python\Python27\site-packages\pipenv\core.py", line 537, in ensure_virtualenv
if not project.virtualenv_exists:
File "C:\Users\ext.thipier1\AppData\Roaming\Python\Python27\site-packages\pipenv\project.py", line 207, in virtualenv_exists
if self.pipfile_exists and os.path.exists(self.virtualenv_location):
File "C:\Users\ext.thipier1\AppData\Roaming\Python\Python27\site-packages\pipenv\project.py", line 299, in virtualenv_location
loc = self._get_virtualenv_location(self.virtualenv_name)
File "C:\Users\ext.thipier1\AppData\Roaming\Python\Python27\site-packages\pipenv\project.py", line 279, in virtualenv_name
sanitized, encoded_hash = self._get_virtualenv_hash(self.name)
File "C:\Users\ext.thipier1\AppData\Roaming\Python\Python27\site-packages\pipenv\project.py", line 267, in _get_virtualenv_hash
if not (env[-9] != '-' and
IndexError: string index out of range
It only works if I activate a virtual env before running the command.
I tried on macOS the same procedure and I don't have this problem.
I followed the installation instructions.
What can I do to make it work?

Related

how to resolve this Flask application run.py Error

C:\Users\Home\Desktop\CSS3\harward\files\src2\variables0>flask run
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
Traceback (most recent call last):
File "c:\program files\python38\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,`enter code here`
File "c:\program files\python38\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Program Files\Python38\Scripts\flask.exe\__main__.py", line 9, in <module>
File "c:\program files\python38\lib\site-packages\flask\cli.py", line 967, in main
cli.main(args=sys.argv[1:], prog_name="python -m flask" if as_module else None)
File "c:\program files\python38\lib\site-packages\flask\cli.py", line 586, in main
return super(FlaskGroup, self).main(*args, **kwargs)
File "c:\program files\python38\lib\site-packages\click\core.py", line 782, in main
rv = self.invoke(ctx)
File "c:\program files\python38\lib\site-packages\click\core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "c:\program files\python38\lib\site-packages\click\core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "c:\program files\python38\lib\site-packages\click\core.py", line 610, in invoke
return callback(*args, **kwargs)
File "c:\program files\python38\lib\site-packages\click\decorators.py", line 73, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "c:\program files\python38\lib\site-packages\click\core.py", line 610, in invoke
return callback(*args, **kwargs)
File "c:\program files\python38\lib\site-packages\flask\cli.py", line 852, in run_command
run_simple(
File "c:\program files\python38\lib\site-packages\werkzeug\serving.py", line 1052, in run_simple
inner()
File "c:\program files\python38\lib\site-packages\werkzeug\serving.py", line 996, in inner
srv = make_server(
File "c:\program files\python38\lib\site-packages\werkzeug\serving.py", line 847, in make_server
return ThreadedWSGIServer(
File "c:\program files\python38\lib\site-packages\werkzeug\serving.py", line 740, in __init__
HTTPServer.__init__(self, server_address, handler)
File "c:\program files\python38\lib\socketserver.py", line 452, in __init__
self.server_bind()
File "c:\program files\python38\lib\http\server.py", line 138, in server_bind
socketserver.TCPServer.server_bind(self)
File "c:\program files\python38\lib\socketserver.py", line 466, in server_bind
self.socket.bind(self.server_address)
OSError: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions
I faced this issue in the virtual environment, so this is what I did:
I deactivated virtualenv and installed flask there
I activated the virtualenv and installed flask again and it worked.
I faced this on windows10

Cannot use pipenv to install django. PermissionError: [Errno 13] Permission denied: 'Pipfile'

Currently trying to install django 2.1 in my command prompt through pipenv command. However there's an error where it says Pipfile access denied.
C:\windows\system32>pipenv install django==2.1
Traceback (most recent call last):
File "c:\users\lenovo\appdata\local\programs\python\python38-32\lib\runpy.py",
line 193, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\users\lenovo\appdata\local\programs\python\python38-32\lib\runpy.py",
line 86, in _run_code
exec(code, run_globals)
File "C:\Users\lenovo\AppData\Local\Programs\Python\Python38-32\Scripts\pipenv
.exe\__main__.py", line 9, in <module>
File "C:\Users\lenovo\AppData\Local\Programs\Python\Python38-32\Lib\site-packa
ges\pipenv\vendor\click\core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "C:\Users\lenovo\AppData\Local\Programs\Python\Python38-32\Lib\site-packa
ges\pipenv\vendor\click\core.py", line 717, in main
rv = self.invoke(ctx)
File "C:\Users\lenovo\AppData\Local\Programs\Python\Python38-32\Lib\site-packa
ges\pipenv\vendor\click\core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Users\lenovo\AppData\Local\Programs\Python\Python38-32\Lib\site-packa
ges\pipenv\vendor\click\core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Users\lenovo\AppData\Local\Programs\Python\Python38-32\Lib\site-packa
ges\pipenv\vendor\click\core.py", line 555, in invoke
return callback(*args, **kwargs)
File "C:\Users\lenovo\AppData\Local\Programs\Python\Python38-32\Lib\site-packa
ges\pipenv\vendor\click\decorators.py", line 64, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "C:\Users\lenovo\AppData\Local\Programs\Python\Python38-32\Lib\site-packa
ges\pipenv\vendor\click\core.py", line 555, in invoke
return callback(*args, **kwargs)
File "C:\Users\lenovo\AppData\Local\Programs\Python\Python38-32\Lib\site-packa
ges\pipenv\vendor\click\decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "c:\users\lenovo\appdata\local\programs\python\python38-32\lib\site-packa
ges\pipenv\cli\command.py", line 235, in install
retcode = do_install(
File "c:\users\lenovo\appdata\local\programs\python\python38-32\lib\site-packa
ges\pipenv\core.py", line 1734, in do_install
ensure_project(
File "c:\users\lenovo\appdata\local\programs\python\python38-32\lib\site-packa
ges\pipenv\core.py", line 567, in ensure_project
project.touch_pipfile()
File "c:\users\lenovo\appdata\local\programs\python\python38-32\lib\site-packa
ges\pipenv\project.py", line 677, in touch_pipfile
with open("Pipfile", "a"):
PermissionError: [Errno 13] Permission denied: 'Pipfile'
I'm new. I'm in the process of learning on how to build a website.
You need to run the command prompt as an administrator. If you don't know how to do this, a shortcut is to do WIN + x and then press A when a menu shows.

Traceback Error running 'pipenv shell' version 2018.11.26 - bug supposed to be fixed

I keep on getting a traceback error running pipenv shell on version 2018.11.26, for python 3.7.
I keep on getting this error when running pipenv shell on version 2018.11.26, for python 3.7. I looked here, but it seems like a bug that should have been fixed, so perhaps this points to another problem.
I tried pipenv lock to update pipenv and pipenv --rm to remove pipenv and reinstall pipenv install
with pipenv check, I get a similar traceback error with
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) at the end.
pipenv shell
Traceback (most recent call last):
File "c:\users\lilyx\appdata\local\programs\python\python37\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\users\lilyx\appdata\local\programs\python\python37\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\users\lilyx\appdata\local\programs\python\python37\Scripts\pipenv.exe\__main__.py", line 9, in <module>
File "c:\users\lilyx\appdata\local\programs\python\python37\lib\site-packages\pipenv\vendor\click\core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "c:\users\lilyx\appdata\local\programs\python\python37\lib\site-packages\pipenv\vendor\click\core.py", line 717, in main
rv = self.invoke(ctx)
File "c:\users\lilyx\appdata\local\programs\python\python37\lib\site-packages\pipenv\vendor\click\core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "c:\users\lilyx\appdata\local\programs\python\python37\lib\site-packages\pipenv\vendor\click\core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "c:\users\lilyx\appdata\local\programs\python\python37\lib\site-packages\pipenv\vendor\click\core.py", line 555, in invoke
return callback(*args, **kwargs)
File "c:\users\lilyx\appdata\local\programs\python\python37\lib\site-packages\pipenv\vendor\click\decorators.py", line 64, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "c:\users\lilyx\appdata\local\programs\python\python37\lib\site-packages\pipenv\vendor\click\core.py", line 555, in invoke
return callback(*args, **kwargs)
File "c:\users\lilyx\appdata\local\programs\python\python37\lib\site-packages\pipenv\cli\command.py", line 390, in shell
pypi_mirror=state.pypi_mirror,
File "c:\users\lilyx\appdata\local\programs\python\python37\lib\site-packages\pipenv\core.py", line 2156, in do_shell
three=three, python=python, validate=False, pypi_mirror=pypi_mirror,
File "c:\users\lilyx\appdata\local\programs\python\python37\lib\site-packages\pipenv\core.py", line 590, in ensure_project
crayons.green(shorten_path(path_to_python)),
TypeError: __str__ returned non-string (type NoneType)

Failing to initialize pipenv in mac (TypeError: sequence item 0: expected str instance, NoneType found)

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

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