First of all
Install python
then
Install pip
At last
Execute the following command in cmd error
pip install qrcode
pip install pillow
cmd command execution pip install qrcode error bothering me for a few months,
Given as follows:
C:\Users\cby>pip install qrcode
Downloading/unpacking qrcode
Downloading qrcode-6.1-py2.py3-none-any.whl
Cleaning up...
Exception:
Traceback (most recent call last):
File "C:\install\python3.4\lib\site-packages\pip\_vendor\pkg_resources.py", line 2421, in _dep_map
return self.__dep_map
File "C:\install\python3.4\lib\site-packages\pip\_vendor\pkg_resources.py", line 2283, in __getattr__
raise AttributeError(attr)
AttributeError: _DistInfoDistribution__dep_map
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\install\python3.4\lib\site-packages\pip\basecommand.py", line 122, in main
status = self.run(options, args)
File "C:\install\python3.4\lib\site-packages\pip\commands\install.py", line 278, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "C:\install\python3.4\lib\site-packages\pip\req.py", line 1265, in prepare_files
req_to_install.extras):
File "C:\install\python3.4\lib\site-packages\pip\_vendor\pkg_resources.py", line 2232, in requires
dm = self._dep_map
File "C:\install\python3.4\lib\site-packages\pip\_vendor\pkg_resources.py", line 2423, in _dep_map
self.__dep_map = self._compute_dependencies()
File "C:\install\python3.4\lib\site-packages\pip\_vendor\pkg_resources.py", line 2456, in _compute_dependencies
common = frozenset(reqs_for_extra(None))
File "C:\install\python3.4\lib\site-packages\pip\_vendor\pkg_resources.py", line 2453, in reqs_for_extra
if req.marker_fn(override={'extra':extra}):
File "C:\install\python3.4\lib\site-packages\pip\_vendor\_markerlib\markers.py", line 113, in marker_fn
return eval(compiled_marker, environment)
File "<environment marker>", line 1, in <module>
NameError: name 'platform_system' is not defined
Storing debug log for failure in C:\Users\cby\pip\pip.log
Solution
Update pip
python -m pip install --upgrade pip
Downloading/unpacking pip from https://files.pythonhosted.org/packages/30/db/9e38760b32e3e7f40cce46dd5fb107b8c73840df38f0046d8e6514e675a1/pip-19.2.3-py2.py3-none-any.whl#sha256=340a0ba40fdeb16413914c0fcd8e0b4ebb0bf39a900ec80e11c05d836c05103f
Installing collected packages: pip
Found existing installation: pip 1.5.4
Uninstalling pip:
Successfully uninstalled pip
Successfully installed pip
Cleaning up...
Then install qrcode installation was successful.
The installation command pillow when pip install error, modify the command pip install Pillow executed successfully.
Why are not installing the PIL it? PIL module only supports the following versions python2.7 and can not be used after python3, the official recommended python3.x PIL module instead of using the Pillow, Pillow in fact fully compatible with PIL, also part of the function has been improved.
If you do not want to use pip install, or want to install a separate download offline, please visit the official website python PyPI columns, search pillow, and select the latest version.
Reference https://pypi.org/project/Pillow/3.2.0/#files