Loc
Loc

Reputation: 17

Sharing Virtual Environments With Other Developers

I have made a virtual environment using python3.

virtualenv -p python3 py36

In a folder named environments within a project folder.

When activated, and I run which python3 the output is:
(py36) ur@comp:~/Desktop/project$ which python3
/home/ur/Desktop/project/environments/py36/bin/python3
My question is, how can another developer use the same virtual environment if they were to pull from a cloud repository?

What we found is that when they active the environment, it would use the path above; which isn't correct for his machine, thus he is not able to use the env.

We temporarily fixed the problem by changing the path above, to the their machine's path, wherever it appeared in the files within the env. However, I will have the same problem if I pull the project after he modifies.

We would like to know if there is a way to share the virtual env, in a way that we don't have to change each path.

Thank you for your time.

Upvotes: 0

Views: 457

Answers (1)

phd
phd

Reputation: 94417

Virtual environments aren't relocatable. Developers has to create their own environments.

Upvotes: 1

Related Questions