How to work with venv for python files

Let me first describe briefly why do I need to create a visible folder with “venv“ for python script 0files.

I am using RPi CM4 IO Board. I have some important python files already in the RPi OS (Desktop 64 bit version). The location of the python script files is /home/cm4-guest/my_programs/.

The RPi CM4 IO Board can be connected to the Windows PC, provided a jumper that disable RPi boot has to be mounted physically. By mounting the jumper, the RPi CM4 IO Board will appear as a flash drive like USB drive in My Computer.

The problem is that I don’t see my python script files when I navigate the files inside the USB drive (RPi CM4 appear as USB drive).

I have been told that the python files are invisible and that is why not shown in the files in the USB drive. I need to make them visible and this can be done using “venv“.

Please let me know the steps, which commands do I need to run in the terminal to have a folder created containing python scrip files along with all the libraries needed.

Thanks for understanding.

I would try to figure out, what application or process it is, that creates that virtual USB drive when it’s connected to a Windows machine, and most importantly, which directories or file system mounts it uses, access these from RPi OS, then copy your Python files there. I don’t have your specific hardware on hand, but I would guess it’s to do with a file system that appears in My Computer, not being the same partition or mount that RPi OS uses.

On the non-RPi boards I use, there is also some special software, that creates a virtual mount, in File Explorer (with “how-to” instructions etc.). I just ignore it (or even ‘eject’ it), boot the main operating system image, and transfer files over SCP.

Whatever it is, I don’t think venvs will solve the problem. venvs’re for a different purpose.

You’d be better off asking on a Raspberry Pi forum. Those guys will do this day in, day out.

Yes, I also think that it has to do with file system.

I need to know how can I include the python script files from RPi OS such that they become visible and can be saved in Windows PC.

Exactly the same as any other files. Go ask on the Raspberry Pi forums.