Skip to content

To follow up: virtual environments for different python versions #15

@tomneep

Description

@tomneep

In this section we have a reason for using virtual environments

You have an older project that only works under Python 2. You do not have the time to migrate the project to Python 3 or it may not even be possible as some of the third party dependencies are not available under Python 3. You have to start another project under Python 3. The best way to do this on a single machine is to set up two separate Python virtual environments.

I thought that each python version managed its own dependancies anyway so I'm not sure that this is entirely accurate e.g. if I were to do python2 -m pip install xyz and python3 -m pip install xyz they'd end up in different places anyway? So I'm not sure the point they're trying to make here (even if using an venv for each wouldn't be the worst thing)?

There is also this callout

A SPECIFIC PYTHON OR PACKAGE VERSION IS ONLY EVER INSTALLED ONCE

Note that you will not have a separate Python or package installations for each of your projects - they will only ever be installed once on your system but will be referenced from different virtual environments.

I'm not sure that is true either? If I make two virtual environments and install matplotlib into each of them then it looks like each one of them has a copy of the files?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions