C
C
centrin02016-02-16 11:12:55
Python
centrin0, 2016-02-16 11:12:55

How to create a virtual environment for python?

I create a virtual environment
virtualenv -p /usr/bin/python3 venv
source venv/bin/active
install the necessary packages via pip
I copy this folder to another server. I activate.
source venv/bin/active
command which python shows that the system python is used.
Accordingly, he does not know about any packages.
What have I done wrong? How to create and transfer the environment correctly?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
KIN1991, 2016-02-16
@KIN1991

You write:

I create a virtual environment
virtualenv -p /usr/bin/python3 venv
source venv/bin/active

And then write:
Do you understand that you originally indicated the path to your native python?

A
Andrey Shubin, 2016-02-16
@idegree

Read here .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question