Virtualenv migration notes

项月亮
1 min readAug 6, 2020

--

When you changed the directory of virtualenv(venv), python interpreter will use default interpreter of your system rather than virtualenv’s interpreter, so after changing the directory, you should also modify some configuration files.

venv/bin/activate

change a line like this

VIRTUAL_ENV='[CURRENT PATH OF VENV]'

/venv/bin/pip3, venv/bin/pip

The original path of python interpreter is specified in the first line, it’s invalid after your migrating virtualenv, so change it to

#![CURRENT PATH OF PYTHON]

Finally, reload the virtualenv

source activate

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

No responses yet

Write a response