What should I do if the Spyder version upgrade fails in the Anaconda virtual environment?

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

First, let’s take a look at the requirements to be implemented in this article. According to the method mentioned in the article # Anaconda virtual environment to install Python library and Spyder software, I installed a virtual environment with Python version 3.6 I have installed the Spyder software; but at this time, the version of this Spyder software is relatively low, and many functions are not very easy to use, so I hope to update it.

This article introduces how to update the Spyder software in the virtual environment of Anaconda; it should be noted that this article gives many different methods methods, but almost all of them have no effect on my computer – but this is mainly because my Python version is too old (for example, my Python version here It is 3.6, but if it is 3.7 and above, then many of the following methods are actually effective). Therefore, if you have similar needs, you can try the various methods given in this article in sequence; if all methods fail (probably because the Python version is relatively old), you can still use it Old versions of the Spyder software can only be used in a new virtual environment after upgrading the Python version and then using the new version of the Spyder software. .

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

Subsequently, enter the virtual environment through the activate statement. The specific code is as follows.

Copy code
activatepy36tf

Run the above code as shown in the image below.

Next, under normal circumstances, we can directly update theSpyder software with the help of the code shown below.

sql
Copy code
conda update spyder

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

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

Next, we can solve this situation.

1 Update all packages

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

sql
Copy code
conda update --all

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

Wait a moment for all tasks to be completed, and the interface as shown below will appear.

Then, update theSpyder software with the code shown below.

sql
Copy code
conda update spyder

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

2 Reinstall Spyder

Next, we try to use the code shown below to first uninstall the Spyder software and see if we can reinstall the new version of the Spyder software.

Copy code
conda uninstall spyder

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

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

ini
Copy code
conda install spyder=5.4.2

However, the interface shown below appears in my case.

As you can see from the prompt in the picture above, the specified version of the Spyder software cannot be found in the current source. At this time, we can enter a source at will. For example, I entered the first source in the picture above (the mirror of the University of Science and Technology of China) and found that the highest version is indeed 3.XSpyder Software; as shown below.

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

Subsequently, I tried to download the Spyder software from different sources provided on the official website; through attempts, I found that if I use the source as shown below, I can get a newer version of the Spyder software. .

arduino
Copy code
conda install -c "conda-forge/label/beta" spyder

After running the above code, you can see the interface as shown below.

As you can see from the picture above, this method can obtain the 4.X version of the Spyder software; but it is still not the latest version, and the version downloaded through this method, It is easy to be replaced at a later stage. Therefore, this method cannot be regarded as the optimal method.

3 Update Anaconda

Then try updating 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.

sql
Copy code
conda update anaconda

Run the above code and the interface shown below will appear.

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

sql
Copy code
conda update spyder

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

As you can see, I still cannot recognize the latest version of the Spyder software here, and it will even replace the 4.X version I just obtained through the second method. The version of strong>Spydersoftware is downgraded. So this approach didn’t work for me either.

4 Configure Anaconda Navigator

If all the above-mentioned command line operations cannot meet the requirements, we can try it in the Anaconda Navigator software. As shown in the picture below, we open the Anaconda Navigator software and enter the virtual environment where the Spyder software version needs to be upgraded; then, find the upper right corner of the Spyder software Corner’s Settings Symbol and try different operations therein.

For example, as shown in the picture above, I first tried the “Update application” option; although it can recognize that there is a new version, it still cannot upgrade successfully.

Subsequently, we tried another option “Remove application” below it; after removing the Spyder software, the Anaconda Navigator software will prompt us that there is a The 5.4.1 version of the Spyder software can be downloaded, as shown in the figure below.

However, during the installation process, it will prompt that the current virtual environment cannot configure this version of the Spyder software (this further illustrates that my inability to install here is most likely due to the Python version) question).

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

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

As you can see, this is the failure of the Spyder software to be updated due to the Python version and other supporting environment versions.

So in the end, I used the conda update --all code to switch the Spyder software and other supporting environments that had version conflicts back to the original versions, as shown in the figure below.

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

Digression

In this era of rapidly growing technology, programming is like a ticket to a world of infinite possibilities for many people. Among the star lineup of programming languages, Python is like the dominant superstar. With its concise and easy-to-understand syntax and powerful functions, Python stands out and becomes one of the hottest programming languages in the world.


The rapid rise of Python is extremely beneficial to the entire industry, but “There are many popular people and not many people“, which has led to a lot of criticism, but it still cannot stop its popularity. development momentum.

If you are interested in Python and want to learn Python, here I would like to share with you a Complete set of Python learning materials, which I compiled during my own study. I hope it can help you, let’s work together!

Friends in need can click the link below to get it for free or Scan the QR code below to get it for free

CSDN Gift Package: Free sharing of the most complete “Python learning materials” on the entire network(safe link, click with confidence )

?

1Getting started with zero basics

① Learning route

For students who have never been exposed to Python, we have prepared a detailed Learning and Growth Roadmap for you. It can be said to be the most scientific and systematic learning route. You can follow the above knowledge points to find corresponding learning resources to ensure that you learn more comprehensively.

② Route corresponding learning video

There are also many learning videos suitable for beginners. With these videos, you can easily get started with Python~

③Exercise questions

After each video lesson, there are corresponding exercises to test your learning results haha!

2Domestic and foreign Python books and documents

① Documents and books

3Python toolkit + project source code collection

①Python toolkit

The commonly used development software for learning Python is here! Each one has a detailed installation tutorial to ensure you can install it successfully!

②Python practical case

Optical theory is useless. You must learn to type code along with it and practice it in order to apply what you have learned into practice. At this time, you can learn from some practical cases. 100+ practical case source codes are waiting for you!

③Python mini game source code

If you feel that the practical cases above are a bit boring, you can try writing your own mini-game in Python to add a little fun to your learning process!

4Python interview questions

After we learn Python, we can go out and find a job if we have the skills! The following interview questions are all from first-tier Internet companies such as Alibaba, Tencent, Byte, etc., and Alibaba bosses have given authoritative answers. I believe everyone can find a satisfactory job after reviewing this set of interview materials.

5Python part-time channels

Moreover, after learning Python, you can also take orders and make money on major part-time platforms. I have compiled various part-time channels + part-time precautions + how to communicate with customers into documents.

All the above information , if friends need it, you can scan the QR code below to get it for free
?