An error occurred while starting the kernel in Spyder - python

I have been trying to get my Spyder console to stop this error on my Mac Big Sur. I am not sure if there an issue with the version and interpreter I am using, but I am not sure how to switch to another version or have the correct version.
Your Python environment or installation doesn't have the
spyder‑kernels module or the right version of it installed (>= 2.0.1
and < 2.1.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.0
or
pip install spyder‑kernels==2.0.*
I have tried both commands in terminal but they fail to download

Related

Python 3.9 uninstalled & deleted, yet being prioritized in command line. "fatal error in launcher"

py --version shows 3.10 which was installed manually in Windows, not from cmd
Pip install attempts to run with 3.9, then throws the error:
no "\\python39\\python.exe" nor "Scripts\\pip.exe"
How do I prioritise running with new version ?
Tried
Deleted path env. variables and 3.9 launcher, didn't solve.
up to date: pip setuptools wheel,
forced pip installs
You may need to do the following:
Restart computer / environment
Check start folder to see if you have Python there still
Run python3.9 in CMD to see if an exe is still in PATH
A quick fix would be to use:
pip3.10 install # package here
Have you rebooted your system after modifying the environment variables?
Some applications only detect changes after a full system reboot.

Unable to start jupyter notebook in visual studio code

I am trying to make a jupyter notebook in visual studio code but I keep getting this:
''Unable to start session for kernel Python 3.8.3 64-bit ('Lenovo':
virtualenv). Select another kernel to launch with.''
I have anaconda installed and the jupyter notebook works fine in the anaconda navigator. I also tried to use python 3.8.3 base:'conda' but it didnt work. I'm using windows 10
This issue also occurs on my computer. The solution is to restore the version number of a dependency package "traitlets" of ipython kernel to 4.3.3.
You could try to use "pip list" to view the version of the module "traitlets" in the current virtual environment. If it shows version 5.0, it is recommended that you use version 4.3.3.
You could reinstall "traitlets 4.3.3" with the following command:
python -m pip install 'traitlets==4.3.3' --force-reinstall
If this command is not available, you could use 'pip' to uninstall traitlets5.0 (pip uninstall traitlets) and then use 'pip' to install traitlets4.3.3.(pip install traitlets==4.3.3)
Reference: Unable to start session for kernel Python.
I had the exact same problem. Fix it by uninstalling the Python extension that is linked to that error message.
If you are using conda to manage your Python environments, activate your target environment at a command prompt, then enter the following:
$ conda install traitlets=4.3.3
This solved the problem for me.

`pip` installed `discord.py` to `1.3.4` successfully, but `print(discord.__version__)` displays `1.3.3`

I ran the command pip install discord.py==1.3.4 successfully. However when I ran print(discord.__version__) in PyCharm it displayed 1.3.3. My pip version is 20.1.1 and Python is version 3.7. Does anyone have any idea why the version number is different?
Make sure you are not using virtual environment. You may have installed the latest version to your system packages. Be sure to also install it in your dev environment.

Spyder: Error occurred while starting the kernel

I am getting this error message in my Spyder console:
This happened after I changed the Python interpreter to my python 3.8 exe file since my Anaconda/Spyder was using 3.7. I tried to use conda install spyder-kernels in my anaconda prompt but it said that All requested packages already installed. Any way to fix this?

Problem installing tensorflow in virtual environment

This issue in some form has come up before, however I am having a variant of this issue.
I had python 3.8 installed. Tensorflow does not have a version for this python.
I therefore installed python 3.7 and set up a virtual environment using virtualenv.
In visual studio code I even updated the settings json "python.pythonPath": to the correct path for version 3.7 of python.
I install the correct version of tensorflow using the correct link for 3.7 on the site:
'''pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow_cpu-2.1.0-cp37-cp37m-manylinux2010_x86_64.whl'''
But i still get the error
"ERROR: tensorflow_cpu-2.1.0-cp37-cp37m-win_amd64.whl is not a supported wheel on this platform."
When i type python -V I still get Python 3.8.1, could this mean I am not correctly using the virtual environment?
However I have now set up virtual environment using anaconda which is limited to 3.7 and it still says 3.8 when using "python -V" and i get the same error when trying to install.
You can try to either reinstall anaconda, visual studio, or type in the command "pip install --upgrade tensorflow". This should work without the link.
After creating the virtual environment you need to activate it if you haven't already. Once you do, your command line prompt should indicate that a new version of Python, in your case 3.7 is now running.
I ended up using Anaconda with Python 3.6, it seems tensorflow would not work for 3.7 on windows.

Categories