简体   繁体   English

自制软件:安装了错误python版本(mac)的软件包

[英]Homebrew: Packages are installed for wrong python version (mac)

Homebrew is installing the package I need for python 2.7, which is the default version that comes with Mac, but I need it to be installed for python 3.4. Homebrew正在安装我需要的python 2.7软件包,这是Mac随附的默认版本,但是我需要为python 3.4安装该软件包。 How do I do this? 我该怎么做呢?

Try pip3 install versus just pip install . 尝试pip3 install而不是pip install

Look at the versions: 查看版本:

pip --version
pip 9.0.1 from /usr/local/lib/python2.7/site-packages (python 2.7)

pip3 --version                                                             
pip 9.0.1 from /usr/local/lib/python3.6/site-packages (python 3.6)

Listing the executable for python 3.4 before python 2.7 in your PATH might help if you haven't tried it already. 如果您尚未尝试过在PATH中的python 2.7之前列出python 3.4的可执行文件,则可能会有所帮助。 Otherwise maybe something here might help? 否则,也许这里有些帮助? How to make Mac OS use the python installed by Homebrew 如何使Mac OS使用Homebrew安装的python

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM