[Python] Can an existing virtualenv be upgraded gracefully? [duplicate]

Discussão em 'Python' iniciado por Stack, Julho 15, 2025.

  1. Stack

    Stack Membro Participativo

    I have a virtualenv created for Python 2.5 and want to "upgrade" it to Python 2.6.

    Here is how it was originally set up:

    virtualenv --no-site-packages -p python2.5 myenv


    I now run virtualenv in the same directory to upgrade:

    virtualenv --no-site-packages -p python2.6 myenv
    ...
    Not overwriting existing python script myenv/bin/python (you must use myenv/bin/python2.6)
    ...
    Overwriting myenv/bin/activate with new content


    The default Python interpreter is still 2.5, even though I can also specify 2.6. Is there a way to remove 2.5 entirely and have 'bin/python' point to 2.6 instead?

    Continue reading...

Compartilhe esta Página