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.
Related
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
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.
I have just tried to update my anaconda environment to the latest version and I am now receiving errors. I opened the conda environment as an admin, and the commands issued were:
conda update conda
conda update anaconda
First command finished fine. Second command produced error:
pythonw.exe - Entry Point Not Found
The procedure entry point ?PyWinObject_FromULARGE_INTEGER##YAPEAU_object##AEAT_ULARGE_INTEGER###Z could not be located in the dynamic link library c:\ProgramData\Anaconda3\pythoncom37.dll
I have found a reference to this sort of error that requires me to copy a file libssl-1-1-x64.dll from Anaconda3/Library/bin with the one from Anaconda3/DLLs.
How to Fix Entry Point Not Found while installing libraries in conda environment
However, I do not have that file, in the source location. Is there any commands I can issue to download this file again, or somewhere online I can safely download that one file from?
Got the same error, when updating conda.
However, the file pythoncom37.dll was located in C:\Windows\System32.
Turns out the file was a left-over from a previous update of Python 3.7.5 to Python 3.8,
i.e. not related to the installation of conda itself. My guess is that conda registered with Python 3.7 and then failed to use the dll from an incompatible installation.
Solution: Removed pythoncom37.dll and pywintypes37 from C:\Windows\System32.
I had the same problem while updating tensorflow and other packages using anaconda python3 with sublime text3.
To solve this, I've deleted all the pythoncom37.dll in directory shown from the error window.
Replacing the file from other directory did not work.
Also reinstalling conda, upgrading conda, reinstalling sublimetext3 or tensorflow did not help as well.
Given that there seem to be a lot of answers and some work for for different people with different setups, python versions and circumstances, a quick summary of things to try.
Go to [envpath]\Scripts and run py pywin32_postinstall.py -install to update the pywin32 dependencies
Copy both files found in [anacondaPath]\Lib\site-packages\pywin32_system32 to C:\Windows\System32
Install pywin32 with conda instead of pip with conda install pywin32
Force pywin32 to a particular version (e.g. 224 for Python 3.7) pip install --upgrade pywin32==224
Add \Lib\site-packages\pywin32_system32 to your path environment variables
Uninstall pypiwin32 and install pywin32. pip uninstall and pip install pywin32
Download the latest Visual C++ version and restart the computer (https://support.microsoft.com/en-us/topic/the-latest-supported-visual-c-downloads-2647da03-1eea-4433-9aff-95f26a218cc0)
Downgrade to e.g. Python 3.6 if possible for your purposes
If any of those worked, commenting which one in your case may be helpful to understand what works when:)
List item
Sorry all - the clue was in the error message. The entry on how to fix entry point led me in the right direction. but it was the pythoncom37.dll file I needed to copy.
That's what you get for blindly following instructions.
Many thanks.
When I had this error, it did not show a path for the entry point.
I tried reinstalling anaconda and it didn't resolve the issue.
I found the path by doing pip install win32, which stated the path to the library that was was in use. It turned out it was connecting to a corrupt roaming profile version, so renaming the roaming profile folder (to _OLD) resolved the issue.
Had the same problem as on the picture above, solved it using these steps.
removed the file pythoncom37.dll from the environment in question
removed the file C:\tools\Anaconda3\Library\bin\pythoncom37.dll
run conda install --force-reinstall nb_conda_kernels ipykernel
repeat per environment.
Be aware that this will also upgrade all environment packages in the active environment.
I had the same problem. But my virtual environments all worked okay, so I had a workaround:
Create a new virtual environment called 'env_base' with all standard anaconda packages
conda create -n env_base anaconda python=3.7
Activate it
conda activate env_base
Create the kernel
conda install -c anaconda ipykernel
python -m ipykernel install --user --name=env_base
Then use this virtual environment as the base jupyter notebook. You can replace your launch shortcut with the link for this one and it is as good as having the actual Jupyter notebook working with base packages.
It doesn't fix the problem, but it sidesteps it effectively.
I recently created a new Anaconda (Windows) environment in order to move from tensorflow 1.2 to tensorflow 2.0. My base environment is 1.2, and I created tensorflow-20 in order to install the new version. I did the install from the anaconda command line within the (tensorflow-20) environment. But now everything is messed up.
Now, in Anaconda Navigator, it still shows Tensorflow 1.2.1 as the installed version for base. But in the (base) environment from the Anaconda command line, it shows the version as 2.0.0. Furthermore, in Anaconda Navigator, tensorflow-20 shows no installed packages, including python even.
I feel like I'm fundamentally misunderstanding something here. Can anyone provide some guidance?
How did you install tensorflow 2.0 in the new conda env?
IF with pip, run 'where pip' see if you are using the pip installed
in the base env. You can run 'conda create -n tensorflow-20 pip' to get a pip installed in the new env. Then activate tensorflow-20 and install tensorflow 2.0 with pip.
IF with conda, run 'where conda' to check the same thing.
Preface:
If you install Anaconda on your local machine, it makes sense to install it as Admin. However, if this is not possible, e.g. on an enterprise-managed computer, you must carefully check to use only folders where your user has write permission.
Contribution:
After having experienced a cracked-up package management, I read deeper into that topic. Best Practise: Always try to install everything via conda / Anaconda and best possibly from their central repositories.
If you have a special package, which is e.g. built by local software developers and not published, you can install it from the .tar archive. At that point, I am referring to following documentation: https://docs.anaconda.com/anaconda/user-guide/tasks/install-packages/
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.