How to install a module from a notebook.
from jyquickhelper import add_notebook_menu
add_notebook_menu()
Running pip install
from the command line requires to be in the right folder. And sometimes, several python installations interfere between each others. Why doing it from the notebook itself:
try:
# pip >= 19.3
from pip._internal.main import main as pip_main
except Exception:
try:
# pip >= 10.0
from pip._internal import main as pip_main
except Exception:
# pip < 10.0
from pip import main as pip_main
pip_main("install -q qgrid".split())
0
try:
pip_main("install -q qgrid --no-deps".split())
except Exception as e:
print(e)
try:
pip_main("install -q qgrid --upgrade --no-deps".split())
except Exception as e:
print(e)
pip_main("install -q qgrid --upgrade --no-deps --no-cache-dir".split())
0
pip_main("install pyquickhelper pyensae ensae_projects --upgrade --no-deps --no-cache-dir".split())