【发布时间】:2017-09-26 15:30:18
【问题描述】:
这里是新手错误。 我确实在我的 Mac 上安装了 Homebrew 和 pip,但在安装过程中出现了一些复杂情况。 例如,对于 pip,我的权限被拒绝。我去谷歌找到了“sudo - H”解决方案。但是有一些关于禁用轮子和日志的消息,我不小心退出了终端。
是否有任何命令让 pip 和 Homebrew 获取状态报告,比如一切正常或删除并重新安装是最好的方法?
编辑: 尝试在 pip 和 Homebrew 中安装一个包,如建议的那样,w/o sudo -h 得到了这个:
Exception:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/Library/Python/2.7/site-packages/pip/commands/install.py", line 342, in run
prefix=options.prefix_path,
File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 784, in install
**kwargs
File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 851, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 1064, in move_wheel_files
isolated=self.isolated,
File "/Library/Python/2.7/site-packages/pip/wheel.py", line 345, in move_wheel_files
clobber(source, lib_dir, True)
File "/Library/Python/2.7/site-packages/pip/wheel.py", line 323, in clobber
shutil.copyfile(srcfile, destfile)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 83, in copyfile
with open(dst, 'wb') as fdst:
IOError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/bellite.pyc'
不过好像和Python 2.7有关,我一点都不感兴趣。
当我使用 sudo -h 时,我得到了:
The directory '/Users/SimonOsipov/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/SimonOsipov/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Homebrew 安装包有 0 个问题
【问题讨论】:
-
你可以尝试通过 homebrew/pip 安装一个包,看看它是否正常工作......
-
你可以试试 brew reinstall 命令。
-
尝试安装任何软件包。如果
pip抛出有关文件权限的错误,则它无法正常工作。 -
试过了,检查编辑。
-
你应该让你的问题标题比“如何检查一切是否正常”更能提供信息。