操作系统:Windows 10 x64
我正在尝试使用命令
安装watson-developer-cloudpip 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
答案 0 :(得分:0)
确保以管理员运行命令。
之后,使用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中看到。