googledatalab / datalab

Interactive tools and developer experiences for Big Data on Google Cloud Platform.
Apache License 2.0
974 stars 249 forks source link

Error when using `%datalab` with a Jupyter notebook. #1668

Open lgautier opened 7 years ago

lgautier commented 7 years ago

Trying to use the datalab magic from jupyter (after doing %load_ext google.datalab.kernel) results in an error at the first use of %datalab ("module traceback cannot be imported").

However setting the environment with CLOUDSDK_PYTHON_SITEPACKAGES=1 appears to fix the problem. Is there a way to have a better message, and may drop the requirement to have an environment variable when importing the module from the Jupyter notebook ?

qimingj commented 7 years ago

I cannot reproduce the issue on my side. If you just run "import google.datalab.kernel", do you get more detailed errors?

lgautier commented 7 years ago

I am using a Python virtualenv. Could this be a factor ?

qimingj commented 7 years ago

Could be. Do you have an environment without virtualenv?