Cross-platform virtual environment with Environment Manager? #22716
-
Hi, I have both a Windows and a macOS workstation that I switch between, and I program my Python scripts to be cross-compatible. Up till now I have been using Sublime Text for writing scripts, and syncing the changes with Dropbox. I want to move over to VS Code and virtual environments, but I still want my scripts to be on Dropbox. I have been using the VS Code extension named "Python Environment Manager" to create virtual environments in macOS and Windows, which works great if I'm on just one platform! But I need to find a way to work simultaneously on Mac and Windows. If I create a virtual environment in one OS, the extension want to overwrite or delete the virtual environment when I jump over to the other OS. Is there a way to have the virtual environments have different names in different OS'es using the "Python Environment Manager" extension? Or is there another way to make a project folder cross-platform compatible with this extension? Thanks for any help! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Is that a Sublime Text extension?
You can create virtual environments anywhere and then select them manually. So you could do that if you wanted two separate environments in Dropbox. Other people who have this workflow keep the environment outside of Dropbox and then either manually select it or use something like Hatch to create the environment on each machine. |
Beta Was this translation helpful? Give feedback.
If you're talking about https://marketplace.visualstudio.com/items?itemName=donjayamanne.python-environment-manager then that's not us and you will have ask that extension it they provide some mechanism for creating environments separate from our "Create Environment" command. Otherwise the guidance I provided above still holds and you will need to use some other tool outside of the extension to keep your environments separate per OS (including creating them yourself and just giving them unique names).