首页 文章

如何通过终端安装google-api-python-client

提问于
浏览
1

我试图安装google-api-python-client软件包,使用终端和

pip install --upgrade google-api-python-client

同样的结果

sudo -H  pip install --upgrade google-api-python-client

我发现,有人建议使用这种方法:

sudo chown -R zkid18 /Users/zkid18/Library/Logs/pip
chown: /Users/zkid18/Library/Logs/pip: No such file or directory

sudo chown -R zkid18 /Users/zkid18/Library/Cashes/pip
chown: /Users/zkid18/Library/Cashes/pip: No such file or directory

同样的结果,当我通过Pycharm我的异常安装时

异常:回溯(最近一次调用最后一次):文件"/Library/Python/2.7/site-packages/pip/basecommand.py",第215行,在主状态= self.run(options,args)文件"/Library/Python/2.7/site-packages/pip/commands/install.py",第317行,在运行前缀= options.prefix_path,文件"/Library/Python/2.7/site-packages/pip/req/req_set.py",第736行,在安装中requirement.uninstall(auto_confirm = True)文件"/Library/Python/2.7/site-packages/pip/req/req_install.py",第742行,在卸载paths_to_remove.remove(auto_confirm)文件"/Library/Python/2.7/site-packages/pip/req/req_uninstall.py",第115行,删除重命名(path,new_path)文件“/Library/Python/2.7/site-packages/pip / utils / init .py ", line 267, in renames shutil.move(old, new) File " /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py ", line 302, in move copy2(src, real_dst) File " /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2 .7 / shutil.py ", line 131, in copy2 copystat(src, dst) File " /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py“,第103行,在copystat os.chflags(dst,st.st_flags)中OSError: [Errno 1]不允许操作:'/tmp/pip-uxDRkx-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info'

1 回答

  • 0

    使用virtualenv安装

    virtualenv temp
    source temp/bin/activate
    pip install --upgrade google-api-python-client
    

    或忽略六

    sudo pip install --upgrade google-api-python-client --ignore-installed six
    

相关问题