Can't install wrapt on Windows
Hi,
I have trouble installing pylint on Windows 10, Python 3.6. There's a
problem during the installation of wrapt, which is a dependency of pylint.
Here are the contents of the commandline:
C:\WINDOWS\system32>python -m pip install pylint
Collecting pylint
Using cached pylint-1.7.4-py2.py3-none-any.whl
Collecting colorama; sys_platform == "win32" (from pylint)
Using cached colorama-0.3.9-py2.py3-none-any.whl
Requirement already satisfied: mccabe in
c:\users\(...)\appdata\local\programs\python\python36\lib\site-packages (from
pylint)
Requirement already satisfied: isort>=4.2.5 in
c:\users\(...)\appdata\local\programs\python\python36\lib\site-packages (from
pylint)
Collecting astroid>=1.5.1 (from pylint)
Using cached astroid-1.5.3-py2.py3-none-any.whl
Requirement already satisfied: six in
c:\users\(...)\appdata\local\programs\python\python36\lib\site-packages (from
pylint)
Requirement already satisfied: lazy-object-proxy in
c:\users\(...)\appdata\local\programs\python\python36\lib\site-packages (from
astroid>=1.5.1->pylint)
Collecting wrapt (from astroid>=1.5.1->pylint)
Using cached wrapt-1.10.11.tar.gz
Installing collected packages: colorama, wrapt, astroid, pylint
Running setup.py install for wrapt ... error
Exception:
Traceback (most recent call last):
File
"C:\Users\(...)\AppData\Local\Programs\Python\Python36\lib\site-packages\pip\compat\__init__.py",
line 73, in console_to_str
return s.decode(sys.__stdout__.encoding)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 51:
invalid start byte
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File
"C:\Users\(...)\AppData\Local\Programs\Python\Python36\lib\site-packages\pip\basecommand.py",
line 215, in main
status = self.run(options, args)
File
"C:\Users\(...)\AppData\Local\Programs\Python\Python36\lib\site-packages\pip\commands\install.py",
line 342, in run
prefix=options.prefix_path,
File
"C:\Users\(...)\AppData\Local\Programs\Python\Python36\lib\site-packages\pip\req\req_set.py",
line 784, in install
**kwargs
File
"C:\Users\(...)\AppData\Local\Programs\Python\Python36\lib\site-packages\pip\req\req_install.py",
line 878, in install
spinner=spinner,
File
"C:\Users\(...)\AppData\Local\Programs\Python\Python36\lib\site-packages\pip\utils\__init__.py",
line 676, in call_subprocess
line = console_to_str(proc.stdout.readline())
File
"C:\Users\(...)\AppData\Local\Programs\Python\Python36\lib\site-packages\pip\compat\__init__.py",
line 75, in console_to_str
return s.decode('utf_8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 51:
invalid start byte
The same problem happens from a venv.
I have reinstalled Python 3.6.3 and 3.6.4rc1 several times, that didn't
change anything.
Note that the installation of pylint was reported to be successful a few
times but despite that, pylint was unusable: when I tried to use pylint
an error message said that module wrapt.wrappers couldn't be found.
Since the wrapt module seemed to be incorrectly installed I uninstalled
it. I don't know how I managed to get passed the above error message a
couple of times when installing pylint.
I would appreciate any help.
--
https://mail.python.org/mailman/listinfo/python-list
Re: Can't install wrapt on Windows
Le 10/12/2017 à 21:46, dieter (dieter) a écrit :
Cutter writes:
...
I have trouble installing pylint on Windows 10, Python 3.6. There's a
problem during the installation of wrapt, which is a dependency of
pylint.
Here are the contents of the commandline:
C:\WINDOWS\system32>python -m pip install pylint
...
Collecting wrapt (from astroid>=1.5.1->pylint)
Using cached wrapt-1.10.11.tar.gz
Installing collected packages: colorama, wrapt, astroid, pylint
Running setup.py install for wrapt ... error
Exception:
Traceback (most recent call last):
File "C:\Users\(...)\AppData\Local\Programs\Python\Python36\lib\site-packa
ges\pip\compat\__init__.py", line 73, in console_to_str
return s.decode(sys.__stdout__.encoding)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 51:
invalid start byte
Obviously, something causes some "s" to be decoded using the "stdout" encoding
(which usually is the system encoding). In your case, this encoding is "utf-8",
but "s" does not seem to be utf-8 encoded.
I would use debugging to find out what "s" is, where is comes from and why it
does not use the "stdout" encoding.
I don't know how to use pdb. Instead, I've added the following
instruction at line 73 before the error occurs:
print("!! TEST !! : ", s)
Here's the output now:
> C:\WINDOWS\system32>python -m pdb
C:\Users\(...)\AppData\Local\Programs\Python\Python36\Lib\site-packages\pip\__main__.py
install pylint
>>
c:\users\(...)\appdata\local\programs\python\python36\lib\site-packages\pip\__main__.py(1)()
> -> from __future__ import absolute_import
> (Pdb) c
> Requirement already satisfied: pylint in
c:\users\(...)\appdata\local\programs\python\python36\lib\site-packages
> Requirement already satisfied: mccabe in
c:\users\(...)\appdata\local\programs\python\python36\lib\site-packages
(from pylint)
> Requirement already satisfied: six in
c:\users\(...)\appdata\local\programs\python\python36\lib\site-packages
(from pylint)
> Requirement already satisfied: isort>=4.2.5 in
c:\users\(...)\appdata\local\programs\python\python36\lib\site-packages
(from pylint)
> Requirement already satisfied: astroid<2.0 in
c:\users\(...)\appdata\local\programs\python\python36\lib\site-packages
(from pylint)
> Requirement already satisfied: colorama; sys_platform == "win32" in
c:\users\(...)\appdata\local\programs\python\python36\lib\site-packages
(from pylint)
> Requirement already satisfied: lazy-object-proxy in
c:\users\(...)\appdata\local\programs\python\python36\lib\site-packages
(from astroid<2.0->pylint)
> Collecting wrapt (from astroid<2.0->pylint)
> Using cached wrapt-1.10.11.tar.gz
> !! TEST !! : b'running egg_info\r\n'
> !! TEST !! : b'creating pip-egg-info\\wrapt.egg-info\r\n'
> !! TEST !! : b'writing pip-egg-info\\wrapt.egg-info\\PKG-INFO\r\n'
> !! TEST !! : b'writing dependency_links to
pip-egg-info\\wrapt.egg-info\\dependency_links.txt\r\n'
> !! TEST !! : b'writing top-level names to
pip-egg-info\\wrapt.egg-info\\top_level.txt\r\n'
> !! TEST !! : b"writing manifest file
'pip-egg-info\\wrapt.egg-info\\SOURCES.txt'\r\n"
> !! TEST !! : b"warning: manifest_maker: standard file '-c' not
found\r\n"
> !! TEST !! : b'\r\n'
> !! TEST !! : b"reading manifest file
'pip-egg-info\\wrapt.egg-info\\SOURCES.txt'\r\n"
> !! TEST !! : b"writing manifest file
'pip-egg-info\\wrapt.egg-info\\SOURCES.txt'\r\n"
> !! TEST !! : b''
> Building wheels for collected packages: wrapt
> Running setup.py bdist_wheel for wrapt ... !! TEST !! : b'usage:
-c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]\r\n'
> -!! TEST !! : b' or: -c --help [cmd1 cmd2 ...]\r\n'
> !! TEST !! : b' or: -c --help-commands\r\n'
> !! TEST !! : b' or: -c cmd --help\r\n'
> !! TEST !! : b'\r\n'
> !! TEST !! : b"error: invalid command 'bdist_wheel'\r\n"
> !! TEST !! : b''
> error
> Complete output from command
C:\Users\(...)\AppData\Local\Programs\Python\Python36\python.exe -u -c
"import setuptools,
tokenize;__file__='C:\\Users\\(...)\\AppData\\Local\\Temp\\pip-build-4_065lch\\wrapt\\setup.py';f=getattr(tokenize,
'open', open)(__file__);code=f.read().replace('\r\n',
'\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d
C:\Users\(...)\AppData\Local\Temp\tmpzyfae43tpip-wheel- --python-tag cp36:
> usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
> or: -c --help [cmd1 cmd2 ...]
> or: -c
