Collecting MarkupSafe==1.0
Downloading http://mirrors.aliyun.com/pypi/packages/4d/de/32d741db316d8fdb7680822dd37001ef7a448255de9699ab4bfcbdf4172b/MarkupSafe-1.0.tar.gz (14 kB)
ERROR: Command errored out with exit status 1:
command: 'D:\Anaconda3\envs\lecture01_tf\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\ASUS\\AppData\\Local\\Temp\\pip-install-n4ge_2m8\\MarkupSafe\\setup.py'"'"'; __file__='"'"'C:\\Users\\ASUS\\AppData\\Local\\Temp\\pip-install-n4ge_2m8\\MarkupSafe\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\ASUS\AppData\Local\Temp\pip-install-n4ge_2m8\MarkupSafe\pip-egg-info'
cwd: C:\Users\ASUS\AppData\Local\Temp\pip-install-n4ge_2m8\MarkupSafe\
Complete output (5 lines):
Traceback (most recent call last):
File "" , line 1, in <module>
File "C:\Users\ASUS\AppData\Local\Temp\pip-install-n4ge_2m8\MarkupSafe\setup.py", line 6, in <module>
from setuptools import setup, Extension, Feature
ImportError: cannot import name 'Feature'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
显然是python setuptools的版本问题,然后更改setuptools版本:
pip install --upgrade pip setuptools==45.2.0
pip install MarkupSafe==1.0
再次报错
ERROR: Could not install packages due to an EnvironmentError: [WinError 5] 拒绝访问。: 'd:\\anaconda3\\envs\\lecture01_tf\\lib\\site-packages\\~arkupsafe\\_speedups.cp36-win_amd64.pyd'
Consider using the `--user` option or check the permissions.
显然Consider using the --user
option or check the permissions.让我加上这个选项
pip install --user MarkupSafe==1.0
安装完成:
Looking in indexes: http://mirrors.aliyun.com/pypi/simple/
Requirement already satisfied: MarkupSafe==1.0 in d:\anaconda3\envs\lecture01_tf\lib\site-packages (1.0)