Error when creating virtual environment in mounted directory

What is the problem you are having with rclone?

Hi,
I was trying to create a Python virtual environment in my OneDrive mounted directory but I get the following error :

Error: [Errno 5] Input/output error: 'lib' -> '/home/USER/OneDrive/PATH/TO/PROJECT/env/lib64'

I use a systemd service to mount the directory :

[Service]
Type=simple
User=USER
ExecStart=rclone --file-perms=0777 --vfs-cache-mode full mount onedrive: /home/USER/OneDrive --config="/home/USER/.config/rclone/rclone.conf"

I have tried searching on forums if someone had a similar problem and all I found was someone responding to a post saying he had this error on a "FUSE mounted NTFS partition" Creating environment fails with OSError: [Errno 5] Input/output error · Issue #1584 · pypa/virtualenv · GitHub .
For now, I simply edit my project in local and copy it on the onedrive once I'm done but it's not very practical.

Thank you very much in advance for your help !

Run the command 'rclone version' and share the full output of the command.

rclone v1.68.2
- os/version: arch (64 bit)
- os/kernel: 6.12.1-arch1-1 (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.23.3
- go/linking: dynamic
- go/tags: none

Which cloud storage system are you using? (eg Google Drive)

OneDrive

The command you were trying to run (eg rclone copy /tmp remote:tmp)

python -m venv env

Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.

[onedrive]
type = onedrive
token = XXX
drive_id = XXX
drive_type = business
### Double check the config for sensitive info before posting publicly

that is an old version, can rclone selfupdate and test again


fwiw, for testing, run rclone in the terminal, not systemd.
and look at the rclone debug log for issues and errors.

This requires working symlinks, not enabled by default. You can try to enable it:

It has some limitations so no guarantee that it will work.

I tried adding --links but it didn't work. I had trouble mounting the directory, even when I started using the original command which is weird.

I also tried updating rclone as asdffdsa stated but it didn't solve the problem

try --vfs-links

but given that linked-dir/file.txt scenarios do not work I would not count on python virtual environment working.

This error clearly points into linked dirs. And then most likely there are some files there which should be accessed using lib link.

Like already suggested run rclone mount from command line with -vv flag (debug) to see more details.

I just got a simpler solution. I use anaconda for my virtual environment so they are on my local disk and not in the mounted folder. Thank you very much anyway for your help !

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.