Re: pip install mitmproxy - fails on watchdog-0.8.3.tar.gz with "Permission denied" error (Python 2.7.11 on Win XP SP3);
Chris, Thanks for your response -- much appreciated. Please see my remarks embedded below. - Original Message - From: "Chris Angelico" <ros...@gmail.com> To: "Steve Petrie, P.Eng." <apet...@aspetrie.net> Cc: <python-list@python.org> Sent: Saturday, January 23, 2016 10:14 AM Subject: Re: pip install mitmproxy - fails on watchdog-0.8.3.tar.gz with "Permission denied" error (Python 2.7.11 on Win XP SP3); On Fri, Jan 22, 2016 at 3:40 AM, Steve Petrie, P.Eng. <apet...@aspetrie.net> wrote: 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". I'm not sure what your exact problem is, but I can say that it isn't this; the Unix-style forward slash is perfectly legal under Windows (and it's even legal to mix and match). ChrisA I never knew that the forward slash is legal under Windows -- thanks for the tip :) After further research, I got mitmproxy installed under Windows XP. Now mitmdump starts ok (with one "warning"). * * * * * * In case other Windows XP "orphans" want to use mitmdump, here's what I learned (via Google): 1. There was a bug in pip-8.0.0 (bug fixed recently in pip-8.0.2) that caused the "Permission denied" error: I did another upgrade of pip, and this time the upgrade installed pip-8.0.2 (instead of pip-8.0.0). And pip-8.0.2 successfully installed mitmproxy. 2. But then mitmdump wouldn't start (can't use mitmproxy under Windows -- there's no GUI port): C:\Documents and Settings\SteveP>mitmdump --help failed to create process. This "failed to create process" problem, was caused by whitespace, in the pathname to the python directory, in the bang line in file mitmdump-script.py: I changed the bang line (wrapping the pathname in double quotes) in file mitmdump-script.py: from: #!e:\a p p s\python27\python.exe to: #!"e:\a p p s\python27\python.exe" and now mitmdump starts ok with one warning: C:\Documents and Settings\SteveP>mitmdump --help e:\a p p s\python27\lib\site-packages\watchdog\observers\__init__.py:89: UserWarning: Failed to import read_directory_changes. Fall back to polling. warnings.warn("Failed to import read_directory_changes. Fall back to polling.") usage: mitmdump-script.py [options] [filter] ... I tried to fix the warning, but so far no success (due to my Python ignorance). However, mitmdump does start (with the same warning) and it creates an empty output file: C:\Documents and Settings\SteveP>mitmdump -w mitmdump_20160123.txt e:\a p p s\python27\lib\site-packages\watchdog\observers\__init__.py:89: UserWarning: Failed to import read_directory_changes. Fall back to polling. warnings.warn("Failed to import read_directory_changes. Fall back to polling.") I haven't yet got mitmdump to actually write anything to the output file, but I expect that's just a matter of studying the mitmdump docs. * * * * * * Thanks again for the response. Best Regards, Steve P.S. Be assured -- I will soon be moving away from Windows XP to a new computer running Debian Linux. -- https://mail.python.org/mailman/listinfo/python-list
Re: pip install mitmproxy - fails on watchdog-0.8.3.tar.gz with "Permission denied" error (Python 2.7.11 on Win XP SP3);
- Original Message - From: "Chris Angelico" <ros...@gmail.com> To: "Steve Petrie, P.Eng." <apet...@aspetrie.net> Cc: <python-list@python.org> Sent: Saturday, January 23, 2016 2:56 PM Subject: Re: pip install mitmproxy - fails on watchdog-0.8.3.tar.gz with "Permission denied" error (Python 2.7.11 on Win XP SP3); In case other Windows XP "orphans" want to use mitmdump, here's what I learned (via Google): I changed the bang line (wrapping the pathname in double quotes) in file mitmdump-script.py: from: #!e:\a p p s\python27\python.exe to: #!"e:\a p p s\python27\python.exe" Spaces in names are often a pain. I'd raise this upstream as a bug report - it should be fixed properly rather than depending on manual editing. I'd like to raise the bug report you suggest, but I'm not clear on the meaning of the word "upstream" in relation to Python-list. (I've seen "upstream" used by participants in another forum <pgsql-gene...@postgresql.org> and always wondered what "upstream" meant there.) I know what "upstream" means, in terms of: water flow in a river, or vehicle flow on a highway, or data flow over a comms link. "upstream" is where a moving particle was, earlier in time But my puzzlement is -- where is "upstream" in relation to an email forum, in the context of a thread? The fix for the mitmdump bang line bug was applied to file mitmdump-script.py, and according to its "Date Modified" field on my Win XP, this file arrived in the e:\a p p s\Python27\Scripts\ directory, when I installed mitmproxy. So it looks to me like file mitmdump-script.py is a product of the mitmproxy project. Am I correct in assuming, that "upstream" in the context of this present thread, means I should report the bang line bug to an mitmproxy forum? Steve -- https://mail.python.org/mailman/listinfo/python-list
pip install mitmproxy - fails on watchdog-0.8.3.tar.gz with "Permission denied" error (Python 2.7.11 on Win XP SP3);
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