我正在尝试在mac计算机下使用带有可视代码的python
我有以下错误消息:
/usr/bin/python -m pip install pylint
user:~ user$ /usr/bin/python -m pip install pylint
/usr/bin/python: No module named pip
我找到了一些帮助,试试这个:
user:~ user$ easy_install pip
error: can't create or remove files in install directory
The following error occurred while trying to add or remove files in the
installation directory:
[Errno 13] Permission denied: '/Library/Python/2.7/site-packages/test-easy-install-19813.pth'
The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
/Library/Python/2.7/site-packages/
我不明白我为什么会这样:
[Errno 13] Permission denied: '/Library/Python/2.7/site-packages/test-easy-install-19813.pth'
因为我把这一行放在我的bash_profile
中# Setting PATH for Python 3.6
# The original version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.6/bin:${PATH}"
export PATH
如何安装库并使用我的mac使用python? (通常我在工作场所使用Linux系统,但现在我在个人电脑上......)
答案 0 :(得分:3)
如果要写入easy_install
/Library
命令
尝试运行以下命令:
sudo easy_install pip
然后输入您的密码
答案 1 :(得分:0)