Updating Spyder in Anaconda to 5.2.2 - python

I feel like I'm going absolutely insane as I can't find any information on this anywhere... Is there anyway to update Spyder in Anaconda Navigator to version 5.2.2? The navigator shows that the highest possible version for Spyder is 5.1.5:
I particularly want to update to 5.2.2 because the debugger in 5.1.5 is broken, and it seems the only correct way to fix it is to update to 5.2.2. See Link to stackoverflow stating that one needs to update to 5.2.2 to fix the debugger
I've tried:
conda install spyder==5.2.2
but it just says "PackagesNotFoundError: The following packages are not available from current channels: - spyder==5.2.2"
I've also tried:
pip install spyder==5.2.2
But get the error "ERROR: Could not install packages due to an OSError: [WinError 5] Access is denied: 'C:\Users\##\Anaconda3\envs\spyder\Lib\site-packages\PyQt5\QtCore.pyd'
Consider using the --user option or check the permissions."
Also trying,
pip install spyder==5.2.2 --user
The command does seem to run to completion without error, but the IDE doesn't seem to have updated as it still says it's 5.1.5 and it also says some things about a warning of missing dependencies (and the debugger still doesn't work).
Any suggestions?

Spyder 5.2.2 is only available for the moment through the conda-forge channel. To install it I recommend you to create a new env using only conda-forge packages. You can do that by running from an Anaconda prompt something like the following:
conda create -n spyder-env -c conda-forge python=3.9 spyder=5.2.2
To check what is the latest version available in the different channels you can go to https://anaconda.org/search?q=spyder
Edit: Currently Spyder 5.2.2 is available from the default anaconda channel. However, the latest Spyder release currently is 5.3.2. Just in case, the conda command to get the latest Spyder version installed in a new env with Python 3.9 looks something like:
conda create -n spyder-env -c conda-forge python=3.9 spyder

I have run the following in command prompt window. It has helped
conda remove spyder
conda remove python-language-server
conda update anaconda
conda install spyder=5.2.2

Related

Spyder won't run my code - Fresh install and a simple script [duplicate]

I updated to the latest version of Spyder (5.1.5) and my debugger hangs w/o response on the first line, no matter the code.
Here are the dependency versions:
Spyder 5.1.5
spyder-kernel 2.1.1
Python 3.9.7
IPython 7.31.1
I remember having this problem a while ago that was fixed by updating the Spyder Kernel, but no dice this time through.
Any solutions?
If you are not using Anaconda, you can update Spyder with the following command
pip install -U spyder
If not, please close Spyder, open the Anaconda Prompt (on Windows) or a terminal (on Linux or Mac) and run there
conda create -n spyder-env -c conda-forge spyder
conda activate spyder-env
spyder
You need to update because this is a known issue fixed in any Spyder version greater than 5.1.5.
I had the same problem on Windows10 with spyder version 5.1.5. To resolve the problem you need a version newer than 5.1.5. The thing is that if you update Spyder you have to install it from a channel other than the defaults channel in order to get a newer version than 5.1.5. This can be done in two ways:
Console
Open the console or, if you're working on Windows, the Anaconda Prompt, and type the following commands in order to first uninstall spyder, and then re-install the newest version (just updating didn't work for me).
conda remove -n myenv spyder
conda install -n myenv -c conda-forge spyder
The first command, remove, uninstalls spyder in the virtualenv called 'myenv'. If you don't use virtualenvs, just leave the -n myenv aside.
The second command, install installs spyder from the third-party channel conda-forge instead of the official channel defaults. This option is necessary in order to install a spyder version newer than 5.1.5
Anaconda Navigator
Uninstall Spyder: In the "Home" tab, select the correct virtual environment in the "Applications on" dropdown menu. Then click on the gear symbol in the upper right corner of the spyder tile and select "remove application".
Add conda-forge to your environment's channels: This is nicely described at the bottom of this page.
Install spyder again, in the way you did it the first time.
Click again on the gear on the spyder tile, choose "install specific version" in order to update to the newest version. Now, versions newer than 5.1.5 should be available.
conda install qtconsole=5.1.1
do the magic https://github.com/spyder-ide/spyder/issues/17334
I had the same issue with Anaconda Navigator 2.1.4, and Spyder 5.3.2 using Python 3.9.13, and I solved it using the solution in the first answer above, ie.
conda create -n spyder-env -c conda-forge spyder
conda activate spyder-env
spyder
This bug has been resolved in the version 5.2.2 of Spyder.
conda install -c conda-forge spyder=5.2.2
or
pip install spyder=5.2.2
Enjoy!!

Update kernel modules after Spyder update

I updated my Spyder today to Spyder 5.1, and now it keeps showing me this error message:
Your Python environment or installation doesn't have the spyder‑kernels module or the right version of it installed (>= 2.1.0 and < 2.2.0). Without this module is not possible for Spyder to create a console for you.
You can install it by running in a system terminal:
conda install spyder‑kernels=2.1
or
pip install spyder‑kernels==2.1.*
I already tried both commands, the pip one works but I still get the error message, the conda command does not even work and shows me
The following packages are not available from current channels
Normally I use conda for all packages that are availabel on conda, so maybe someone faced the same issue?
Version 2.1 is only available through Conda Forge at this time. Try
conda install -c conda-forge spyder-kernels=2.1
So far I've had to remove spyder-kernels from any env from any env that has it before I'm able to get it to install on any other env. I'm using conda. It seems I can't have more than one env available for use without constantly swapping where spyder-kernels is installed. This is the case for Windows 10 and MacOS. The spyder docs say to just ignore the issue - and that it was allegedly fixed by now - but I don't know how to ignore an error that makes it impossible to start a python console.
Correction: After erasing all envs and starting over from scratch (zero envs), I am now able to install spyder-kernels on multiple newly-created envs and each one functions in console without an issue.

keeping Spyder updated in Anaconda

have Anaconda installed on a win-10 box and I am using Spyder 4.1.5
to sume up: need to get more insights on how to keep VSCode and Spyder updated .. Can i do that via Conda!? Look forward to hear from you.
well i Would like to update Spyder to the latest version, so I went through the commands:
conda update conda
conda update anaconda
conda update spyder
They all ran without errors, but the spyder version didn't change - this is command I'm using to launch:
Well - i allways thougth that if we want to update Spyder in the root environment, then the following command conda update spyder works
If we want to update Spyder for a virtual environment we have created (e.g., for a different version of Python), then conda update -n $ENV_NAME spyder where $ENV_NAME is our environment name.
how to indicate what is going on here?
should i run conda update anaconda before updating spyder.
well - i thought that i have to make sure i am in the base directory.
here conda install spyder should work.
I have tried also this: conda install spyder=new_version_number.
new_version_number should be in digits.
btw: i had a view on the official docs here: code.visualstudio.com/docs/python/debugging.
In brief, i tried the 'Add Configuration' Button. But i guess i have a screwd up installation &/ configuration.
do i need these steps too!?
How to activate conda environment in VS code
https://medium.com/#udiyosovzon/how-to-activate-conda-environment-in-vs-code-ce599497f20d
Efficient Way to Activate Conda in VSCode
https://medium.com/analytics-vidhya/efficient-way-to-activate-conda-in-vscode-ef21c4c231f2
update: its obviousliy the Anaconda-channeling-thing that stands sometimes in the way. - at least in regard of spyder-updates
cf. Why is Conda not installing/updating the latest version of Spyder?
Why is Conda not installing/updating the latest version of Spyder?
But those bug reports and "solutions" were made one year ago. Spyder
is on later versions now. Why is conda still installing Spyder version
4.0.1, with all the issues, one year after 4.0.1 is known to be problematic? Why does it not update correctly to any later version?
The latest version is supposed to be 5.0.0, with even 4.2.* rolled out
before that.
The problem is with the Anaconda channel.
I uninstalled Spyder and then install with the line:
conda install spyder and Spyder 5.0.0 was successfully installed.
Anaconda's Spyder page (https://anaconda.org/anaconda/spyder) gave the
command as:
conda install -c anaconda spyder which led to the installation of
Spyder 4.0.1, instead of 5.0.0 which was what it was supposed to
install as documented on the page itself.
note: i will have a closer look if this behavior is the same - in regard of updating the VSCode!?
update:
i guess that i have to take care for the following steps
• Check and test conda is installed and available
• see if i need an Update conda if necessary
• Create the great virtual environment
• Activate a virtual environment - with all the tests that we can apply now
to sume up: need to get more insights on how to keep VSCode and Spyder updated .. Can i do that via Conda!? Look forward to hear from you.
Visual Studio Code has an auto-update for Windows and Mac:
Quote from vs code faq:
... By default, VS Code is set up to auto-update for macOS and Windows users when we release new updates. If you do not want to get automatic updates, you can set the Update: Mode setting from default to none.
To modify the update mode, go to File > Preferences > Settings (macOS: Code > Preferences > Settings), search for update mode and change the setting to none. ...
Regarding anaconda, your commands seem fine.
conda update conda
conda update spyder
Should work. Just make sure you have activated your environment.
For more info on conda updates, please refer to official page.

Anaconda won't update spyder

I had Spyder 3.1.3 installed an running fine.
Then I heard about "anaconda navigator" - which I never had launched it before - so I launched it, took a look around, installed glueviz and quit.
Next time I opened spyder - not from the navigator, from the shortcut I've always used (with this command: C:\Anaconda2\pythonw.exe C:\Anaconda2\cwp.py C:\Anaconda2 "C:/Anaconda2/pythonw.exe" "C:/Anaconda2/Scripts/spyder-script.py" --new-instance), it launched spyder version 2.3.8.
Then I went to the command line and tried to update spyder with the conda update spydercommand and I get this:
C:\>conda update spyder
Fetching package metadata ...........
Solving package specifications: .
# All requested packages already installed.
# packages in environment at C:\Anaconda2:
#
spyder 2.3.8 py27_1
C:\>
nothing happens.
If I try to update it from the navigator (running as admin), I get an error saying "spyder cannot be installed on this environment"
Any ideas what can I do to properly update spyder?
EDIT:
I updated pandas and skpyder downgraded to version 2.2.0...
Thanks
With admin privilege type (if one does not uninstall before installing it gets 'stuck' for hours)
conda uninstall spyder
conda install spyder=5.1.5

how to update spyder on anaconda

I have Anaconda installed (Python 2.7.11 |Anaconda custom (64-bit)| (default, Feb 16 2016, 09:58:36) [MSC v.1500 64 bit (AMD64)] on win32) and I am using Spyder 2.3.8
Would like to update Spyder to the latest version, so I went through the commands:
conda update conda
conda update anaconda
conda update spyder
They all ran without errors, but the spyder version didn't change - this is command I'm using to launch:
C:\Anaconda2\pythonw.exe C:\Anaconda2\cwp.py C:\Anaconda2 "C:/Anaconda2/pythonw.exe" "C:/Anaconda2/Scripts/spyder-script.py" --new-instance
Am I missing something?
To expand on juanpa.arrivillaga's comment:
If you want to update Spyder in the root environment, then conda update spyder
works for me.
If you want to update Spyder for a virtual environment you have created (e.g., for a different version of Python), then conda update -n $ENV_NAME spyder where $ENV_NAME is your environment name.
EDIT: In case conda update spyder isn't working, this post indicates you might need to run conda update anaconda before updating spyder. Also note that you can specify an exact spyder version if you want.
Go to Anaconda Naviagator, find spyder,click settings in the top right corner of the spyder app.click update tab
I see that you used pip to update. This is strongly discouraged (at least in Spyder 3). The Spyder update notices I receive have always included the following:
"IMPORTANT NOTE: It seems that you are using Spyder with Anaconda/Minconda. Please don't use pip to update it as that will probably break your installation. Instead please wait until new conda packages are available and use conda to perform the update."
Use this conda install spyder=4.0.0
This will not mess up your anaconda dependencies.
https://github.com/spyder-ide/spyder/releases
Simply select 'Update Application' after clicking on the settings symbol(top right corner) for Spyder in the Anaconda Navigator console. In my case I just updated it so it's in disabled state.
use this command
conda install spyder=5.0.1
this will install the new version or tell you the error
PackagesNotFoundError: The following packages are not available from
current channels
How to solve the error
1- update your anaconda
conda update anaconda
2- go to anaconda then spyder
or use this command
conda install spyder=5.0.0
make sure you in your base directory.
then conda install spyder will work.
Do it like this: conda install spyder=new_version_number.
new_version_number should be in digits.
One way to avoid errors during installing or updating packages is to run the Anaconda prompt as Administrator. Hope it helps!
You can easily install update version if you use Anaconda by closing Spyder and then running the following command in a system terminal (Anaconda Prompt on Windows, xterm on Linux or Terminal.app on macOS):
conda install spyder= Your desire version
(For example, Version is 3.1)
conda install spyder=3.1
Or you can use pip with this command in a system terminal (cmd.exe on Windows, xterm on Linux or Terminal.app on macOS):
pip install --pre -U spyder
Note: Do not use this command if you are using Anaconda because it could break your installation.
Using pip directly:
WARNING: This will break your Anaconda Installation as described by Spyder maintainer in the comments below; you can try this solution only if the solution mentioned above that use Conda do not work
pip install --upgrade spyder
You might get an error once launching the new Spyder "nbconvert >= 4.0: None (NOK)", which will require you to resinstall configparser:
conda uninstall configparser
conda install configparser
You should now have a fresh and up to date installation of Spyder.
In iOS,
Open Anaconda Navigator
Launch Spyder
Click on the tab "Consoles" (menu bar)
Then, "New Console"
Finally, in the console window, type conda update spyder
Your computer is going to start downloading and installing the new version. After finishing, just restart Spyder and that's it.
It's very easy just in 2 click
Open Anaconda Navigator
Go to Spyder icon
Click on settings logo top-right coner of spider box
Click update application
That it
Happy coding
My solution was uninstalla spyder and installa again.
Solved my problem:
conda uninstall spyder
conda install spyder=5

Categories

Resources