Python 3.x Clarifai安装错误:Visual C++;构建工具&x2B;拒绝访问

Python 3.x Clarifai安装错误:Visual C++;构建工具&x2B;拒绝访问,python-3.x,clarifai,Python 3.x,Clarifai,嘿,伙计们,当我试图安装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'

嘿,伙计们,当我试图安装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'
我尝试了很多事情。。。但正如我在第二个控制台中注意到的,我没有权限,而程序是作为管理员运行的,同时我只有一个用户,这就是这个管理员


知道怎么解决吗?

好的,我知道怎么解决了:)如果有人想知道的话

py -m pip install clarifai --upgrade
需要更改为:

python -m pip install clarifai
也别忘了以管理员的身份运行它