takluyver / nbopen

Open a Jupyter notebook in the best available server
BSD 3-Clause "New" or "Revised" License
304 stars 58 forks source link

Latest conda seems to have broken nbopen #61

Open bingbong-sempai opened 5 years ago

bingbong-sempai commented 5 years ago

I recently updated to conda 4.6.4 and nbopen no longer works. Rolling back the installation fixed nbopen but broke everything else :(

ArmandoRl1 commented 5 years ago

Can confirm, can't use it.

askorikov commented 4 years ago

File manager integration doesn't seem to work in conda 4.7.12 either (running on Windows). On the other hand, nbopen command works from Anaconda prompt. I guess, conda has to be activated before running nbopen, which is currently not implemented in the file manager integration, as far as I understand.

takluyver commented 4 years ago

I'm not sure why the conda version would affect nbopen at all. But I'm not a Windows user, so I can't really do much to work it out.

askorikov commented 4 years ago

In fact, it seems to work if conda is added to the PATH variable (you can choose this option during conda installation).

takluyver commented 4 years ago

It should be using a full path to pythonw.exe in the registry key, so PATH shouldn't matter. :confused:

Have a look at the nbopen.install_win module if you want to dig into it.

askorikov commented 4 years ago

Yep, did that. So, on double-click the Python interpreter is launched properly, but without conda environment activation it can't load the required libraries, it seems. Anyway, with the mentioned workaround it works just fine.

takluyver commented 4 years ago

That's unfortunate. Normally if you start Python in an environment with a full path, it can access the libraries from that environment. But it sounds like that's no longer the case on Windows.

Greedquest commented 3 years ago

Anaconda temporarily adds and removes items from the PATH variable when you activate an environment; this is how commands like nbopen just work from anaconda prompt but not cmd.exe and why python file.py alwas uses the python.exe associated with that conda environment.

The solution I went with was to get conda to run nbopen - see https://github.com/takluyver/nbopen/issues/69#issuecomment-751688215