Open jessicagohh opened 4 years ago
I confirm the same issue here, no matter what I do hydrogen only starts the base kernel and the recommendations from the previous discussions are not effective.
MacOs 11.0.1
Atom 1.53.0 x64
Conda 4.9.2
Hydrogen 2.14.6
Importing python from terminal
with the env active load the correct version, though running jupyter notebook
loads the base python instead of env. The env is available for selection when creating a new notebook but somehow it still points to the base python,sys.version
returns the base python and the package needed from the env is not available.
Update:
I ran conda update ipykernel
and again python -m ipykernel install --user --name toolpacenv
and now it really seems to work! However I need to start Atom from the console in an activated environment (base, toolpacenv, ...). Still don't understand, what's going on...
Original message:
I am having trouble starting the selected environment at all. Unfortunately, I get an error and cannot run code:
Traceback (most recent call last): File "C:\Users\wagenhaeuser\Anaconda3\envs\toolpacenv\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "C:\Users\wagenhaeuser\Anaconda3\envs\toolpacenv\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\wagenhaeuser\Anaconda3\envs\toolpacenv\lib\site-packages\ipykernel_launcher.py", line 15, in from ipykernel import kernelapp as app File "C:\Users\wagenhaeuser\Anaconda3\envs\toolpacenv\lib\site-packages\ipykernelinit.py", line 2, in from .connect import File "C:\Users\wagenhaeuser\Anaconda3\envs\toolpacenv\lib\site-packages\ipykernel\connect.py", line 18, in import jupyter_client File "C:\Users\wagenhaeuser\Anaconda3\envs\toolpacenv\lib\site-packages\jupyter_clientinit.py", line 4, in from .connect import File "C:\Users\wagenhaeuser\Anaconda3\envs\toolpacenv\lib\site-packages\jupyter_client\connect.py", line 21, in import zmq File "C:\Users\wagenhaeuser\Anaconda3\envs\toolpacenv\lib\site-packages\zmqinit.py", line 55, in from zmq import backend File "C:\Users\wagenhaeuser\Anaconda3\envs\toolpacenv\lib\site-packages\zmq\backendinit.py", line 40, in reraise(*exc_info) File "C:\Users\wagenhaeuser\Anaconda3\envs\toolpacenv\lib\site-packages\zmq\utils\sixcerpt.py", line 34, in reraise raise value File "C:\Users\wagenhaeuser\Anaconda3\envs\toolpacenv\lib\site-packages\zmq\backendinit.py", line 27, in _ns = select_backend(first) File "C:\Users\wagenhaeuser\Anaconda3\envs\toolpacenv\lib\site-packages\zmq\backend\select.py", line 28, in select_backend mod = import(name, fromlist=public_api) File "C:\Users\wagenhaeuser\Anaconda3\envs\toolpacenv\lib\site-packages\zmq\backend\cythoninit.py", line 6, in from . import (constants, error, message, context, ImportError: DLL load failed: Das angegebene Modul wurde nicht gefunden.
It seems, as if there is a "\" missing in several pathnames (right before "__init__").
When I instead open a console, activate the environment ("toolpacenv" in this case) and then type "atom", I can run the code using the (only then showing up) "Python3" kernel. However, I cannot switch environments in atom this way. I get the same error, when I try. Any ideas how to fix this very much appreciated.
Cheers
Description
I've looked through a dozen pages on GitHub, stackoverflow, Atom's forum pages, and tried out their recommendations, nothing seems to work.
I use a conda virtualenv, and in the past this worked fine. I'm not sure what happened that it doesn't work any more.
The problem:
ModuleNotFoundError: No module named 'geopy'
^when I try to import geopy in a Hydrogen kernel in Atom. This instance of Atom was opened within the virtualenv I'd installed geopy on (using
atom --new-instance
or simplyatom
).Because I also create a new kernel using
python -m ipykernel install --user --name YourEnvName
before I've opened Atom, when importing in Atom, I'm asked which kernel to use - I pick the new one I'd created.I have fresh installations of jupyter, updated conda, installed anaconda.
Before all the above, I'd tried uninstalling Atom (incl manually searching for all of the as-yet-undeleted Atom files and removing them myself), then reinstalling it with the Hydrogen package. I've also tried deleting all user-installed packages in the base environment, then creating fresh new virtualenvs - also didn't work.
Right now Atom appears to find only packages that were universal/installed on
base
. geopy is installed on the virtualenv I'm on - no problems importing geopy when I'm running Python shell from Anaconda Prompt.Steps to Reproduce
python -m pip install python-language-server[all]
.python -m ipykernel install --user --name MyVirtualEnv
.atom
oratom --new-instance
.import geopy
in Atom, and attempt to run it in the container. You will be prompted to select between the kernels for Python3 or MyVirtualEnv.Versions
OS version: Windows 10
Logs
conda list
produces:Tickets this is related to (but their solutions did not resolve the issue) : https://github.com/nteract/hydrogen/issues/501 https://github.com/nteract/hydrogen/issues/899