Hye伙计们,当我试图安装clarifai库时,我有点被困了
py -m pip install clarifai --upgrade
当我将该命令输入cmd时,我收到此错误:
reading manifest file 'Pillow.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'Pillow.egg-info\SOURCES.txt'
copying PIL\OleFileIO-README.md -> build\lib.win-amd64-3.6\PIL
running build_ext
building 'PIL._imaging' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
----------------------------------------
Rolling back uninstall of pillow
Command ""C:\Program Files\Python36\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\StyleZ\\AppData\\Local\\Temp\\pip-build-saobo9i2\\Pillow\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\StyleZ\AppData\Local\Temp\pip-aya2mngc-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\StyleZ\AppData\Local\Temp\pip-build-saobo9i2\Pillow\
我已经安装了构建工具,这是我从控制台获得的错误:
Installing collected packages: Pillow, clarifai
Found existing installation: pillow 5.0.0
Uninstalling pillow-5.0.0:
Exception:
Traceback (most recent call last):
File "C:\Program Files\Python36\lib\shutil.py", line 544, in move
os.rename(src, real_dst)
PermissionError: [WinError 5] Access is denied: 'c:\\program files\\python36\\lib\\site-packages\\pil\\__init__.py' -> 'C:\\Users\\StyleZ\\AppData\\Local\\Temp\\pip-4n872yw7-uninstall\\program files\\python36\\lib\\site-packages\\pil\\__init__.py'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Program Files\Python36\lib\site-packages\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "C:\Program Files\Python36\lib\site-packages\pip\commands\install.py", line 342, in run
prefix=options.prefix_path,
File "C:\Program Files\Python36\lib\site-packages\pip\req\req_set.py", line 778, in install
requirement.uninstall(auto_confirm=True)
File "C:\Program Files\Python36\lib\site-packages\pip\req\req_install.py", line 754, in uninstall
paths_to_remove.remove(auto_confirm)
File "C:\Program Files\Python36\lib\site-packages\pip\req\req_uninstall.py", line 115, in remove
renames(path, new_path)
File "C:\Program Files\Python36\lib\site-packages\pip\utils\__init__.py", line 267, in renames
shutil.move(old, new)
File "C:\Program Files\Python36\lib\shutil.py", line 559, in move
os.unlink(src)
PermissionError: [WinError 5] Access is denied: 'c:\\program files\\python36\\lib\\site-packages\\pil\\__init__.py'
我正在尝试多种方法......但正如我在第二个控制台中注意到的那样,我没有权限,而程序以管理员身份运行,同时我只有1个用户,那就是这个管理员...
知道怎么解决吗?
答案 0 :(得分:1)
okey我发现如何解决这个问题:)如果somone想知道
py -m pip install clarifai --upgrade
需要更改为:
python -m pip install clarifai
也不要忘记将其作为管理员运行