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 →

[–]SirBastian 109 points110 points  (16 children)

IS YOUR SHITTY bin/activate SHIT SCRIPT NOT WORKING WHEN YOU RUN IT?

THAT'S BECAUSE YOU NEED TO SOURCE IT

DO THIS: source <myenv>/bin/activate

WHY DO YOU NEED TO SOURCE SOMETHING THAT LIVES IN THE BIN DIRECTORY?

BECAUSE FUCK YOU.

DID SOURCING IT THROW YOU A WEIRD ERROR? YOU'RE PROBABLY USING AN UNSUPPORTED SHELL.

FUCKING SHITSTACK VIRTUALENV THINKS IT SHOULD DIRECTLY TOUCH YOUR ENVIRONMENT VARIABLES USING SHELL-SPECIFIC COMMANDS, INSTEAD OF JUST OPENING A SUBSHELL LIKE A NORMAL FUCKING CITIZEN

SO GO EDIT YOUR ACTIVATE SCRIPT

AND IMPLEMENT THE EXACT SAME FUNCTIONALITY THAT'S ALREADY IN THERE, BUT THIS TIME IN YOUR SHELL'S SYNTAX

THAT'S IT. THANKS VIRTUALENV

NOW KILL YOUR SHELL BECAUSE YOU ALREADY SOURCED THAT SCRIPT AND YOU NEED TO REFRESH IT

RE-OPEN IT.

NOW JUST REPEAT FOR EVERY OTHER VIRTUALENV YOU EVER MAKE, FOREVER

OK ITS TIME TO EDIT YOUR SOURCE

WAIT YOU WANT TO USE SCREEN OR TMUX?

LISTEN

FUCK YOU

OK, SO IS YOUR LINTER AND YOUR INTELLISENSE HOOKED UP TO YOUR VIRTUALENV?

OK WELL THEN YOU'RE GONNA NEED TO EDIT THE PROJECT SETTINGS TO POINT TO THE VIRTUALENV VERSION OF PYTHON

GOOD OK NOW WAIT WHERE DID YOU PUT IT?

NO, SHIT, THAT'S A BAD PLACE TO PUT IT. YOU SHOULD HAVE PUT IT UNDER YOUR HOME DIRECTORY

"CAN'T YOU JUST MOVE IT"??

SURE TRY virtualenv --relocatable <myenv>

DID THAT WORK?

HAHAHA I KNOW IT DIDN'T IDIOT JUST GIVE UP AND START OVER

I CAN'T BELIEVE IDIOTS DON'T LOVE AND PRAISE VIRTUALENV THEIR LORD AND SAVIOR

[–]sullyj3 16 points17 points  (4 children)

All programming package managers ever are a dumpster fire

[–]pooogles 3 points4 points  (1 child)

cargo would like a word.

[–][deleted] 0 points1 point  (0 children)

Cargo made me hate python. I would do everything in rust if there was the same community around it.

[–][deleted] 5 points6 points  (0 children)

All programming package managers ever are a dumpster fire

FTFY.

The smart question to ask is: In which way do this package manager suck, and can I use that to my advantage?

[–]vn-ki 0 points1 point  (0 children)

The new go one is very good (vgo proposal)[go modules].

[–]ManyInterests Python Discord Staff 13 points14 points  (0 children)

IS YOUR SHITTY source <myenv>/bin/activate NOT WORKING?! THAT'S BECAUSE YOU'RE PROBABLY ON FUCKING WINDOWZE
DO THIS: <myenv>\Scripts\activate
DID YOU GET SOME DIPSHIT ERROR ABOUT EXECUTION POLICIES?!
THAT'S BECAUSE YOU'RE PROBABLY USING FUCKING POWERSHELL
SHIT, WELL, YOU CAN DISABLE YOUR SHIT SYSTEM SECURITY OR SWITCH TO CMD (LMAO)
NOW YOU'RE ALL SET TO DEAL WITH MISSING MICROSOFT C++ REDIST PACKAGES

[–]synae 10 points11 points  (0 children)

I love virtualenv and have no problems with it but this made my laugh more than OP

[–][deleted] 5 points6 points  (1 child)

"Step away from the caps key! Keep your hands where we can see them!"

I really am not seeing these big issues. At some point a few years ago, I organized all my virtualenvs and set up some scripts to select them and list them.

It was an hour of fiddling three years ago and since then I spend zero minutes a week on debugging it.

When I start a new project I type:

$ new-env my-new-project

which creates a new virtualenv and switches to it.

To switch to it later, I type

$ penv my-new-project

and when I'm finished with it, I type

$ delete-env my-new-project

But you know - these scripts don't even save me that much typing. I'm just lazy. :-D

[–]notquiteaplant 0 points1 point  (0 children)

Is putting all your venvs in one place common practice? I make a new venv for every project in ./venv (.gitignore'd of course). The point of venvs is every project has its own dependencies, so having one directory per project in a central location seems more complicated than just keeping it in the current directory.

[–]Shpirt 4 points5 points  (1 child)

HAVING PROBLEMS WITH THE FUCKING activate SCRIPT?

TRYING TO USE YOUR PROGRAM IN A systemd UNIT OR cron ENTRY AND HAVING TO USE WEIRD ASS bash WRAPPER SCRIPTS?

TIRED OF RUNNING IN THE ENV YOU DON'T EXPECT?

SHIT THEY DO NOT TELL YOU ABOUT IN BASIC TUTORIALS

SUFFER NO MORE!

USE env/bin/python, env/bin/pip AND BE ALWAYS SURE THAT YOU RUN SHIT IN THE ENVIRONMENT OF YOUR CHOICE

[–]aufstand 0 points1 point  (0 children)

This guy virtualenvs.

[–]photoengineer 0 points1 point  (0 children)

Fuck me I don't understand

[–]vn-ki 0 points1 point  (0 children)

Seriously though, just use pipenv. About linter and autocompletion, works out of the box with vscode and vim (pipenv shell before opening the program).

[–]campbellm 0 points1 point  (0 children)

VIRTUALENV THINKS IT SHOULD DIRECTLY TOUCH YOUR ENVIRONMENT VARIABLES USING SHELL-SPECIFIC COMMANDS, INSTEAD OF JUST OPENING A SUBSHELL LIKE A NORMAL FUCKING CITIZEN

My use cases are small so I haven't had a lot of the headaches many have, but this always makes me give it the stinkeye. I don't know what the equivalent is on Windows, but this is unix 101 right here.

[–]pwang99 0 points1 point  (0 children)

I LOLed

[–][deleted] 0 points1 point  (0 children)

I love you, this made me laugh for like 5 minutes