I am having problems accessing my jupyter lab code files from different computers (home and office), Any help.
EK
I am having problems accessing my jupyter lab code files from different computers (home and office), Any help.
EK
jupyterlab is an editor for local files on your computer. So wherever it runs, it has access to the files on the same machine, like other text editors. If you want to edit the same files on multiple computers, you need to sync files yourself (e.g. via a sync tool, git, or a cloud storage service), or mount one from another.
Thank you for the input. My files are synced on G-drive. But when i am using my work computer, the only accessible and visible files are those created on my work computer. The same on my home computer. I read somewhere that i may need a VPN or change variable environment.
Thanks again
EK
Can you make a text file at home with a .txt
and edit it with a coding text editor, that isnât Jupyter, at work?
If so, then how? Youâd need to share some of that information with us.
If you cannot, then it isnât a Jupyter issue and you need to sort out things separate from Jupyter. At work I can see the same files in my Dropbox as at home and when I edit them at work using a coding text editor, Sublime Text in my case, I can later see the changes and make additional ones when I get home and open it with Sublime Text installed on my home machine. This is how productive syncing should work. Is this the case for you or not? And if not, what is different?
This is more or less what minrk was saying with, âjupyterlab is an editor for local files on your computer. So wherever it runs, it has access to the files on the same machine, like other text editors.â In your reply you offered no details beyond that you are using G-drive. We donât have access to your machine. (Please read âGetting good answers to your questionsâ as it may help you understand that you need to help us help you.)
For example, if you open Jupyter at work and run pwd
(for âprint working directoryâ) inside a notebook, where does it say it has access to? If you then copy and move your file to there can you access it with your Jupyter? If that works then what can you do with running %cd <directory_to_make_working_directory>
inside your notebook to change directories in your file hierarchy. Sometimes due to permissions settings you cannot see certain levels of your hierarchy and so even if %cd
allows you to change to some directories it may not allow to change to all of them. However, we donât know about your system, or what you have done to date to try and troubleshoot this, to be able to tell if that is the case or not.
Thank you so much for a detailed reply. After exploring the issue a little more, i realized that when i changed the working directory on both computers to a directory in G drive, the change of directory did not work.and thus files are stored/saved on local directories.
I tried several suggestions to change the starting directory from local machine to G drive w/o success. Does this make sense?
Thanks again
EKE
fomightez Distinguished Contributor
March 9
ekesawi:
But when i am using my work computer, the only accessible and visible files are those created on my work computer.
Can you make a text file at home with a .txt and edit it with a coding text editor, that isnât Jupyter, at work?
If so, then how? Youâd need to share some of that information with us.
If you cannot, then it isnât a Jupyter issue and you need to sort out things separate from Jupyter. At work I can see the same files in my Dropbox as at home and when I edit them at work using a coding text editor, Sublime Text in my case, I can later see the changes and make additional ones when I get home and open it with Sublime Text installed on my home machine. This is how productive syncing should work. Is this the case for you or not? And if not, what is different?
This is more or less what minrk was saying with, âjupyterlab is an editor for local files on your computer. So wherever it runs, it has access to the files on the same machine, like other text editors.â In your reply you offered no details beyond that you are using G-drive. We donât have access to your machine. (Please read âGetting good answers to your questionsâ as it may help you understand that you need to help us help you.)
For example, if you open Jupyter at work and run pwd (for âprint working directoryâ) inside a notebook, where does it say it has access to? If you then copy and move your file to there can you access it with your Jupyter? If that works then what can you do with running %cd <directory_to_make_working_directory> inside your notebook to change directories in your file hierarch. Sometimes due to permissions settings you cannot see certain levels of your hierarchy and so even if %cd allows you to change to some directories it may not allow to change to all of them. However, we donât know about your system, or what you have done to date to try and troubleshoot this, to be able to tell if that is the case or not.
I donât use G drive in that manner and so I cannot say.
Hopefully someone else can comment.
Thanks again. G-drive is the only available cloud storage at my work.
fomightez Distinguished Contributor
March 14
ekesawi:
I tried several suggestions to change the starting directory from local machine to G drive w/o success. Does this make sense?
I donât use G drive in that manner and so I cannot say.
Hopefully someone else can comment.
While it isnât ideal, at least now you know you can move files to where you can use them and put the new versions back later.
Thanks again. I looked into other options and found two. (1) Start Juypyter Lab (JL) by using this command (jupyter lab --notebook-dir âC:/Users/ejames/My Drive/EOU/JamesFolder/Scriptsâ ) It works, but I have to use it every time I start JL in both my office and home. I found a post that recommends creating a batch file with this command , save it in the folder I want JL to start at, and click that file link to start JL. Unfortunately . once I click the batch file, it starts then suddenly is closed. The error message is long and hard to understand. (2) I tried mklink which should link my file in Gdrive and local folder, but it did not work for me either.
Here is the error message I was getting from option 1
C:\Users\ejames\My Drive\EOU\JamesFolder\Scripts>jupyter lab --notebook-dir âC:/Users/ejames/My Drive/EOU/JamesFolder/Scriptsâ
Traceback (most recent call last):
File âc:\program files\python38\lib\runpy.pyâ, line 193, in run_module_as_main
return run_code(code, main_globals, None,
File âc:\program files\python38\lib\runpy.pyâ, line 86, in run_code
exec(code, run_globals)
File "C:\Program Files\Python38\Scripts\jupyter-lab.EXE_main.py", line 4, in
File âC:\Users\ejames\AppData\Roaming\Python\Python38\site-packages\jupyterlab\labapp.pyâ, line 45, in
from .extensions import MANAGERS as EXT_MANAGERS
File "C:\Users\ejames\AppData\Roaming\Python\Python38\site-packages\jupyterlab\extensions_init.py", line 12, in
from .pypi import PyPIExtensionManager
File âC:\Users\ejames\AppData\Roaming\Python\Python38\site-packages\jupyterlab\extensions\pypi.pyâ, line 26, in
import httpx
File "C:\Users\ejames\AppData\Roaming\Python\Python38\site-packages\httpx_init.py", line 2, in
from ._api import delete, get, head, options, patch, post, put, request, stream
File âC:\Users\ejames\AppData\Roaming\Python\Python38\site-packages\httpx_api.pyâ, line 6, in
from ._client import Client
File âC:\Users\ejames\AppData\Roaming\Python\Python38\site-packages\httpx_client.pyâ, line 12, in
from ._auth import Auth, BasicAuth, FunctionAuth
File âC:\Users\ejames\AppData\Roaming\Python\Python38\site-packages\httpx_auth.pyâ, line 11, in
from ._exceptions import ProtocolError
File âC:\Users\ejames\AppData\Roaming\Python\Python38\site-packages\httpx_exceptions.pyâ, line 91, in
class TransportError(RequestError):
KeyboardInterrupt
Terminate batch job (Y/N)?
fomightez Distinguished Contributor
March 15
ekesawi:
G-drive is the only available cloud storage at my work.
While it isnât ideal, at least now you know you can move files to where you can use them and put the new versions back later.
The answer to my previous question is as follow. After you save the change of the starting folder command and save it in a batch file such as filename.bat, you just need to create a shortcut to the filename.bat file. Once you do that, you just click on the shortcut and Jupyter Lab starts from the intended folder/directory.
EK
Thanks again. I looked into other options and found two. (1) Start Juypyter Lab (JL) by using this command (jupyter lab --notebook-dir âC:/Users/ejames/My Drive/EOU/JamesFolder/Scriptsâ ) It works, but I have to use it every time I start JL in both my office and home. I found a post that recommends creating a batch file with this command , save it in the folder I want JL to start at, and click that file link to start JL. Unfortunately . once I click the batch file, it starts then suddenly is closed. The error message is long and hard to understand. (2) I tried mklink which should link my file in Gdrive and local folder, but it did not work for me either.
Here is the error message I was getting from option 1
C:\Users\ejames\My Drive\EOU\JamesFolder\Scripts>jupyter lab --notebook-dir âC:/Users/ejames/My Drive/EOU/JamesFolder/Scriptsâ
Traceback (most recent call last):
File âc:\program files\python38\lib\runpy.pyâ, line 193, in run_module_as_main
return run_code(code, main_globals, None,
File âc:\program files\python38\lib\runpy.pyâ, line 86, in run_code
exec(code, run_globals)
File "C:\Program Files\Python38\Scripts\jupyter-lab.EXE_main.py", line 4, in
File âC:\Users\ejames\AppData\Roaming\Python\Python38\site-packages\jupyterlab\labapp.pyâ, line 45, in
from .extensions import MANAGERS as EXT_MANAGERS
File "C:\Users\ejames\AppData\Roaming\Python\Python38\site-packages\jupyterlab\extensions_init.py", line 12, in
from .pypi import PyPIExtensionManager
File âC:\Users\ejames\AppData\Roaming\Python\Python38\site-packages\jupyterlab\extensions\pypi.pyâ, line 26, in
import httpx
File "C:\Users\ejames\AppData\Roaming\Python\Python38\site-packages\httpx_init.py", line 2, in
from ._api import delete, get, head, options, patch, post, put, request, stream
File âC:\Users\ejames\AppData\Roaming\Python\Python38\site-packages\httpx_api.pyâ, line 6, in
from ._client import Client
File âC:\Users\ejames\AppData\Roaming\Python\Python38\site-packages\httpx_client.pyâ, line 12, in
from ._auth import Auth, BasicAuth, FunctionAuth
File âC:\Users\ejames\AppData\Roaming\Python\Python38\site-packages\httpx_auth.pyâ, line 11, in
from ._exceptions import ProtocolError
File âC:\Users\ejames\AppData\Roaming\Python\Python38\site-packages\httpx_exceptions.pyâ, line 91, in
class TransportError(RequestError):
KeyboardInterrupt
Terminate batch job (Y/N)?
fomightez Distinguished Contributor
March 15
ekesawi:
G-drive is the only available cloud storage at my work.
While it isnât ideal, at least now you know you can move files to where you can use them and put the new versions back later.
Thanks for updating this when you found the solution. Hopefully, it will help others.