简体   繁体   中英

how to install python3.5 completely and remove python2.7 on Mac?

I have installed python3.5 with commands:

sudo apt-get install python3.5

after

pip install matplotlib 
pip install numpy
pip install scikit-learn

It works but only on python2.7.6 installed by default. When I type "python",it show me the interactive shell of python2.7.6. I can use python3.5 by type "python3",but i can't import some library i install such as numpy, scikit-learn, matplotlib but it works in 2.7.6.

How to use all my libraries i install with python3.5 instead of 2.7.6?

如果与同一台计算机上安装的Python 2.x混淆, pip3将确保您正在安装python3软件包。

I figure out the best way to deal with it i think. I download Anaconda from this link ( https://www.continuum.io/downloads ). Anaconda integrates many academic libraries by default so I choose to download anaconda with the Python 3 version and all libraries going with. So now I can use it in PyCharm.

在此处输入图片说明

So creating a new project, I just have to choose the rep of python in my anaconda folder.

Thanks guys.

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