I don't know why but after half day using my kernel 'geomatic' in jupyterhub, something crash. My notebook doesn't work anymore... After some researches, I understand that issue comes from python version used by notebook or console. It's a bad one python: 3.6.3 whereas in my kernel terminal (source activate geomatic) I have python 3.6.6. I don't know why but this difference makes crash my scripts and I can't import geopandas in a notebook for example.
always install from "Anaconda Prompt" if using Anaconda Navigator in windows. I had a similar issue and installing the package using Anaconda prompt. Make sure the python version from Anaconda prompt and jupyter are the same (should be)
Related
I tried to run a jupyter notebook cell in vscode today and got
"Running cells with 'Python 3.10.6 64-bit' requires ipykernel package".
This is very strange, as my Jupiter laptop environment was still working yesterday. Also, I see all the python packages in their place. The only thing that has changed is that last night I updated the system packages through Pop!_Shop (Pop!_OS 22.04 LTS).
Running python3.10 I noticed that the version of the GCC inside the vscode terminal is different from the one in the system terminal. How is this even possible when the which command shows that the path to the binary is the same? Then I checked gcc --version itself and to my surprise the same thing happened to it.
from vscode terminal
from system terminal
sys.path in both terminals is the same, but one sees packages, for example requests, and the other does not.
I am sure that the original problem with the jupyter cell is related to this, because ipykernel is also in the sys.path, which is somehow inaccessible to the vscode's terminal and maybe jupyter extension.
For Jupyter I can switch to one of the venvs, where the problem disappears. But the magic with the binary in the terminals remains unclear.
EDIT:
The problem was solved by uninstalling the flatpak version of vscode and installing the fresh deb package from the official site. Now in vscode terminal I have the same compiler version as in the system terminal and the modules are found without problems, including ipykernel.
Solution is to reinstall vscode with deb package from official website. See the edited part of the question.
I've just updated Anaconda navigator. Trying to launch Jupyter Notebook (version 5.7.10) produced the following error:
Exit code: 127
I've tried to launch this in a Python 2.7 environment, as I need version control for some older tools that are incompatible with Python 3. The spyder installation on that environment takes a suspiciously long time to set up (it actually doesn't seem to install at all).
I could launch jupyter normally on a Python 3 environment. So it seems like something is wrong with the environment manager.
Has Anaconda seized to support pre Python 3 environments (which for me was the main reason for using it as opposed to Google's Colab, say)?
Thanks.
I've been using the Interactive window in VSCode to test my code and the kernel suddenly stopped working.
There are two available kernels: Python 3.9.9 64-bit (windows store), and Python 3.9.7 64-bit
The default being loaded each time I open the window is the former, which gives the 'Kernel process Exited' error, and the other one says it requires ipykernel installed, which is already installed.
Is there a way to fix the kernel issue or is there a better way to test my python code?
Do you have any recommendations for how to call functions from a python file in VSCode?
About kernel question, It basically means the program has finished running. If the code is not giving the answer you are expecting, you may try the following two ways, or even have to provide code.
1. Restart Kernel:
2. Create virtual environment.
python -m venv .venv
Selecting it as python interpreter and activating it in terminal, then select it in Jupyter and it will notice you install required ipykernel.
Reference: Create a virtual environment and Select and activate
an environment
Then, call functions from a python file in VS Code. Treat it as a module, see the example that i call the func() from a.py in both b.py and jupyter notebook:
Installing the jupyter notebook and restarting the kernel worked for me.
pip install notebook
I have been dealing with this problem for months and still found no solution.
I installed anacond first, and then installed spyder (but not from anaconda interface, but from outside it). I want to use spyder but when I open cmd terminal and type "pip install pyarrow", the cmd shows it is already installed but spyder doesnt load it.
Thank you very much/
Maybe Spyder is running a python interpreter version (say 3.7), but the pyarrow package was only installed for a later version (say 3.8).
Try this:
Check your Python interpreter version
Check for which versions of Python was Pyarrow package installed.
Spyder runs a python interpreter by default and you can change which version to run:
Go to Spyder --> Preferences --> Python interpreter --> Use the following python interpreter (insert the path of the desired python version).
I'm trying to use anaconda with visual studio code but keep getting this error message every time I try to run something.
enter image description here
enter image description here
What Iv'e tried/confirmed:
Python 3.9.1 is installed and Iv'e got no problems running codes in VSC when I use the standard enviroment or inside a command terminal.
The version of python the anacoanda says it is using is 3.8.5. Should it be 3.9.1 or is that normal?
Python and anaconda were added to path during installation - Iv'e already made that mastake before.
Presumably anaconda is installed properly. I can access the navigator and command prompt.
Its not the code that Iv'e writen. I tried simply writing print("Hello") and it gives me the same error.
Installed the latest version of anaconda.
I have encountered the same problem. The reason is that VS Code uses the powershell terminal by default, but powershell does not activate the conda environment by default.
Therefore, it is recommended that you use the cmd terminal or other terminals that come with the system. (Because in VS Code, the terminal it uses is to integrate the terminal from the system and it not only supports the powershell terminal.)
Solution: for example, switch to using cmd terminal:
Reference: Integrated terminal in VS Code.