Skip to content

Commit

Permalink
permanent pip install in drive
Browse files Browse the repository at this point in the history
  • Loading branch information
korakot committed Oct 11, 2020
1 parent 46f0ec7 commit 96a9aa4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion kora/drive.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ def link_nbs():
import import_ipynb
import_ipynb.find_notebook = find_in_nbs


def find_in_nbs(fullname, path=None):
""" lookup a notebook file to import """
nb_path = '/nbs/' + fullname + '.ipynb'
Expand All @@ -125,3 +124,11 @@ def find_in_nbs(fullname, path=None):
nb_path = nb_path.replace("_", " ")
if Path(nb_path).is_file():
return nb_path


def install(package):
""" Permanently install a package in Colab """
link_nbs()
cmd = 'pip install --target=/nbs ' + package
print('!'+cmd)
get_ipython().system(cmd)
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

setuptools.setup(
name="kora",
version="0.7.5",
version="0.7.6",
author="Korakot Chaovavanich",
author_email="[email protected]",
description="Convenient tools for Colab",
Expand Down

0 comments on commit 96a9aa4

Please sign in to comment.