keeping Spyder updated in Anaconda - python

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.

Related

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.

Why does `conda update qt` update Spyder the best?

No matter if I tried conda update spyder, or conda remove spyder followed by conda install spyder, I could never get anaconda to update to Spyder version 4.1.5, with these commands claiming that version 4.0 is already the latest version.
Finally, when I tried the command conda update qt it prompted the additional installation of Spyder 4.1.5 automatically. Why did this command do it, and the normal ones failed? What exactly is qt? Don't just say binding. what does it stand for and everything
(Spyder maintainer here) Qt is a library to create graphical applications in all operating systems (Windows, Linux and macOS). Spyder is based on that library.
I'm not sure why running conda update qt updates Spyder, but it's certainly one of Spyder dependencies.
What we usually recommend to update Spyder is to run the following commands:
conda update anaconda
conda update spyder

anaconda navigator won't launch after a conda install tkinter

I have been using conda and anaconda for a few weeks without any issue (with pythonv 3.6).
However since I installed tkinter I cannot open the anaconda navigator nor spyder anymore.
If i do it from the menu then nothing happend, if I try from the anaconda prompt, it does not work and windows says that python stopped working.
The same thing happened yesterday so I unistalled everything and reinstalled anconda from scratch this morning.
Everything worked perfectly and the navigator launched. So I then reinstalled tkinter, and the same bug
as yesterday happened, I cannot open the anaconda navigator anymore.
Installing tkinter also dowloads certifi, and this may be issue (based on what I read from other thread).
Before installing tkinter I did update all, update conda and update anaconda navigator.
Here is the link to github issue I just opened, but I never posted there so I am not sure if I posted at the right place or in the tigh way. So I figured i would post here too.There is complete description of my conda environment there as well as the output from when I installed tkinter.
https://github.com/conda/conda/issues/7209
Let me know if you need more information or if I should rewrite everything from github, but it will be a long post then...
As you can see from the output of your conda install command, when you try to install tkinter into your root conda environment a number of packages already installed there need to be downgraded in order to be compatible with tkinter. This is almost certainly what then causes problems with launching Anaconda Navigator.
Instead of installing new packages into the root conda env, you should create a new one and specify the packages you want to use there:
conda create -n myenv tk python
where myenv is the name you choose for your new environment and tk python is the list of packages you want to install - you can add any further ones to this list or install them later. (Usually you don't need to specify python itself as most packages are dependent on it, but it appears tk isn't one of them.)
To use the new environment, you then need to activate it, and/or make sure your IDE is configured to use the Python interpreter for that environment - see the conda docs for more help.

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

spyder/juypter not working after downgrading python

I had to download my python version from 3.5 to 3.4 because one of the packages I needed wasn't supported in 3.5. I downgraded the python version using the conda command prompt, and everything worked fine - got my package to install with all its dependencies and no conflicts. But now when I try to open Juypter notebook or Spyder, nothing happens. My IPython works just fine. I'm thinking maybe i have to downgrade Juypter and Spyder, but I'm not sure. Anyone have any ideas?
After a day of searching I finally figured it out.
I initially used
conda install python=3.4
Bad idea - ended up having to do a fresh install of anaconda to get spyder and juypter working again.
What ended up working is creating a separate environment.
conda create -n py34 python=3.4 anaconda
activate py34
... then install packages ...
This added spyder(py34), juypter(py34), and all its "py34 brothers and sisters" to my start menu. Using these new shortcuts/environment, I now have access to the packages I need by choosing the appropriate short cut. Yes, my start menu has extra python shortcuts now, but whatever - it works.
Just make sure Make sure you install the packages you're looking for before you close the anaconda console. Perfect for installing theano dependencies mingw and libpython.

Categories

Resources