所以我在我的mac上安装了不同版本的Pythons,这似乎是我目前所有问题的根源。我想在Mueditor中导入名为pyperclip的模块,但它总是写着No module named 'pyperclip'
我阅读了许多不同的线程并尝试使用sudo /usr/bin/python get-pip.py,但是我总是得到/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: can't open file 'get-pip.py': [Errno 2] No such file or directory,这表明它在错误的目录中搜索(这里不确定是否有正确的术语)。
我用自制软件安装了Python3.8,一切都很好。
上下文:我开始用anaconda编程,删除了它从官方网站下载的Python,现在正在使用Mueditor,同时执行“用Python实现无聊的东西自动化”一书中的任务。
我甚至在考虑重新设置我的OSX ..。帮助是非常感谢的!
发布于 2020-05-29 07:32:20
,我读了很多不同的线程,并尝试使用
sudo /usr/bin/python get-pip.py,但是我总是得到/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: can't open file 'get-pip.py': [Errno 2] No such file or directory,这表明它在错误的目录中搜索(这里不确定是否有正确的术语)。
我用自制软件安装了Python3.8,一切都很好。
get-pip.py文件,然后执行引用该文件的命令。https://bootstrap.pypa.io/get-pip.py
/usr/bin/python -V检查它们的版本。在您的例子中,/usr/bin/python/是Python2.7.pip。一旦您确定了您的/path/to/your/python3 -m pip install pyperclip.解释器的路径,就可以这样做: Python3
发布于 2020-05-29 07:47:05
检查Python版本:
python --version
python3 --version使用easy_install在MacOS上安装pip
easy_install是一个与setuptools捆绑在一起的Python模块,它使我们能够下载、构建、安装和管理Python包。
sudo easy_install pip使用MacOS上的get-pip.py安装pip
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py或
python3 get-pip.py用brew在MacOS上安装pip
brew install python如果与pip使用有关的任何问题,我们必须用下面的命令重新链接python。
brew unlink python && brew link python
brew unlink python3 && brew link python3在完成上述任何步骤后,检查并验证pip版本
pip -V
pip3 -Vhttps://stackoverflow.com/questions/62080750
复制相似问题