-
-
Notifications
You must be signed in to change notification settings - Fork 418
JupyterLab on Windows does not properly activate conda environment #388
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗 |
Thank you @ukoethe this is a very valuable observation. I really appreciate you taking time to experiment and figure out the problem and the solution. |
I can confirm that the solution in the OP works. Installation version: v3.2.5-2 installed via the Windows Installer Initially, I could not start JupyterLab Desktop due to #381. Then, I followed the instructions in the OP (I have no custom Python installation):
Now, JupyterLab Desktop opens. |
I also agree that this workaround works - I'm part of a class that is learning to code for the first time, and the CMD Line solution does work, it's also hard for many of my classmates to understand/work with. Hopefully there's a way to integrate this? |
Seems both issues "Server Initialization Error" and "Cannot connect to Kernel" originate from same source. My hack is to execute jlab from this file now (save as JupyterLab.bat):
|
The solution by @MichaDit represents a good way to be able to have a file that is clickable to launch JupyerLab. 👍
|
Indeed, and that's also what I do right now. But including the activation into |
@ukoethe @MichaDit @antunderwood @yellowincarnate @aravindh-krishnamoorthy could you test the v3.2.9-1 release candidate for this issue? https://github.com/jupyterlab/jupyterlab-desktop/releases/tag/v3.2.9-1 |
Besides missing installer signature, everything seems to work fine on Win10. Edit: Sometimes there is JS error on start and JLab cannot connect to kernel: |
thanks for testing @MichaDit! Are you getting that JS error randomly or do you have steps to reproduce? |
Randomly, cannot figure out any steps to reproduce @mbektas |
thanks @MichaDit. I was also able to reproduce randomly and have been debugging this issue for days. The server appears to be crashing when making websocket connections, but I couldn't trace the source of the crash (checked available logs and call stacks). It happens only at initial launch time and only when server is launched from the electron app. I couldn't find the source of the crash but as a remedy I am restarting the server if it crashes. Once you get the error as in #388 (comment), you can restart the kernel now. |
@ukoethe could you test with the latest version and update the issue if it fixes the problem or not? https://github.com/jupyterlab/jupyterlab-desktop/releases/tag/v3.3.2-1 |
closing since no response for long. please retest with latest and create new issue if necessary. |
This might be related to #381 and #386.
After installation on Windows, I got the "Server Initialization Error" reported in #381 with same log message. I was able to work around the problem by starting jlab from the command line after explicit activation of the Python environment:
The same was necessary in order to use a custom Python environment. Merely adding the path to the Python environment as described here is not sufficient! Once again, the environment must first be activated, e.g.:
On Windows, the
activate
command adds about 7 directories to thePATH
variable, and jupyter will not work properly without these settings. The workaround suggested in #381 (comment) (copy some DLLs to other directories) is not the correct solution.I suggest to add the appropriate
activate
call at the beginning ofJupyterLab.exe
.On a related note, in some cases the JupyterLab GUI opened, but was unable to start the kernel. After some time-out period, the status bar displayed
Python 3 | Disconnected
. Then, running a cell had no effect except for advancing to the next cell, as described in #386. Once again, activating the environment properly before running JupyterLab fixed this problem.The text was updated successfully, but these errors were encountered: