简体   繁体   中英

Installing python 3.6 , when I am already using Anaconda Python 2.7

I am currently using Anaconda2 . python -V gives :- Python 2.7.11 :: Anaconda 4.0.0

Now I want to use Python 3.6 and i tried to update my python version using the following command in anaconda:-

conda install python=3.6 but this did not worked , because I work in a restricted environment MNC .

Two Options are available to me and I want to know which one should I follow

1> I can install Anaconda3 . But if do that , do i need to uninstall already existing version of Anaconda I am using ie Anaconda2 ? If not please tell me how will I choose which version of python to use in Spyder.

2> I can install Python3.6 . If I take this option , I have no idea of what to do afterwards.

PS:- I am not very good at installation so please guide me in the easiest way possible.

Also if there is some other way , please share that too

are you able to create a new environment with the command:

conda create -n py36 python=3.6

? if so, anaconda will create a new subfolder for this environment in the anaconda/envs folder named py36. in spyder you can go to tools->preferences->python interpreter and choose the python interpreter (python.exe if on windows) in that folder. to use pip and all in the commandline for that environment write:

if on linux/mac:

source activate py36

if on windows:

activate py36

then continue to do you installations and all.

Take a look at environments, which enable you to have multiple python versions and manage them seperately. The documentation can be found here

In short, just do:

conda create -n myenv python=3.6

to create an environment with python 3.6. You can enter it doing

source myenv

and then pip install any desired packages.

If you are using Anaconda and python, you just update it with:-

  1. Open Anaconda Prompt type:-

     conda update conda conda update python 
  2. Check your python version python --version and conda version conda --version

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