Reputation: 6405
I currently use this command to create a new anaconda environment:
conda create --name=<myEnvNameHere> python=3.9.5
I determined that 3.9.5 is the latest version of python available in anaconda with this command:
conda search -f python
How can I use just one command to create a new environment with the latest available version of python, perhaps something like:
conda create --name=<myEnvNameHere> python=latest
I know I can write a script to achieve the outcome I am after, but is there a way to do it in the conda create
command natively?
Upvotes: 11
Views: 18145
Reputation: 1446
According to the documentation for conda install, conda will (when no version is specified, it seems) try to install the latest version of the specified package(s).
Hence, you should be able to get the latest version of python in your new environment by running a command like this.
conda create --name=<myEnvNameHere> python
Upvotes: 17