我可以将osx权限设置为什么,以便可以安装python模块?

时间:2019-05-02 17:14:34

标签: python module permissions

由于严格的权限,我无法在我的计算机上安装python的xlrd模块。我做了sudo pip install,它似乎可以在终端上运行,但是当我尝试使用它时,没有找到模块。我使用的是2.7python,但也下载了空闲时提供的3.7.3版本。

我尝试了一些我在互联网上发现的类似问题的命令

mako$ sudo chmod -R ugo+rX /lib/python2.7/site-packages/
Password:
chmod: /lib/python2.7/site-packages/: No such file or directory

这是我安装模块的方式

mako$ sudo pip install xlrd

DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
WARNING: The directory '/Users/mako/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.
WARNING: The directory '/Users/mako/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.
Collecting xlrd
  Downloading https://files.pythonhosted.org/packages/b0/16/63576a1a001752e34bf8ea62e367997530dc553b689356b9879339cf45a4/xlrd-1.2.0-py2.py3-none-any.whl (103kB)
     |████████████████████████████████| 112kB 164kB/s 
Installing collected packages: xlrd
Successfully installed xlrd-1.2.0

如果我登录到用户,我不确定为什么它说我不拥有父目录。请任何帮助表示赞赏,我不知道我在做什么。

0 个答案:

没有答案