pip install mitmproxy - fails on watchdog-0.8.3.tar.gz with "Permission denied" error (Python 2.7.11 on Win XP SP3);

Steve Petrie, P.Eng. apetrie at aspetrie.net
Thu Jan 21 11:40:29 EST 2016


Greetings To Python-list,

I'm trying to install Python package:

   mitmproxy (https://mitmproxy.org/)

on Windows XP SP3.

I'm a complete Python newbie. Not planning to do any Python programming 
at this time. Just trying to get package mitmproxy working (or at least 
the mitmdump component, since "There is no interactive user interface on 
Windows." per:

   http://docs.mitmproxy.org/en/stable/install.html

* * *
* * *

I have installed Python that announces itself on the Python command line 
as:

   Python 2.7.11 (v2.7.11:6d1b6a68f775, Dec  5 2015, 20:32:19) [MSC 
v.1500 32 bit (Intel)] on win32

* * *
* * *

I'm using the following command in a Win XP cmd.exe shell (not the 
Python shell) to install mitmproxy:

   pip install mitmproxy

The first install attempt failed, ending with some diagnostics displayed 
in the Win XP cmd.exe shell window:

   C:\Documents and Settings\SteveP>pip install mitmproxy
   Collecting mitmproxy
     Downloading mitmproxy-0.15.tar.gz (1.7MB)
       100% |################################| 1.7MB 4.5kB/s
   ...

Collecting Pillow<3.1,>=3.0.0 (from mitmproxy)
  Downloading Pillow-3.0.0-cp27-none-win32.whl (1.2MB)
    100% |################################| 1.2MB 6.1kB/s
   Collecting pyperclip<1.6,>=1.5.22 (from mitmproxy)
     Downloading pyperclip-1.5.26.zip
   Exception:
   Traceback (most recent call last):
     File "e:\a p p s\python27\lib\site-packages\pip\basecommand.py", 
line 211, in main
       status = self.run(options, args)
     File "e:\a p p 
s\python27\lib\site-packages\pip\commands\install.py", line 294, in run
       requirement_set.prepare_files(finder)
     File "e:\a p p s\python27\lib\site-packages\pip\req\req_set.py", 
line 334, in prepare_files
       functools.partial(self._prepare_file, finder))
     File "e:\a p p s\python27\lib\site-packages\pip\req\req_set.py", 
line 321, in _walk_req_to_install
       more_reqs = handler(req_to_install)
     File "e:\a p p s\python27\lib\site-packages\pip\req\req_set.py", 
line 491, in _prepare_file
       session=self.session)
     File "e:\a p p s\python27\lib\site-packages\pip\download.py", line 
825, in unpack_url
       session,
     File "e:\a p p s\python27\lib\site-packages\pip\download.py", line 
677, in unpack_http_url
       unpack_file(from_path, location, content_type, link)
     File "e:\a p p s\python27\lib\site-packages\pip\utils\__init__.py", 
line 645,in unpack_file
       flatten=not filename.endswith('.whl')
     File "e:\a p p s\python27\lib\site-packages\pip\utils\__init__.py", 
line 546,in unzip_file
       fp = open(fn, 'wb')
   IOError: [Errno 13] Permission denied: 
'c:\\docume~1\\stevep\\locals~1\\temp\\pip-buildpnnfyf\\pyperclip\\docs/make.bat'
   You are using pip version 7.1.2, however version 8.0.0 is available.
   You should consider upgrading via the 'python -m pip 
install --upgrade pip' command.

   C:\Documents and Settings\SteveP>

* * *
* * *

I  upgraded pip to version 8.0.0:

   C:\Documents and Settings\SteveP>python -m pip install --upgrade pip
   Collecting pip
     Downloading pip-8.0.0-py2.py3-none-any.whl (1.2MB)
       100% |################################| 1.2MB 9.1kB/s
   Installing collected packages: pip
     Found existing installation: pip 7.1.2
       Uninstalling pip-7.1.2:
         Successfully uninstalled pip-7.1.2
   Successfully installed pip-8.0.0

* * *
* * *

I tried again to install mitmproxy, and the installation got a little 
further, but failed again on a similar error, on a different file 
(watchdog-0.8.3.tar.gz instead of pyperclip-1.5.26.zip):

   C:\Documents and Settings\SteveP>pip install mitmproxy

   C:\Documents and Settings\SteveP>pip install mitmproxy
   e:\a p p s\python27\lib\site-packages\pip\pep425tags.py:89: 
RuntimeWarning: Config variable 'Py_DEBUG' is unset, Python ABI tag may 
be incorrect
     warn=(impl == 'cp')):
   e:\a p p s\python27\lib\site-packages\pip\pep425tags.py:93: 
RuntimeWarning: Config variable 'WITH_PYMALLOC' is unset, Python ABI tag 
may be incorrect
     warn=(impl == 'cp')):
   e:\a p p s\python27\lib\site-packages\pip\pep425tags.py:99: 
RuntimeWarning: Config variable 'Py_UNICODE_SIZE' is unset, Python ABI 
tag may be incorrect
     sys.version_info < (3, 3))) \
   Collecting mitmproxy
     Using cached mitmproxy-0.15.tar.gz
   Collecting six<1.11,>=1.10.0 (from mitmproxy)
     Using cached six-1.10.0-py2.py3-none-any.whl
   ...

   Collecting pyperclip<1.6,>=1.5.22 (from mitmproxy)
     Using cached pyperclip-1.5.26.zip
   Collecting pydivert>=0.0.7 (from mitmproxy)
     Downloading pydivert-0.0.7.zip
   Collecting watchdog<0.9,>=0.8.3 (from mitmproxy)
     Downloading watchdog-0.8.3.tar.gz (83kB)
       100% |################################| 86kB 6.8kB/s
   Exception:
   Traceback (most recent call last):
     File "e:\a p p s\python27\lib\site-packages\pip\basecommand.py", 
line 209, in main
       status = self.run(options, args)
     File "e:\a p p 
s\python27\lib\site-packages\pip\commands\install.py", line 299, in run
       requirement_set.prepare_files(finder)
     File "e:\a p p s\python27\lib\site-packages\pip\req\req_set.py", 
line 359, in  prepare_files
       ignore_dependencies=self.ignore_dependencies))
     File "e:\a p p s\python27\lib\site-packages\pip\req\req_set.py", 
line 576, in  _prepare_file
       session=self.session, hashes=hashes)
     File "e:\a p p s\python27\lib\site-packages\pip\download.py", line 
809, in unp ack_url
       hashes=hashes
     File "e:\a p p s\python27\lib\site-packages\pip\download.py", line 
652, in unp ack_http_url
       unpack_file(from_path, location, content_type, link)
     File "e:\a p p s\python27\lib\site-packages\pip\utils\__init__.py", 
line 604,  in unpack_file
       untar_file(filename, location)
     File "e:\a p p s\python27\lib\site-packages\pip\utils\__init__.py", 
line 576,  in untar_file
       with open(path, 'wb') as destfp:IOError: [Errno 13] Permission 
denied: 
'c:\\docume~1\\stevep\\locals~1\\temp\\pip-build-5acs92\\watchdog\\docs/make.bat'

* * *
* * *

In both failure cases, it looks to me like there is a bug in the pip 
logic, that is using a *nix forward slash "/" instead of a double 
backslash "\\" before the file name "make.bat".

The upgrade to pip-8.0.0 fixed the first occurrence of the problem, but 
not the second occurrence.

I note the warning lines displayed at the start of the second install 
attempt:

   C:\Documents and Settings\SteveP>pip install mitmproxy
   e:\a p p s\python27\lib\site-packages\pip\pep425tags.py:89: 
RuntimeWarning: Config variable 'Py_DEBUG' is unset, Python ABI tag may 
be incorrect
     warn=(impl == 'cp')):
   e:\a p p s\python27\lib\site-packages\pip\pep425tags.py:93: 
RuntimeWarning: Config variable 'WITH_PYMALLOC' is unset, Python ABI tag 
may be incorrect
     warn=(impl == 'cp')):
   e:\a p p s\python27\lib\site-packages\pip\pep425tags.py:99: 
RuntimeWarning: Config variable 'Py_UNICODE_SIZE' is unset, Python ABI 
tag may be incorrect
     sys.version_info < (3, 3))) \

and wonder if they are relevant to the failure.

* * *
* * *

Any advice Python-list members could provide, would be gratefully 
received.

*** Please note: I subscribed to the mailing list python-list at python.org 
but have not yet received an email confirming my subscription. So a cc 
to my email address apetrie at aspetrie.net on any response, would be 
appreciated. ***

Thanks In Advance !!

Steve

apetrie at aspetrie.net





More information about the Python-list mailing list