Virtual environments issue on mac - python

I'm stuck on an issue with virtualenv and hoping someone may be able to help.
I see this error when trying to create a virtual env: OSError: Command /Users/andy.smith/foo/bar/bin/python2.7 - setuptools pip wheel failed with error code 2
I've tried clean up up my Python environment and reinstall python and virtualenv,
and tried fixes from similar questions but to no avail. Any help would is extremely welcome.
The full error is:
$ mkdir foo
$ cd foo
$ virtualenv bar
New python executable in /Users/andy.smith/foo/bar/bin/python2.7
Also creating executable in /Users/andy.smith/foo/bar/bin/python
Installing setuptools, pip, wheel...
Complete output from command /Users/andy.smith/foo/bar/bin/python2.7 - setuptools pip wheel:
Looking in links: /usr/local/lib/python2.7/site-packages, /usr/local/lib/python2.7/site-packages/virtualenv_support, /usr/local/lib/python2.7/site-packages/virtualenv_support
Collecting setuptools
Exception:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/virtualenv_support/pip-10.0.1-py2.py3-none-any.whl/pip/_internal/basecommand.py", line 228, in main
status = self.run(options, args)
File "/usr/local/lib/python2.7/site-packages/virtualenv_support/pip-10.0.1-py2.py3-none-any.whl/pip/_internal/commands/install.py", line 291, in run
resolver.resolve(requirement_set)
File "/usr/local/lib/python2.7/site-packages/virtualenv_support/pip-10.0.1-py2.py3-none-any.whl/pip/_internal/resolve.py", line 103, in resolve
self._resolve_one(requirement_set, req)
File "/usr/local/lib/python2.7/site-packages/virtualenv_support/pip-10.0.1-py2.py3-none-any.whl/pip/_internal/resolve.py", line 257, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "/usr/local/lib/python2.7/site-packages/virtualenv_support/pip-10.0.1-py2.py3-none-any.whl/pip/_internal/resolve.py", line 210, in _get_abstract_dist_for
self.require_hashes
File "/usr/local/lib/python2.7/site-packages/virtualenv_support/pip-10.0.1-py2.py3-none-any.whl/pip/_internal/operations/prepare.py", line 245, in prepare_linked_requirement
req.populate_link(finder, upgrade_allowed, require_hashes)
File "/usr/local/lib/python2.7/site-packages/virtualenv_support/pip-10.0.1-py2.py3-none-any.whl/pip/_internal/req/req_install.py", line 307, in populate_link
self.link = finder.find_requirement(self, upgrade)
File "/usr/local/lib/python2.7/site-packages/virtualenv_support/pip-10.0.1-py2.py3-none-any.whl/pip/_internal/index.py", line 484, in find_requirement
all_candidates = self.find_all_candidates(req.name)
File "/usr/local/lib/python2.7/site-packages/virtualenv_support/pip-10.0.1-py2.py3-none-any.whl/pip/_internal/index.py", line 442, in find_all_candidates
for page in self._get_pages(url_locations, project_name):
File "/usr/local/lib/python2.7/site-packages/virtualenv_support/pip-10.0.1-py2.py3-none-any.whl/pip/_internal/index.py", line 587, in _get_pages
page = self._get_page(location)
File "/usr/local/lib/python2.7/site-packages/virtualenv_support/pip-10.0.1-py2.py3-none-any.whl/pip/_internal/index.py", line 705, in _get_page
return HTMLPage.get_page(link, session=self.session)
File "/usr/local/lib/python2.7/site-packages/virtualenv_support/pip-10.0.1-py2.py3-none-any.whl/pip/_internal/index.py", line 814, in get_page
"Cache-Control": "max-age=600",
File "/usr/local/lib/python2.7/site-packages/virtualenv_support/pip-10.0.1-py2.py3-none-any.whl/pip/_vendor/requests/sessions.py", line 521, in get
return self.request('GET', url, **kwargs)
File "/usr/local/lib/python2.7/site-packages/virtualenv_support/pip-10.0.1-py2.py3-none-any.whl/pip/_internal/download.py", line 397, in request
return super(PipSession, self).request(method, url, *args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/virtualenv_support/pip-10.0.1-py2.py3-none-any.whl/pip/_vendor/requests/sessions.py", line 508, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python2.7/site-packages/virtualenv_support/pip-10.0.1-py2.py3-none-any.whl/pip/_vendor/requests/sessions.py", line 625, in send
r = dispatch_hook('response', hooks, r, **kwargs)
File "/usr/local/lib/python2.7/site-packages/virtualenv_support/pip-10.0.1-py2.py3-none-any.whl/pip/_vendor/requests/hooks.py", line 31, in dispatch_hook
_hook_data = hook(hook_data, **kwargs)
File "/usr/local/lib/python2.7/site-packages/virtualenv_support/pip-10.0.1-py2.py3-none-any.whl/pip/_internal/download.py", line 189, in handle_401
username = six.moves.input("User for %s: " % parsed.netloc)
EOFError: EOF when reading a line
...Installing setuptools, pip, wheel...done.
Traceback (most recent call last):
File "/usr/local/bin/virtualenv", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python2.7/site-packages/virtualenv.py", line 712, in main
symlink=options.symlink)
File "/usr/local/lib/python2.7/site-packages/virtualenv.py", line 947, in create_environment
download=download,
File "/usr/local/lib/python2.7/site-packages/virtualenv.py", line 904, in install_wheel
call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=SCRIPT)
File "/usr/local/lib/python2.7/site-packages/virtualenv.py", line 796, in call_subprocess
% (cmd_desc, proc.returncode))
OSError: Command /Users/andy.smith/foo/bar/bin/python2.7 - setuptools pip wheel failed with error code 2
Thanks!

Related

Uninstalled and installed python and now facing issues with pip

I use a mac and I switched from python2 to python3 recently. Post doing that I couldn't install jupyter on my laptop due to some dependency issues. After a lot of trial and errors, I just uninstalled Python 3 and installed it with brew instead.
I used the following guides to uninstall 1, 2.
Post that I installed jupyter again and now I'm facing this issue:
$ pip install --index-url '..' --trusted-host '..' jupyter
This is how I usually install packages on my laptop behind a firewall and it works. But now I'm getting the following exception:
ERROR: Exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 153, in _main
status = self.run(options, args)
File "/usr/local/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 382, in run
resolver.resolve(requirement_set)
File "/usr/local/lib/python3.7/site-packages/pip/_internal/legacy_resolve.py", line 201, in resolve
self._resolve_one(requirement_set, req)
File "/usr/local/lib/python3.7/site-packages/pip/_internal/legacy_resolve.py", line 365, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "/usr/local/lib/python3.7/site-packages/pip/_internal/legacy_resolve.py", line 311, in _get_abstract_dist_for
req.populate_link(self.finder, upgrade_allowed, self.require_hashes)
File "/usr/local/lib/python3.7/site-packages/pip/_internal/req/req_install.py", line 225, in populate_link
self.link = finder.find_requirement(self, upgrade)
File "/usr/local/lib/python3.7/site-packages/pip/_internal/index.py", line 879, in find_requirement
req.name, specifier=req.specifier, hashes=hashes,
File "/usr/local/lib/python3.7/site-packages/pip/_internal/index.py", line 861, in find_best_candidate
candidates = self.find_all_candidates(project_name)
File "/usr/local/lib/python3.7/site-packages/pip/_internal/index.py", line 791, in find_all_candidates
collected_links = self._link_collector.collect_links(project_name)
File "/usr/local/lib/python3.7/site-packages/pip/_internal/collector.py", line 541, in collect_links
for page in self._get_pages(url_locations):
File "/usr/local/lib/python3.7/site-packages/pip/_internal/collector.py", line 493, in _get_pages
page = _get_html_page(location, session=self.session)
File "/usr/local/lib/python3.7/site-packages/pip/_internal/collector.py", line 339, in _get_html_page
resp = _get_html_response(url, session=session)
File "/usr/local/lib/python3.7/site-packages/pip/_internal/collector.py", line 146, in _get_html_response
"Cache-Control": "max-age=0",
File "/usr/local/lib/python3.7/site-packages/pip/_vendor/requests/sessions.py", line 546, in get
return self.request('GET', url, **kwargs)
File "/usr/local/lib/python3.7/site-packages/pip/_internal/network/session.py", line 426, in request
return super(PipSession, self).request(method, url, *args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/pip/_vendor/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.7/site-packages/pip/_vendor/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.7/site-packages/pip/_vendor/requests/adapters.py", line 412, in send
conn = self.get_connection(request.url, proxies)
File "/usr/local/lib/python3.7/site-packages/pip/_vendor/requests/adapters.py", line 309, in get_connection
proxy_manager = self.proxy_manager_for(proxy)
File "/usr/local/lib/python3.7/site-packages/pip/_vendor/requests/adapters.py", line 199, in proxy_manager_for
**proxy_kwargs)
File "/usr/local/lib/python3.7/site-packages/pip/_vendor/urllib3/poolmanager.py", line 470, in proxy_from_url
return ProxyManager(proxy_url=url, **kw)
File "/usr/local/lib/python3.7/site-packages/pip/_vendor/urllib3/poolmanager.py", line 420, in __init__
raise ProxySchemeUnknown(proxy.scheme)
pip._vendor.urllib3.exceptions.ProxySchemeUnknown: Not supported proxy scheme None
I have set the proxy and it can be seen using env. I've also tried:
export http_proxy="http://<hostname>:<port>"
export https_proxy="https://<hostname>:<port>"
Nothing seems to be working.
Any suggestions would be helpful.
In the end, what helped was unset https_proxy http_proxy.

Not able to make a virtual environment using virutalenv and virtualenvwrapper

I was trying to make a virtual environment called rango. Here's what I did:
Inside the directory where virtualenvwrapper.sh is present :
~/.local/bin$ source virtualenvwrapper.sh
Now when I am trying to make virtual environment using
~/.local/bin$ mkvirtualenv rango
It gives me the following error :
Running virtualenv with interpreter /usr/bin/python2
New python executable in /home/kartikey/.virtualenvs/rango/bin/python2
Also creating executable in /home/kartikey/.virtualenvs/rango/bin/python
Installing setuptools, pkg_resources, pip, wheel...
Complete output from command /home/kartikey/.virtualenvs/rango/bin/python2 - setuptools pkg_resources pip wheel:
Collecting setuptools
Exception:
Traceback (most recent call last):
File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/commands/install.py", line 353, in run
wb.build(autobuilding=True)
File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/wheel.py", line 749, in build
self.requirement_set.prepare_files(self.finder)
File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/req/req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/req/req_set.py", line 554, in _prepare_file
require_hashes
File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/req/req_install.py", line 278, in populate_link
self.link = finder.find_requirement(self, upgrade)
File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/index.py", line 465, in find_requirement
all_candidates = self.find_all_candidates(req.name)
File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/index.py", line 423, in find_all_candidates
for page in self._get_pages(url_locations, project_name):
File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/index.py", line 568, in _get_pages
page = self._get_page(location)
File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/index.py", line 683, in _get_page
return HTMLPage.get_page(link, session=self.session)
File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/index.py", line 792, in get_page
"Cache-Control": "max-age=600",
File "/home/kartikey/.virtualenvs/rango/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/sessions.py", line 501, in get
return self.request('GET', url, **kwargs)
File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/download.py", line 386, in request
return super(PipSession, self).request(method, url, *args, **kwargs)
File "/home/kartikey/.virtualenvs/rango/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/sessions.py", line 488, in request
resp = self.send(prep, **send_kwargs)
File "/home/kartikey/.virtualenvs/rango/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/sessions.py", line 609, in send
r = adapter.send(request, **kwargs)
File "/home/kartikey/.virtualenvs/rango/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/adapter.py", line 47, in send
resp = super(CacheControlAdapter, self).send(request, **kw)
File "/home/kartikey/.virtualenvs/rango/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/adapters.py", line 423, in send
timeout=timeout
File "/home/kartikey/.virtualenvs/rango/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/connectionpool.py", line 643, in urlopen
_stacktrace=sys.exc_info()[2])
File "/home/kartikey/.virtualenvs/rango/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/util/retry.py", line 315, in increment
total -= 1
TypeError: unsupported operand type(s) for -=: 'Retry' and 'int'
----------------------------------------
...Installing setuptools, pkg_resources, pip, wheel...done.
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/virtualenv.py", line 2375, in <module>
main()
File "/usr/lib/python3/dist-packages/virtualenv.py", line 724, in main
symlink=options.symlink)
File "/usr/lib/python3/dist-packages/virtualenv.py", line 992, in create_environment
download=download,
File "/usr/lib/python3/dist-packages/virtualenv.py", line 922, in install_wheel
call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=SCRIPT)
File "/usr/lib/python3/dist-packages/virtualenv.py", line 817, in call_subprocess
% (cmd_desc, proc.returncode))
OSError: Command /home/kartikey/.virtualenvs/rango/bin/python2 - setuptools pkg_resources pip wheel failed with error code 2
I am completely stuck, I am not able to understand what is the error and how do get past through it?

Python pip install h5py met TypeError: unsupported operand type(s) for -=: 'Retry' and 'int' [duplicate]

This question already has answers here:
Python PIP Install throws TypeError: unsupported operand type(s) for -=: 'Retry' and 'int'
(19 answers)
Closed 6 years ago.
I want to install h5py module on ubuntu 16.04 LTS with Python 2.7.12, but I met following problem.Below is the traceback.And I'm in mainland of China, there is great firewall, is there anything to do with it? Does anyone know how to solve this problem? Thanks.
I used the command line:
pip install h5py
Collecting h5py
Exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 209, in main
status = self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 328, in run
wb.build(autobuilding=True)
File "/usr/lib/python2.7/dist-packages/pip/wheel.py", line 748, in build
self.requirement_set.prepare_files(self.finder)
File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 360, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 512, in _prepare_file
finder, self.upgrade, require_hashes)
File "/usr/lib/python2.7/dist-packages/pip/req/req_install.py", line 273, in populate_link
self.link = finder.find_requirement(self, upgrade)
File "/usr/lib/python2.7/dist-packages/pip/index.py", line 442, in find_requirement
all_candidates = self.find_all_candidates(req.name)
File "/usr/lib/python2.7/dist-packages/pip/index.py", line 400, in find_all_candidates
for page in self._get_pages(url_locations, project_name):
File "/usr/lib/python2.7/dist-packages/pip/index.py", line 545, in _get_pages
page = self._get_page(location)
File "/usr/lib/python2.7/dist-packages/pip/index.py", line 648, in _get_page
return HTMLPage.get_page(link, session=self.session)
File "/usr/lib/python2.7/dist-packages/pip/index.py", line 757, in get_page
"Cache-Control": "max-age=600",
File "/usr/share/python-wheels/requests-2.9.1-py2.py3-none-any.whl/requests/sessions.py", line 480, in get
return self.request('GET', url, **kwargs)
File "/usr/lib/python2.7/dist-packages/pip/download.py", line 378, in request
return super(PipSession, self).request(method, url, *args, **kwargs)
File "/usr/share/python-wheels/requests-2.9.1-py2.py3-none-any.whl/requests/sessions.py", line 468, in request
resp = self.send(prep, **send_kwargs)
File "/usr/share/python-wheels/requests-2.9.1-py2.py3-none-any.whl/requests/sessions.py", line 576, in send
r = adapter.send(request, **kwargs)
File "/usr/share/python-wheels/CacheControl-0.11.5-py2.py3-none-any.whl/cachecontrol/adapter.py", line 46, in send
resp = super(CacheControlAdapter, self).send(request, **kw)
File "/usr/share/python-wheels/requests-2.9.1-py2.py3-none-any.whl/requests/adapters.py", line 376, in send
timeout=timeout
File "/usr/share/python-wheels/urllib3-1.13.1-py2.py3-none-any.whl/urllib3/connectionpool.py", line 610, in urlopen
_stacktrace=sys.exc_info()[2])
File "/usr/share/python-wheels/urllib3-1.13.1-py2.py3-none-any.whl/urllib3/util/retry.py", line 228, in increment
total -= 1
TypeError: unsupported operand type(s) for -=: 'Retry' and 'int'
When I add sudo in the command line, the error prompt is different.
sudo pip inatall h5py
The directory '/home/yangyong/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/yangyong/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting h5py
Downloading h5py-2.6.0-1-cp27-cp27mu-manylinux1_x86_64.whl (4.2MB)
Exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 209, in main
status = self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 317, in run
requirement_set.prepare_files(finder)
File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 360, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 577, in _prepare_file
session=self.session, hashes=hashes)
File "/usr/lib/python2.7/dist-packages/pip/download.py", line 810, in unpack_url
hashes=hashes
File "/usr/lib/python2.7/dist-packages/pip/download.py", line 649, in unpack_http_url
hashes)
File "/usr/lib/python2.7/dist-packages/pip/download.py", line 871, in _download_http_url
_download_url(resp, link, content_file, hashes)
File "/usr/lib/python2.7/dist-packages/pip/download.py", line 595, in _download_url
hashes.check_against_chunks(downloaded_chunks)
File "/usr/lib/python2.7/dist-packages/pip/utils/hashes.py", line 46, in check_against_chunks
for chunk in chunks:
File "/usr/lib/python2.7/dist-packages/pip/download.py", line 563, in written_chunks
for chunk in chunks:
File "/usr/lib/python2.7/dist-packages/pip/utils/ui.py", line 139, in iter
for x in it:
File "/usr/lib/python2.7/dist-packages/pip/download.py", line 552, in resp_read
decode_content=False):
File "/usr/share/python-wheels/urllib3-1.13.1-py2.py3-none-any.whl/urllib3/response.py", line 344, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "/usr/share/python-wheels/urllib3-1.13.1-py2.py3-none-any.whl/urllib3/response.py", line 311, in read
flush_decoder = True
File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/share/python-wheels/urllib3-1.13.1-py2.py3-none-any.whl/urllib3/response.py", line 240, in _error_catcher
raise ReadTimeoutError(self._pool, None, 'Read timed out.')
ReadTimeoutError: HTTPSConnectionPool(host='pypi.python.org', port=443): Read timed out.
I think I have solved my problem. I installed anaconda on ubuntu 16.04, but I didn't set the path. Now I added PATH=$PATH:$HOME/anaconda2/bin to .bashrc. Then anaconda works fine. Because anaconda already includes h5py module.

getting below error while doing pip install in windows 7 python 2.7

Any help would be appreciated, I'm getting the error below while installing the any python package using pip install. pip install installed from get-pip.py.
Exception:
Traceback (most recent call last):
File "c:\python27\lib\site-packages\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "c:\python27\lib\site-packages\pip\commands\install.py", line 310, in run
wb.build(autobuilding=True)
File "c:\python27\lib\site-packages\pip\wheel.py", line 750, in build
self.requirement_set.prepare_files(self.finder)
File "c:\python27\lib\site-packages\pip\req\req_set.py", line 370, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "c:\python27\lib\site-packages\pip\req\req_set.py", line 587, in _prepare_file
session=self.session, hashes=hashes)
File "c:\python27\lib\site-packages\pip\download.py", line 810, in unpack_url
hashes=hashes
File "c:\python27\lib\site-packages\pip\download.py", line 661, in unpack_http_url
rmtree(temp_dir)
File "c:\python27\lib\site-packages\pip\_vendor\retrying.py", line 49, in wrapped_f
return Retrying(*dargs, **dkw).call(f, *args, **kw)
File "c:\python27\lib\site-packages\pip\_vendor\retrying.py", line 212, in call
raise attempt.get()
File "c:\python27\lib\site-packages\pip\_vendor\retrying.py", line 247, in get
six.reraise(self.value[0], self.value[1], self.value[2])
File "c:\python27\lib\site-packages\pip\_vendor\retrying.py", line 200, in call
attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
File "c:\python27\lib\site-packages\pip\utils\__init__.py", line 102, in rmtree
onerror=rmtree_errorhandler)
File "c:\python27\lib\shutil.py", line 249, in rmtree
onerror(os.remove, fullname, sys.exc_info())
File "c:\python27\lib\site-packages\pip\utils\__init__.py", line 110, in rmtree_errorhandler
if os.stat(path).st_mode & stat.S_IREAD:
WindowsError: [Error 5] Access is denied: 'c:\\users\\ganesr01\\appdata\\local\\
temp\\pip-nhsft2-unpack\\pypiwin32-219-cp27-none-win32.whl'
Re-run the command except open up command prompt as admin
Edit: If that doesn't work it looks like you do not have permissions to write to that folder You need to change the permissions on those folders.

Windows 8 pip install mitmproxy error

I am trying to install mitmproxy on Windows 8
pip install mitmproxy
I have installed Python version 2.7.9 and pip version 7.1.2
but I keep getting this error:
Collecting mitmproxy
Exception:
Traceback (most recent call last):
File "c:\python27\lib\site-packages\pip\basecommand.py", line 211, in main
status = self.run(options, args)
File "c:\python27\lib\site-packages\pip\commands\install.py", line 305, in run
wb.build(autobuilding=True)
File "c:\python27\lib\site-packages\pip\wheel.py", line 705, in build
self.requirement_set.prepare_files(self.finder)
File "c:\python27\lib\site-packages\pip\req\req_set.py", line 334, in prepare_files
functools.partial(self._prepare_file, finder))
File "c:\python27\lib\site-packages\pip\req\req_set.py", line 321, in _walk_req_to_install
more_reqs = handler(req_to_install)
File "c:\python27\lib\site-packages\pip\req\req_set.py", line 461, in _prepare_file
req_to_install.populate_link(finder, self.upgrade)
File "c:\python27\lib\site-packages\pip\req\req_install.py", line 250, in populate_link
self.link = finder.find_requirement(self, upgrade)
File "c:\python27\lib\site-packages\pip\req\req_install.py", line 262, in link
self._link = self._wheel_cache.cached_wheel(link, self.name)
File "c:\python27\lib\site-packages\pip\wheel.py", line 63, in cached_wheel
self._cache_dir, link, self._format_control, package_name)
File "c:\python27\lib\site-packages\pip\wheel.py", line 143, in cached_wheel
return pip.index.Link(path_to_url(path), trusted=True)
File "c:\python27\lib\site-packages\pip\download.py", line 456, in path_to_url
url = urllib_parse.urljoin('file:', urllib_request.pathname2url(path))
File "c:\python27\lib\nturl2path.py", line 65, in pathname2url
path = path + '/' + urllib.quote(comp)
File "c:\python27\lib\urllib.py", line 1294, in quote
return ''.join(map(quoter, s))
KeyError: u'\xe1'

Categories

Resources