skip to Main Content

when I check my python version using the following commands:
#python –version
Python 3.7.13

#python3 –version
Python 3.7.13

I get a different version of python

And when I used this command
/root/miniconda3/envs/tensorflow/bin/python –version
Python 3.7.4
I get this version of python

I want to update this python version: 3.7.4 which is there in /root/miniconda3/envs/tensorflow/bin/python
I want to update python 3.7.4 to 3.10

2

Answers


  1. You seem to be using a Conda environment, specifically an environment named "tensorflow". If you wish to update the Python version for this Conda environment to 3.10

    First, activate the Conda environment that you wish to update:

    source /root/miniconda3/bin/activate tensorflow
    

    Now, try updating Python to 3.10 within the active Conda environment:

    conda install python=3.10
    

    This command will attempt to update Python to version 3.10 within the "tensorflow" environment.

    However, be aware that doing this might cause incompatibilities with some of the existing packages installed in the environment.

    Conda will typically try to resolve these and might update, downgrade, or remove some packages to accommodate the new Python version.

    Once updated, you can verify the Python version in the current environment

    python --version
    
    Login or Signup to reply.
  2. you can simply create an env conda create --name myenv python=3.10 with that specific python version, so that it will not conflict with the other projects that use python=3.7.4. https://saturncloud.io/blog/updating-python-to-a-specific-version-using-conda-a-guide/

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search