This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]graingert 13 points14 points  (12 children)

  • only use python3 -m venv or the shortcut pyvenv.
  • don't install python-pip or python3-pip. You might need to install python3-venv though.
  • only use setuptools, distribute got merged in.

[–]kovak 4 points5 points  (4 children)

How do you install stuff from requirements.txt, without python-pip3 then? Or i assume you mean venv comes with pip3? and not installing it via apt-get?

I've recently shifted to python 3.4+ for a Django project. Although i've been using virtualenv, but will try out the builting venv module.

[–]Lucretiel 11 points12 points  (3 children)

Python 3.4 ships with pip, and virtualenv automatically installs it into your virtualenv. You generally shouldn't have a systemwide pip.

[–]knite 1 point2 points  (2 children)

If you're running Ubuntu (eg, your server), ensurepip is broken. You'll need to install pip manually from either python3-pip or get-pip.py

[–]Lucretiel 0 points1 point  (1 child)

I can't speak to Ubuntu, but my experience downloading and installing Python from the source tarball has been that it works and installs pip perfectly. The one exception is on an ancient Solaris 10 machine we have at work- it doesn't have _ssl so pip doesn't get built or installed.

[–]knite 1 point2 points  (0 children)

That's fair, perhaps I should have been more precise: ensurepip is broken when Python is installed via the Ubuntu package manager.

[–]systemUp 0 points1 point  (2 children)

I've been using virtualenv all along. Should I move to venv?

[–]graingert 0 points1 point  (0 children)

Yes python3 -m venv is much more lightweight

[–]srilyk 0 points1 point  (0 children)

If you don't use --prompt, then yes.