You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using -m is the only realiable way to run command line tools written in Python outside of a virtualenv. Without it, people may end up with PATH issues and won't know which interpretter is used by the program.
python -m jupyter console|notebook|... works fine on Linux, but trying to do it in Windows results in an error:
C:\Users\user>py -m jupyter console
...
File "C:\Users\user\AppData\Roaming\Python\Python38\site-packages\jupyter_core\command.py", line 133, in _jupyter_abspath
raise Exception(
Exception: Jupyter command `jupyter-console` not found.
Of course, if you use manually jupyter-console.exe, it works:
C:\Users\user>C:\Users\user\AppData\Roaming\Python\Python38\Scripts\jupyter-console.exe
Jupyter console 6.1.0
Python 3.8.2 (tags/v3.8.2:7b3ab59, Feb 25 2020, 23:03:10) [MSC v.1916 64 bit (AMD64)]
Type 'copyright', 'credits' or 'license' for more information
IPython 7.14.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]:
In fact, you can call jupyter itself without any problem, just not any subcommand:
The tests are here on Windows 10, Python 3.8.2 and pip 19.2.3, but I don't know any version that is not affected.
jupyter is probably one of the most popular command line tool installed, with black, pylint, mypy, pytest and flake8. All the later allow -m to work on all plateforms.
This makes explaining how to install and use python tooling very easy, except for jupyter, for which we have to add the instruction to fiddle with the system PATH, to use directly the exe, or anaconda, which all come with a different set of problems.
The text was updated successfully, but these errors were encountered:
@ksamuel Sorry it took so many years to get here, but is the issue that we are missing .exe at the end on windows, and that if we were to add that then the subcommand would launch successfully? I don't have access to a windows machine right now, but have you tried either editing the python code to accomplish this, or even possibly hack around it by launching
Using
-m
is the only realiable way to run command line tools written in Python outside of a virtualenv. Without it, people may end up with PATH issues and won't know which interpretter is used by the program.python -m jupyter console|notebook|...
works fine on Linux, but trying to do it in Windows results in an error:Of course, if you use manually jupyter-console.exe, it works:
In fact, you can call jupyter itself without any problem, just not any subcommand:
The tests are here on Windows 10, Python 3.8.2 and pip 19.2.3, but I don't know any version that is not affected.
jupyter is probably one of the most popular command line tool installed, with black, pylint, mypy, pytest and flake8. All the later allow
-m
to work on all plateforms.This makes explaining how to install and use python tooling very easy, except for jupyter, for which we have to add the instruction to fiddle with the system PATH, to use directly the exe, or anaconda, which all come with a different set of problems.
The text was updated successfully, but these errors were encountered: