'Read Files across File Systems (PyCharm Windows/WSL)

I'm using PyCharm with a WSL interpreter because I need to use a library that doesn't work well with Windows (gtsam, if you're wondering).

I have a pandas Dataframe stored as a pickle file on my "regular" workspace, e.g. "C:\some\windows\path\to\file.pkl", and I want to read it in my WSL-PyCharm environment.

Obviously I can copy the file to my WSL machine and read it from its new path. However I'm hoping for a "cleaner" solution that doesn't involve making multiple copies of huge pkl files.

Any ideas?



Solution 1:[1]

By default, WSL should mount your C: drive at /mnt/c, so you should be able to access your file as /mnt/c/some/windows/path/to/file.pkl.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Althorion