将google-api-python-client安装到pc上 - 访问被拒绝

时间:2017-03-04 16:21:20

标签: python google-api

我在本地启动并运行谷歌云。这是我正在安装的个人电脑。

我正在投放,as suggestedpip install --upgrade google-api-python-client

我收到以下回复:

  Using cached pyasn1-0.2.3-py2.py3-none-any.whl
Installing collected packages: uritemplate, pyasn1, rsa, httplib2, pyasn1-module
s, oauth2client, google-api-python-client
  Found existing installation: pyasn1 0.1.9
    DEPRECATION: Uninstalling a distutils installed project (pyasn1) has been de
precated and will be removed in a future version. This is due to the fact that u
ninstalling a distutils project will only partially uninstall the project.
    Uninstalling pyasn1-0.1.9:
Exception:
Traceback (most recent call last):
  File "C:\ProgramData\Anaconda2\lib\site-packages\pip\basecommand.py", line 215
, in main
    status = self.run(options, args)
  File "C:\ProgramData\Anaconda2\lib\site-packages\pip\commands\install.py", lin
e 342, in run
    prefix=options.prefix_path,
  File "C:\ProgramData\Anaconda2\lib\site-packages\pip\req\req_set.py", line 778
, in install
    requirement.uninstall(auto_confirm=True)
  File "C:\ProgramData\Anaconda2\lib\site-packages\pip\req\req_install.py", line
 754, in uninstall
    paths_to_remove.remove(auto_confirm)
  File "C:\ProgramData\Anaconda2\lib\site-packages\pip\req\req_uninstall.py", li
ne 115, in remove
    renames(path, new_path)
  File "C:\ProgramData\Anaconda2\lib\site-packages\pip\utils\__init__.py", line
267, in renames
    shutil.move(old, new)
  File "C:\ProgramData\Anaconda2\lib\shutil.py", line 303, in move
    os.unlink(src)
WindowsError: [Error 5] Access is denied: 'c:\\programdata\\anaconda2\\lib\\site
-packages\\pyasn1-0.1.9-py2.7.egg-info'

C:\Users\%USER%>

有没有人遇到并征服过这个问题?

1 个答案:

答案 0 :(得分:1)

以管理员身份运行powershell为我解决了这个问题。

如果您需要协助在Windows上运行powershell,请参阅this link