The kernel failed to start as a dll could not be loaded - python

When ever i tried to run my notebook cell in vs code i encounter wit the following issuefailed to start kernal
my version of python is 3.9.15 and i had installed this in miniconda env, the vesrion of ipykernel is enter image description here. if i try to run same cell with my base env which has python version 3.10 it work.
i had uninstall my ipykernel and the reinstall upgrade and downgrade its version but still stuck with the same issue. if i downgrade the version of python to 3.8 this way its also working the issue only encounter with 3.9 version of python

Related

An error occurred while starting the kernel in Spyder

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

Tensorflow-text: NotFoundError: _text_similarity_metric_ops.so not found

import tensorflow-text
Actually i'm trying to run on Windows 10 (Pro), version 1909.
Attempts to run on Python 3.8.5, 3.6.13, and 3.7 brought no result - i've got the same error.
Using Jupiter Notebook, conda (4.10.1)
Version of Tensorflow - 2.1.0
Downloading version of Tf-text is "tensorflow_text-2.4.3-cp36"
Now i'm trying to reinstall conda, switch tensorflow versions
I hope this issue will be fixed soon.
So, this problem was solved easy by myself!
All you have to do is:
Setup conda enviroment, in Anaconda
Then in Anaconda cmd run conda activate <your_enviroment_name>
pip install tensorflow==2.4.1, pip install tensorflow-text==2.4.1
Then it should works.
Remember, run on Python 3.7.10
Also guys from tensorflow says that you can run it on python 3.6 and 3.8, but be carefully with TF 2.4.1, i saw some info that Python 3.6 could not run just that current version.
Best wishes,
Temio

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.

Unable to start Jupyter notebook on VS Code

(Using latest miniconda + VS Code on 64-bit Windows10:) After clean reinstalling VS Code, I can no longer launch jupyter notebook from within it. When I tried to create a new jupyter file for the first time, the Python extension installed ipykernel in my virtual environment "da38" (my main working environment). Then it stays on Connecting to IPython kernel: Connecting to kernel for an unusually long time, and stops with the error message Unable to start session for kernel Python 3.8.5 64-bit ('da38':conda) (images pasted below). I also removed and re-created da38 environment just in case. Used jupyter many times before with no issues until this new VS Code install today, and an identical setup is working on my other computer. Any help is appreciated. Thanks!
I had the latest version and below command worked for me
python -m pip install 'traitlets==4.3.3' --force-reinstall
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 "conda list" to view the version of the module traitlets in the current conda environment. If it shows version 5.0, it is recommended that you use version 4.3.3.
Reference: Unable to start session for kernel Python.
I had this same problem. What worked for me is updating ipykernel.
$ pip install ipykernel --upgrade
I also did a few other upgrades just in case.
$ pip install traitlets --upgrade
$ pip install notebook --upgrade
I did not role back to an older version like 'traitlets==4.3.3'.
If anyone facing same issues now, Can check below steps which helped me to solve this
Update and Restart VS code
Install latest Jupyter Extension from Extensions.
We need to update "ipykernel" and restart VSC:
pip install ipykernel --upgrade

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