我正在尝试安装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/bascommand .py",第215行,在main状态= self.run(options, args)文件"/Library/Python/2.7/site-packages/pip/commands/install.py",第317行,在run中= 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行重命名(路径,new_path)文件"/Library/Python/2.7/site-packages/pip/utils/init.py",第267行,重命名shutil。(旧的,新的移动)文件"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shuttil .py",第302行,在move .py中real_dst copy2 (src)文件"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py",第131行,在copy2中copystat (src, dst)文件"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py",第103行操作系统。st.st_flags chflags (dst)OSError: [Errno 1] Operation not允许:'/tmp/pip-uxDRkx-uninstall/System/Library/Frameworks/python .framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7. eggs -info'
安装virtualenv
virtualenv temp
source temp/bin/activate
pip install --upgrade google-api-python-client
或忽略Six
sudo pip install --upgrade google-api-python-client --ignore-installed six