Various solutions to the failure of updating the Spyder software in the old version of Anaconda's Python virtual environment

  This article describes the various ways to update the Spyder software version in Anaconda for a virtual environment with an older version of Python .

  First look at the requirements to be implemented in this article. According to the method mentioned in the article Anaconda's method of installing third-party libraries and Spyder and other software for virtual environments (https://blog.csdn.net/zhebushibiaoshifu/article/details/128334627), I am a virtual environment with a Python version 3.6of The Spyder software is installed ; but at this time, the version of the Spyder software is relatively low, and many functions are not very easy to use, so I hope to update it.

  This article will introduce the method of updating the Spyder software in Anaconda 's virtual environment ; it should be noted that this article gives many different methods, but almost all of them have no effect on my computer-but this is mainly because My Python version is too old . Therefore, if you have similar needs, you can try the various methods given in this article in turn; if all methods fail (probably because the Python version is relatively old), either you still use the old version of Spyder software, or You can only use the new version of Spyder software after upgrading the Python version in a new virtual environment .3.63.7

  First, we need to open the " Anaconda Prompt (anaconda3) " software.

insert image description here

  Then, activateenter the virtual environment through the statement, the specific code is as follows.

activate py36tf

  Run the above code, as shown in the figure below.

insert image description here

  Next, in general, we can directly update the Spyder software with the help of the code shown below.

conda update spyder

  However, since we are operating in a virtual environment with a Python version of 0 , the situation shown in the figure below will appear after running the above code.3.6

insert image description here

  It can be seen that, except that some supporting dependent libraries can be updated, the system will not be able to recognize the update of the Spyder software. Even if we run the above code and then open the Spyder software, we can still see that it is in a lower version , that is, the update operation of the Spyder software has not been completed .

insert image description here

  Next, we can address this situation.

1 update all packages

  First, try to update all packages in the current virtual environment with the code shown below.

conda update --all

  After running the above code, as shown in the figure below.

insert image description here

  Wait for a while, all the tasks can be completed, and the interface as shown in the figure below appears.

insert image description here

Subsequently, update the Spyder software   with the code shown below .

conda update spyder

  However, after running the above code, I get a message that the corresponding content cannot be found here; therefore, this method does not work for me.

2 Reinstall Spyder

Next, we try to uninstall the Spyder software   through the code shown below, and see if the new version of the Spyder software can be reinstalled .

conda uninstall spyder

  After running the above code, the situation shown in the figure below will appear.

insert image description here

  After uninstalling, we try to install the latest version of Spyder software through the following code.

conda install spyder=5.4.2

  However, the interface shown in the figure below appeared here.

insert image description here

As can be seen from the prompt in the above figure, the Spyder software   of the specified version cannot be found in the current source . At this point, we can enter a source at will. For example, I entered the first source in the above picture (the image of the University of Science and Technology of China), and found that there is indeed only the highest version 3.Xof the Spyder software; as shown in the figure below.

insert image description here

  Therefore, we follow the prompts in the above figure , enter the official website of Anaconda , and check the source corresponding to the new version of Spyder software; as shown in the figure below.

insert image description here

Then, I tried to download the Spyder software from   different sources given on the official website ; through trying, I found that if I used the source shown below, I could get a newer version of the Spyder software.

conda install -c "conda-forge/label/beta" spyder

  Run the above code, you can see the interface as shown in the figure below.

insert image description here

  As can be seen from the figure above, this method can obtain the latest 4.Xversion of the Spyder software; but it is still not the latest version, and the version downloaded by this method is easy to be replaced later. Therefore, this method cannot be regarded as the optimal method.

3 Update Anaconda

  Subsequently, try to update Anaconda . It should be noted here that before performing the following operations, you first need to exit the virtual environment and return to the default environment of Anaconda .

  Through the following code, we can update Anaconda .

conda update anaconda

  Run the above code, and the interface shown in the figure below will appear.

insert image description here

Then, we try to update the Spyder software   through the code shown below .

conda update spyder

  After running the above code, as shown in the figure below.

insert image description here

  It can be seen that I still cannot recognize the latest version of the Spyder software, and even downgrade the version of the Spyder software 4.XI just obtained through the second method. So this approach also doesn't work for me.

4 Configuring Anaconda Navigator

  If the operations in all the above command lines cannot meet the requirements, we can try again in the Anaconda Navigator software. As shown in the figure below, we open the Anaconda Navigator software and enter the virtual environment where the Spyder software version needs to be upgraded; then, find the setting symbol in the upper right corner of the Spyder software , and try different operations in turn.

insert image description here

  For example, as shown in the picture above, I first tried the " Update application " option; although it can recognize a new version here, it still cannot be successfully upgraded.

  Then, I tried another option " Remove application " below it; after the Spyder software is deleted, the Anaconda Navigator software will prompt us that there is a 5.4.1version of the Spyder software that can be downloaded, as shown in the figure below.

insert image description here

  However, during the installation process, it will be prompted that the current virtual environment cannot configure this version of the Spyder software (this further shows that the reason why I cannot install it here is probably caused by the Python version).

  Subsequently, I also tried the " Install specific version " option, trying to download the specified version of the Spyder software, as shown in the figure below.

insert image description here

  Although this option can install the specified version of the Spyder software, but when I open the installed software, I will find the following error message.

insert image description here

  It can be seen that the Spyder software cannot be updated due to the Python version and other supporting environment versions .

  So in the end, I conda update --allswitched the version conflicting Spyder software and other supporting environments back to the original version through the code; as shown in the figure below.

insert image description here

  In the end, I chose to use the original older version of the Spyder software here; but for other users, if the Python version is not particularly old (under normal circumstances, 3.7the version above can be said to be relatively new), the above The method can still successfully upgrade the version of the Spyder software.

Welcome to pay attention: Crazy learning GIS

Guess you like

Origin blog.csdn.net/zhebushibiaoshifu/article/details/129381828