我试图在python virtualenv中安装flask。在安装过程中,我不断收到错误信息。
我尝试过多次重新安装,但没有找到任何合适的解决方案。
(venv) C:\Windows\System32\venv\Scripts>pip install flask
Collecting flask
Using cached Flask-0.12.2-py2.py3-none-any.whl
Collecting Jinja2>=2.4 (from flask)
Using cached Jinja2-2.9.6-py2.py3-none-any.whl
Requirement already satisfied: Werkzeug>=0.7 in c:\windows\system32\venv\lib\site-packages (from flask)
Collecting click>=2.0 (from flask)
Using cached click-6.7-py2.py3-none-any.whl
Requirement already satisfied: itsdangerous>=0.21 in c:\windows\system32\venv\lib\site-packages (from flask)
Collecting MarkupSafe>=0.23 (from Jinja2>=2.4->flask)
Using cached MarkupSafe-1.0.tar.gz
Building wheels for collected packages: MarkupSafe
Running setup.py bdist_wheel for MarkupSafe ... error
Failed building wheel for MarkupSafe
Running setup.py clean for MarkupSafe
Failed to build MarkupSafe
Installing collected packages: MarkupSafe, Jinja2, click, flask
Running setup.py install for MarkupSafe ... error
Exception:
Traceback (most recent call last):
File "c:\windows\system32\venv\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 0xb3 in position 52: invalid start byte
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\windows\system32\venv\lib\site-packages\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "c:\windows\system32\venv\lib\site-packages\pip\commands\install.py", line 342, in run
prefix=options.prefix_path,
File "c:\windows\system32\venv\lib\site-packages\pip\req\req_set.py", line 784, in install
**kwargs
File "c:\windows\system32\venv\lib\site-packages\pip\req\req_install.py", line 878, in install
spinner=spinner,
File "c:\windows\system32\venv\lib\site-packages\pip\utils\__init__.py", line 676, in call_subprocess
line = console_to_str(proc.stdout.readline())
File "c:\windows\system32\venv\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 0xb3 in position 52: invalid start byte