jupyter / help

:sparkles: Need some help or have some questions? Please visit our Discourse page.
https://discourse.jupyter.org
291 stars 97 forks source link

How to install packages to Jupyter Notebook? #436

Open OriolCHANDRE opened 5 years ago

OriolCHANDRE commented 5 years ago

Hi, I'm creating a notebook in order to share a python project in which I have been working in. My project is organised in folders, so from my main script I call them. Besides, I also call one package (pyDOE) that it seems not to be installed in the notebook.

import numpy as np
from scipy import linalg
import timeit
from pyDOE import lhs
from sklearn.externals import joblib
#My own scripts
import functions_Offline as foff
from gaussian_process import GaussianProcess

How can I fix this issue ?

Thank you all for the help. Oriol

kaczmarj commented 5 years ago

@OriolCHANDRE - you do not install packages in a notebook. you have to install them in the python environment you're working in. if you're using conda, you can conda install those packages (and if they are not available in conda, you can pip install).

if you intend to share the notebook, the people with whom you are sharing with also have to install these packages.

to solve the problem of sharing your notebook with all of its dependencies, you can look into container software, like docker.