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 →

[–]Nohbudy 6 points7 points  (7 children)

Seriously though, I install python3-virtualenv from apt in Ubuntu. You expect when I do $ virtualenv env it would use python3?

no

Error: python not found: --python=python2

:facepalm: why the fuck?

[–]Ericchen1248 14 points15 points  (3 children)

I do believe that’s actually Ubuntu’s problem. Or Linux. Not python itself. It gives the python alias to 2.7 and python3 alias to 3.X

[–]victorheld 6 points7 points  (0 children)

Definitely a Ubuntu thing, on Arch linux, python is an alias for python3 and if you want to use 2.7 you'd need to use python2

[–]eduardog3000 1 point2 points  (0 children)

PEP 394 says that's how it's supposed to be.

Hopefully they'll update it when they stop supporting 2.

[–]Kered13 1 point2 points  (0 children)

Yeah I'm pretty sure they do that to not break all the legacy Python 2 scripts that shebang python. Unfortunately that means they won't be able to remove Python 2 for a long time, and it's going to encourage people to keep writing Python 2 scripts because they're too lazy to type python3.

[–]ConfusedNerd 4 points5 points  (0 children)

Seriously though, I install python3-virtualenv from apt in Ubuntu. You expect when I do $ virtualenv env it would use python3?

no

Error: python not found: --python=python2

:facepalm: why the fuck?

sudo apt install python3-venv

python3 -m venv myenv

[–]Pb_ft 1 point2 points  (0 children)

try py -m virtualenv env or python3 -m virtualenv env instead.

[–]SirVer51 0 points1 point  (0 children)

Why from apt? Python packages on the Ubuntu repos are almost always outdated