SpaceCadet2810
SpaceCadet2810

Reputation: 1

Share python code without access to virtual environments

I have some code that needs to run on a separate computer. Now, normally, I would just create a virtual environment specific to that code and people could just run/access that code from that computer. However, due to various reasons, I don't have access to virtual environments. To be more specific, I can't use conda.

So to get to the point - is there a way for me to download the necessary packages and ship the tool? Are there alternatives?

Upvotes: 0

Views: 39

Answers (1)

You don't need conda to use a virtual environment, you only need Python and pip.

All your dependencies should be in the folder .venv of your project that you can move with your project to a new computer.

To create one use the command:

python -m venv /path/to/new/virtual/environment

The docs are here.

Upvotes: 1

Related Questions