简体   繁体   中英

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.

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.

How do I get terminal to install the correct version of Python Module?

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

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). Thank you!

Look inside your pip3 script. Does the #! -line at the beginning actually contain python3.5 ?

If not, change it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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