No module named 'notebook'
zezhong-zhang opened this issue · 4 comments
Hello,
I have installed Jupyter with conda and now trying to install nbopen on my mac. I can open ipython notebook using the command line. However, there is trouble to integrate with the file manager using
./osx-install.sh
Following are the errors:
generating .icns file for mac app...
NOTE: this will produce one warning message, because there is no
1024x1024 icon that could be used to for the 'retina' 512x512 icon
Traceback (most recent call last):
File "py2app_setup.py", line 5, in
import nbopen
File "/Users/nbopen/nbopen/init.py", line 5, in
from .nbopen import main
File "/Users/nbopen/nbopen/nbopen.py", line 7, in
from notebook import notebookapp
ImportError: No module named 'notebook'
I guess that the notebook is installed in a different Python to the one you're trying to install nbopen. Running which python3
will show you the Python it will try to install into. You can change that by editing osx-install.sh
before you run it.
Indeed, it is different python. I have passed the installation with the miniconda python3. However, there is an error message when I run the nbopen application.
A Python runtime not could be located. You may need to install a framework build of Python, or edit the PyRuntimeLocations array in this application's Info.plist file.
Thanks a lot for your help!
Sorry, that's Mac-specific stuff that I can't help with. @artwr, who added the OSX integration, might have an idea.
Now I have resolved the problem by using mac's automator. The code is attached below for anyone who just wants to access ipython notebook via double click. The code is modified from the solution of opening code in vim from finder.
`on run {input, parameters}
set filename to POSIX path of input
set cmd to "clear;cd dirname " & filename & "
;jupyter notebook " & filename
tell application "iTerm"
tell the current window
create tab with default profile
tell the current session
write text cmd
end tell
end tell
end tell
end run`