Same question as this. But the answer not working for me.
In jupyterlab, I want to open a file from below location
/home/user1/.conda/envs/default/lib/python3.9/site-packages/mypackage/file1.py
!which jupyter
shows this location
/home/user1/.conda/envs/default/bin/jupyter
and os.getcwd()
gives below location
/home/user1/myprojects
So I tried to use the relative path like this
/../lib/python3.9/site-packages/mypackage/file1.py
../lib/python3.9/site-packages/mypackage/file1.py
~/../lib/python3.9/site-packages/mypackage/file1.py
~/../../lib/python3.9/site-packages/mypackage/file1.py
.conda/envs/default/lib/python3.9/site-packages/mypackage/file1.py
../.conda/envs/default/lib/python3.9/site-packages/mypackage/file1.py
/../.conda/envs/default/lib/python3.9/site-packages/mypackage/file1.py
etc.. but none seems working. How to open the file?