The files README.rst and memory_profiler.py contain invalid characters for python to decode when setup.py is trying to read them. The quotes in “Resident Set Size” are Unicode characters 0xe2809c and 0xe2809d, whereas the standard ascii quote is " with ascii code 22.
Using pip install memory_profiler --user will get the cached version memory_profiler-0.59.0.tar.gz (38 kB), which contains the special quotes. pip will fail the installation and use a fallback cached version memory_profiler-0.58.0.tar.gz (36 kB).
The complete error is as follow:
Traceback (most recent call last):
File "D:\share\memory_profiler-master\memory_profiler-master\setup.py", line 33, in <module>
long_description=open('README.rst').read(),
UnicodeDecodeError: 'cp950' codec can't decode byte 0xe2 in position 14818: illegal multibyte sequence
and
Traceback (most recent call last):
File "D:\share\memory_profiler-master\memory_profiler-master\setup.py", line 34, in <module>
version=find_version("memory_profiler.py"),
File "D:\share\memory_profiler-master\memory_profiler-master\setup.py", line 8, in find_version
version_file = f.read()
UnicodeDecodeError: 'cp950' codec can't decode byte 0xe2 in position 10853: illegal multibyte sequence
Changing the quotes back to standard ascii fixes the error.
The files
README.rst
andmemory_profiler.py
contain invalid characters for python to decode whensetup.py
is trying to read them. The quotes in“Resident Set Size”
are Unicode characters0xe2809c
and0xe2809d
, whereas the standard ascii quote is"
with ascii code22
.Using
pip install memory_profiler --user
will get the cached versionmemory_profiler-0.59.0.tar.gz (38 kB)
, which contains the special quotes.pip
will fail the installation and use a fallback cached versionmemory_profiler-0.58.0.tar.gz (36 kB)
.The complete error is as follow:
and
Changing the quotes back to standard ascii fixes the error.
Environment
OS:
Windows 10
Python:3.8.10
and3.10.0