无法点击安装watson-developer-cloud

问题描述 投票:0回答:1

操作系统:Windows 10 x64

我正在尝试使用该命令安装watson-developer-cloud

pip install --upgrade watson-developer-cloud

但是,我收到以下错误

Exception:
Traceback (most recent call last):
  File "C:\Users\AurangzebRathore\Anaconda2\lib\site-
packages\pip\basecommand.py", line 215, in main
    status = self.run(options, args)
  File "C:\Users\AurangzebRathore\Anaconda2\lib\site-
packages\pip\commands\install.py", line 342, in run
    prefix=options.prefix_path,
  File "C:\Users\AurangzebRathore\Anaconda2\lib\site-packages\pip\req\req_set.py", line 784, in install
**kwargs
  File "C:\Users\AurangzebRathore\Anaconda2\lib\site-packages\pip\req\req_install.py", line 851, in install
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
  File "C:\Users\AurangzebRathore\Anaconda2\lib\site-packages\pip\req\req_install.py", line 1064, in move_wheel_files
    isolated=self.isolated,
  File "C:\Users\AurangzebRathore\Anaconda2\lib\site-packages\pip\wheel.py", 
line 345, in move_wheel_files
    clobber(source, lib_dir, True)
  File "C:\Users\AurangzebRathore\Anaconda2\lib\site-packages\pip\wheel.py", line 323, in clobber
    shutil.copyfile(srcfile, destfile)
  File "C:\Users\AurangzebRathore\Anaconda2\lib\shutil.py", line 97, in copyfile
    with open(dst, 'wb') as fdst:
IOError: [Errno 13] Permission denied: 
'C:\\Users\\AurangzebRathore\\Anaconda2\\Lib\\site-packages\\_cffi_backend.pyd'

我试着用

$ easy_install --upgrade watson-developer-cloud

但是当我运行代码时,它仍然说

ImportError: No module named watson_developer_cloud
python ibm-watson watson
1个回答
0
投票

确保以管理员身份运行命令。

  • 找到命令提示符(cmd.exe)
  • 右键单击“命令提示符”
  • 以管理员身份运行

之后,使用pip --version,看看是否正常工作。如果没有,则需要再次安装。如果您从源代码安装Python,使用python.org的安装程序,或者通过Homebrew安装Python,那么您应该已经安装了pip

如果尚未安装pip,则首先尝试从标准库引导它:

python -m ensurepip --default-pip

并尝试更新您的点子:

python -m pip install --upgrade

安装您的Watson包:

pip install -I watson-developer-cloud==0.26.1

Obs。:这是API参考中的官方命令,您可以在此link中看到。

© www.soinside.com 2019 - 2024. All rights reserved.