I don't know how to open a local file in Jupyter.Some answers say that I should change this workflow.
so, I had tried this in Jupyter on Mac:
In:
%pwd
Out:
'/home/jovyan'
In:
%cd /Users/apple/Desktop
Out:
[Errno 2] No such file or directory: '/Users/apple/Desktop'
/home/jovyan
What's wrong?
And then, I can not find '/home/jovyan' on my Mac.
I figured I'd answer this in case anyone has been googling for the answer.
The folder jovyan
does not exist on your machine. /home/jovyan
is a workspace that exists within the docker image and is baked into it.
What you need to do is re-map the workspace so that you don't have to create a fake jovyan
directory on your machine (because the docker image will be expect it if you don't specify something else).
This is how you re-map workspaces:
(https://medium.com/fundbox-engineering/overview-d3759e83969c)
docker run -p 8888:8888 -v /desired/host/folder:/home/jovyan/workspace jupyter/all-spark-notebook
In the command above, notice the two directories separated by a colon :
| /desired/host/folder | refers to the folder on host |
| /home/jovyan/workspace | workspace in the docker image |
Performing this re-map allows you to work with the image without having to worry about what it expects as a working directory.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With