Showing posts with label jupyter. Show all posts
Showing posts with label jupyter. Show all posts

Saturday, July 11, 2020

python and ipython has different path, modules not found



(base) CS313BQin:~ hqin$ python
Python 3.7.4 (default, Aug 13 2019, 15:17:50) 
[Clang 4.0.1 (tags/RELEASE_401/final)] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path
['', '/opt/anaconda3/lib/python37.zip', '/opt/anaconda3/lib/python3.7', '/opt/anaconda3/lib/python3.7/lib-dynload', '/opt/anaconda3/lib/python3.7/site-packages', '/opt/anaconda3/lib/python3.7/site-packages/aeosa']









import sys

sys.path.append("/opt/anaconda3/lib/python3.7/site-packages")

This solved the seaborn module loading problem in jupyter-notebook for big macbookpro

However, there is still a loading problem for libriso

Reference:
https://stackoverflow.com/questions/15514593/importerror-no-module-named-when-trying-to-run-python-script/15622021#15622021


Tuesday, March 24, 2020

MacOS Jupyternote book pdf feature bug fix


On my new Macbook pro, I cannot generate PDF from JupyterNotebook.

This is old OS.

I added the following line to .bash_profile.

#Texlive 20200323
export PATH=$PATH:/Library/TeX/texbin

I then
source .bash_profile

I then restart JupyterNotebook, and pdf file can be generated.