Home > Software engineering >  Issue while installing a lower python version in conda prompt
Issue while installing a lower python version in conda prompt

Time:06-30

I have python version 3.8.8 in conda. I want version 3.5.0 for a Machine learning project but when I ran the command conda install python=3.5.0, following output came:

**Collecting package metadata (current_repodata.json): done Solving environment: failed with initial frozen solve. Retrying with flexible solve. Collecting package metadata (repodata.json): done Solving environment: failed with initial frozen solve. Retrying with flexible solve.

PackagesNotFoundError: The following packages are not available from current channels:

  • python=3.5.0

Current channels:

To search for alternate channels that may provide the conda package you're looking for, navigate to

https://anaconda.org

and use the search bar at the top of the page.**

I am not able to comprehend this. How can I install the required python version?

CodePudding user response:

Good thing with conda is you can maintain as many versions of python as you want simultaneously but you're trying to modify the main distribution of python that comes with the conda that you've installed. What you should do is create a new environment with the desirable python version.

Create a new environment for your ML-related work using

conda create -n ml_env python=3.5.0
conda activate ml_env

This way, if you no longer need the stuff you installed for ML, you can easily remove the whole environment:

conda env remove -n ml_env
  • Related