Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • 1
    Note that pipenv and venv aren't alternatives to each other, just like Django and Python aren't alternatives to each other. With venv alone, you can't install packages, for instance, whereas pipenv does offer a mechanism to install packages. Commented Apr 22, 2022 at 9:22
  • 3
    I did not get you when you said with venv you can't install packages. I mean I can install everything available through pip in a virtual environment created using venv e.g. I have 4 different virtual environments in 4 different directories with different python and pandas versions but same jupyter lab version. All through venv Commented May 6, 2022 at 16:48
  • @Flimm python -m venv foo; source foo/bin/activate; pip install numpy. Both venv and pip are available out of the box. The comment sounds a little misleading. Commented Jan 29, 2023 at 17:50
  • 1
    @MagnusLindOxlund You cannot replace venv with pip in your example or vice-versa. You can't dovenv install numpy, and you can't do pip foo ; source foo/bin/activate . So I stand by my comment that they are not alternatives to each other. Also, venv and pip are not available out of the box, say on an Ubuntu installation (even though python3 is available out of the box). On Ubuntu, you would have to install python3-venv (using APT) to get venv, and separately you would have to install python3-pip to get pip. Commented Jan 30, 2023 at 21:47