How to change python version in Anaconda?

前端 未结 4 799
说谎
说谎 2020-12-31 19:30

I am trying to get into deep learning. I installed Anaconda to use jupyter and generally not to care about installing all of those packages like matplotlib etc myself. But I

相关标签:
4条回答
  • 2020-12-31 19:51

    The most pain-free approach that worked for me was to install the legacy version of Anaconda. If you want Python 3.6 as default, I recommand downloading Anaconda 5.2.0 which was the last version to use Python 3.6 in base environment as default. (Legacy versions can be found here.)

    If you also want the latest version of Anaconda, there is an easy way. With Anaconda 5.2.0 installed, you can actually update to newer versions of Anaconda by

    conda update anaconda
    

    which will try to update all your packages except keepping Python at 3.6.x.

    0 讨论(0)
  • 2020-12-31 19:52

    This is a bug of the macOS 10.14.6. I degrade the python version from 3.7.4 to 3.7.0 in Anaconda and it works. Here I share my solution. I solve this question in other website. Check the answer by clicking here(https://www.udemy.com/course/the-python-mega-course/learn/lecture/4775342#questions/11049798).

    0 讨论(0)
  • 2020-12-31 20:00

    By default, the conda environment will use the python version 3.7, since you installed Anaconda with python3.7.

    You would need to create a symbolic link to the new version of the python (in your case python3.6.8) using

    ln -s ~/anaconda3/bin/<python3.6.8>
    

    (you may need to replace 'python3.6.8' with the appropriate file name).

    Another, better way would be to create a new environment in conda and then use python3.6.8 as you would like. Follow steps at https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#creating-an-environment-with-commands to create an environment.

    For python3.6.8, run the following command:

    conda create -n <myenv> python=3.6.8
    

    (replace 'myenv' with the name of your new environment)

    After that, activate the environment with :

    conda activate <myenv>
    
    0 讨论(0)
  • 2020-12-31 20:11

    A better (recommended) alternative is to create a virtual environment of the desired Python version and then use that environment to run Tensorflow and other scripts.

    To do that, you can follow the instructions given here.

    BUT, if you don't want to create a separate environment, then conda install python=<version> should do.

    OR (not recommended) you can download the "latest" Anaconda installer with your required Python version bundled.

    Source

    0 讨论(0)
提交回复
热议问题