1
0
mirror of https://github.com/balkian/gists.git synced 2024-11-22 09:42:28 +00:00
This commit is contained in:
J. Fernando Sánchez 2019-03-21 16:07:11 +01:00 committed by GitHub
parent ca55b51129
commit f803f9701e

View File

@ -6,12 +6,13 @@
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
"try:\n", "# Install a pip package in the current Jupyter kernel.\n",
" import bitter\n", "import sys\n",
"except ImportError:\n", "import site\n",
" import pip\n", "usersite = site.getusersitepackages()\n",
" pip.main(['install', '--user', 'bitter'])\n", "if usersite not in sys.path:\n",
" import bitter\n", " sys.path.append(usersite)\n",
"!{sys.executable} -m pip install --user -r requirements.txt",
"import os" "import os"
] ]
}, },