I am using Anaconda installation and many times the updates don't work.
For example, some bokeh commands work well when I run the a python program from the command line (i.e c:> python testPlot.py), but will not work in the IPython console or from Spyder.
I tried updating conda, Anaconda, bokeh, but the behavior doesn't change. This is not just this one package. Others have the same issue.
Any idea?
Thanks.
C:>conda update conda
conda 4.0.6 py27_0
C:>conda update anaconda
anaconda 4.0.0 np110py27_0
C:>conda update bokeh
bokeh 0.11.1 py27_0
Just open a cmd prompt in Windows or Terminal on a mac and paste this with the version you are having trouble installing.
conda install anaconda-navigator=(whatever version is giving you trouble)
Related
I have Anaconda and Spyder installed. I had been using Spyder with no issues until it randomly stopped working the next time I opened it to continue working on something. I'm very new to coding and I appreciate your help in advance.
Things I have tried (after googling and looking at posts from people who have had the same or similar problem):
restarting my computer
resetting spyder
updating pyzmq
updating
ipykernel
pip install spyder kernels
I'm not sure what happened or why it stopped working.
when I run conda list Spyder$:
pyls-spyder 0.4.0 pyhd3eb1b0_0
spyder 5.2.2 py39haa95532_1
Edit: I would also like to add that while I can get jupyter notebook to open, nothing is printed. So it's likely the kernel is also not working there.
I've tried following this video that had me run the following:
python -m pip install ipykernel
python mipykernel install user
I have spyder 5.1.5 and spyder-kernels 2.1.3 installed as below (via conda, on Ubuntu 20.04):
# Name Version Build Channel
pyls-spyder 0.4.0 pyhd8ed1ab_0 conda-forge
spyder 5.1.5 py39h06a4308_1
spyder-kernels 2.1.3 py39h06a4308_0
in an environment. But when I launch spyder it prints an error message saying that my python environment or installation doesnt have the spyder-kernels module or the right version of it installed. For this enviroment I need python 3.9 for another package which is not available for python 3.10 and hence the reason why an older version.
I suspect this is because of another enviroment where I have the latest version of spyder installed with a newer kernel. However for the other environment I had to install spyder via pip because conda has not updated the spyder to the latest version and the former version has some bugs which really affect productivity (I have also tried other options such as installing spyder in its own environment and then linking it to the other enviroment that I am using it in but it created a whole bunch of other problems as severe as not being able to use the variable explorer and such). So I did really try before having to resort to this method. So in this enviroment spyder appears as
#
# Name Version Build Channel
pyls-spyder 0.4.0 pypi_0 pypi
spyder 5.2.2 pypi_0 pypi
spyder-kernels 2.2.1 py310hff52083_1 conda-forge
Why is the previous enviroment seeing the kernels in this enviroment? Is it because of the way I installed spyder here. Should I just completely remove this enviroment for the other to work properly or is there an easier way.
Note:
I also run into the same problem if I create an environment from scratch for spyder as follows: conda create -n spyder-env spyder -y
Update:
Ok, curiosity got the better of me, uninstall all my enviroments and reinstalling this enviroment worked but still dont exactly know why this occured. I will try reinstalling the other enviroments as they were and let you know if it breaks stuff again.
I had the same issue with kernel hanging on valid scripts:
spyder kernel hangs...
Spyder 5.2 isn't available yet in Anaconda, but I installed it via the link provided in the answer above. When I attempt to get it to use my current conda environment, I get the following error:
Your Python environment or installation doesn't have the spyder‑kernels module or the right version of it installed (>= 2.2.0 and < 2.3.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.2
I can't update conda from sypder-kernel=2.1.3 to 2.2.0 due to numerous conflicts.
I'm wondering if anyone has any ideas on how I might get Spyder 5.2 working with Anaconda, or do I simply have to wait for it to be released by Anaconda? I'm not that savvy in this type of thing.
I had the same problem with spyder 5.2.1, I opened cmd and typed:
pip install spyder-kernels==2.2.0
Then it downloaded the right kernel and after opening spyder I didn't get any error related to its kernel version.
I recently updated my version of Spyder to 4.0.1 with Anaconda on macOS Catalina. I use Zsh and initially the command
conda install spyder=4.0.1
did not work, so I followed this guide to get Zsh to recognise the conda command, which essentially involved downloading the anaconda command line installer and running
bash ~/Downloads/Anaconda3-2019.10-MacOSX-x86_64.sh
export PATH="/Users/myname/anaconda3/bin:$PATH"
then running
conda install spyder=4.0.1
to update Spyder. This seemed to work fine, the new version is stored in /users/myname/anaconda3/envs/spyder-4.0.1 and upon opening Anaconda-Navigator I was able to specify Spyder 4.0.1, although I had to change the "Applications on" option to "spyder" rather than "base (root)". I could then open Spyder 4.0.1 on the same Python 3.7 projects I had on Spyder 3.3.6, but they could no longer run due to the error
ModuleNotFoundError: No module named 'numpy'
This was not just for numpy, it also couldn't find scipy or matplotlib, although it could find time and sys. When I run
conda list
All of the modules are there, and Spyder 3.3.6 still runs fine, but for some reason the new version can't use them.
EDIT: Have resolved the issue. All the modules were had to be manually added to Spyder 4.0.1 in the Anaconda-Navigator window. On the left go to Environments, select spyder-4.0.1 and a list of installed modules appears. In the drop down menu select "Not installed" and select the modules you wish to have installed, then click apply. You can now open Spyder 4.0.1 and import the modules as required.
You should update to python 3.7 and then update Spyder.
conda install python=3.7 anaconda=custom
I was lately trying to update all my Anaconda packages:
conda update conda
conda update anaconda
Some of them still were not updated, so I also did conda update --all.
Right now my conda version : 4.3.16, which seems to be the latest release. However, for some reason, matplotlib still has old version:
conda list
matplotlib 1.5.1 np111py35_0
According to the Anaconda changelog, it should be updated to 2.0 version: matplotlib from 1.5.3 to 2.0.0.
My installed python version is 3.5.2, if this matters.
UPD: Seems that spyder-app is blocking update because of problem with dependencies:
conda install anaconda=4.3.1
UnsatisfiableError: The following specifications were found to be in conflict:
- anaconda 4.3.1* -> spyder 3.1.2 py34_0
- spyder-app -> spyder 2.3.3
Use "conda info <package>" to see the dependencies for each package.
conda install matplotlib=2
UnsatisfiableError: The following specifications were found to be in conflict:
- matplotlib 2.0*
- spyder-app -> spyder 2.3.0 -> pyqt 4.* -> qt >=4.8.6,<5.0
- spyder-app -> spyder 2.3.0 -> pyqt 4.* -> sip >=4.16.4,<4.18
Use "conda info <package>" to see the dependencies for each package.
UPD2: Problem was solved by removing spyder-app:
conda remove spyder-app
conda update anaconda
Matlotlib was updated to the 2.0 version, among other updated packages. I also checked if Spyder IDE still works, and it still is able to run.
It probably is a dependency conflict. The anaconda package is just a meta-package that bundles packages, if some package can't be updated because of a package you installed (maybe requiring matplotlib < 2, or even indirectly by requiring a package and version that matplotlib depends on) then you probably can't install the newest version of the anaconda package. You could try to install the newest anaconda package (currently 4.3.1) yourself:
conda install anaconda=4.3.1
But you can also try to install a specific version of matplotlib manually and see what happens (there should be an instructive message if it can't install it because of dependencies):
conda install matplotlib=2
In your case it's spyder-app that is responsible. It's a deprecated package and not included in newer versions of anaconda so one possibility is to remove it:
conda remove spyder-app
and then try the update of anaconda or matplotlib.
Another way would be to create a new environment and then you can choose which environment to use when:
conda install -n mynewenvironment python=3.5 anaconda
and then use the new environment when you need matplotlib 2 and the old environment if you need spyder-app (and don't care about the matplotlib version).