在我的MacOS Mojave终端中,我想安装一个带有pip的python包.最后它说:
You are using pip version 10.0.1, however version 18.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Could not install packages due to an EnvironmentError: [Errno 13] Permission denied:
'/Library/Python/2.7/site-packages/pip-18.0-py2.7.egg/EGG-INFO/PKG-INFO'
Consider using the `--user` option or check the permissions.
我真的不明白现在该做什么.此外,我意识到它在错误消息中说Python 2.7,但我有并且只想使用python 3.
解决方法:
关于permissions命令,在终端命令前使用sudo:
sudo pip install --upgrade pip
关于python尝试运行pip作为这样的可执行文件:
python3.6 -m pip install <package>