![]() Thanks to the conda package cache and the way file linking is used doing this is typically i) fast and ii) consumes very little additional disk space. If you need an exact set of packages then create a conda environment to hold them. ![]() Your base environment is probably not a good place to try and manage an exact set of packages: it is going to be a dynamic working space with new packages installed and packages randomly updated. In most cases updating the Anaconda package in the package list will have a surprising result: you may actually downgrade many packages (in fact, this is likely if it indicates the version as custom). Why updating the Anaconda package is almost always a bad idea If you don't care about package versions and just want "the latest set of all packages in the standard Anaconda Distribution, so long as they work together", then you should take a look at this gist. Updating just the packages in the standard Anaconda Distribution Or from the command line: conda update astroid astropy When you are done you need to click the "Apply" button: for astroid or astropy in the screenshot above, and this will tag those packages for an upgrade. If you are only interested in updating an individual package then simply click on the blue arrow or blue version number in Navigator, e.g. Or from the command line you can provide the environment name ( -n envname) or path ( -p /path/to/env), for example to update your dspyr environment from the screenshot above: conda update -n dspyr -all When it is selected there is a triangular marker on the right (see image above, step 3). If you have other environments you'd like to update you can repeat the process above, but first click on the environment. This operation will only update the one selected environment (in this case, the base environment). This needs to be executed from the command line, and the best way to get there is from Anaconda Navigator, then the "Environments" tab, then click on the triangle beside the base environment, selecting "Open Terminal": This will update all packages in the current environment to the latest version - with the small print being that it may use an older version of some packages in order to satisfy dependency constraints (often this won't be necessary and when it is necessary the package plan solver will do its best to minimize the impact). (But this should be preceded by conda update -n base conda or simply conda update conda so you have the latest conda version installed) In most cases what you want to do when you say that you want to update Anaconda is to execute the command: conda update -all Root is the old (pre-conda 4.4) name for the main environment after conda 4.4, it was renamed to be base. PS: I also had some aliases configured in my. NOTE: you probably don't need to have the x in a+rwx but I've only tested it this way I also had a permission denied error there so I made sure the specific folder had correct access writes before trying again sudo chmod a+rwx Then install python with conda install python=3.10 #for example The real problem is that there is no python in the base environment installed so I switched into the base env # deactivate Conda environment As it has already been suggested # deactivate Conda environmentĪlso worked but didn't quite solve the problem since I had to do this every time I opened a vscode terminal. This was caused by vscode which first activates base then the specified environment. I had a similar issue with macOS Ventura 13.2.1. If you wanted to Disable Base Env Activation conda config -set auto_activate_base false If you wanted to Disable Nested Activation conda config -set auto_stack 0 ![]() My conda installation wasn't using the correct version because I had activated my environment on top of the conda base environment.ĭeactivating the base environment and then activating the environment I wanted, worked.Ĭonda calls this nested activation and you could read more about it in the docs. If conda isn't using the correct Python version then most likely running the above command will print the same path in both environments. Python -c "import sys print(sys.executable)"Īctivate another environment, let's say environment B and rerun the above python command. # (until even base environment is deactivated)Īctivate an environment A and then check the location of Python package by using the command below.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |