[英]Installing Python modules in version 3.5.2 with both Python 2.7 and 3.5 already installed on Mac
I use both 2.7 and 3.5 and I want to keep both installed as we still use 2.7 in VFX and Gaming industry. 我同时使用2.7和3.5,并且希望同时安装两者,因为在VFX和游戏行业中我们仍然使用2.7。
The problem is when I attempt to install a module in 3.5 (for this example, I'll use "pip3 install beautifulsoup4"), the module installs in the 2.7 folder and not 3.5 folder. 问题是当我尝试在3.5中安装模块时(对于本示例,我将使用“ pip3 install beautifulsoup4”),该模块安装在2.7文件夹中,而不是3.5文件夹中。
How do I get terminal to install the correct version of Python Module? 如何获得终端以安装正确版本的Python模块?
For the record I would like the modules to install in this folder: 作为记录,我希望将模块安装在此文件夹中:
/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages
I've tried specifying the directory. 我尝试指定目录。 I've heard running the "2to3 -w bs4" will convert the code to 3.5 for me but I am unfamiliar with this command so if anyone can correctly format it for me that would be greatly appreciated (I am still a newb so please be descriptive).
我听说过运行“ 2to3 -w bs4”会将代码转换为3.5,但我不熟悉此命令,因此如果有人可以正确格式化它,将不胜感激(我仍然是newb,所以请描述性的)。 Thank you!
谢谢!
Look inside your pip3
script. 查看您的
pip3
脚本。 Does the #!
请问
#!
-line at the beginning actually contain python3.5
? 开头的行实际上包含
python3.5
吗?
If not, change it. 如果不是,请进行更改。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.