-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
npm run virtualenv doesn't activate virtual environment #1875
Comments
(I'm not sure if this is because I'm using virtualenvburrito -- it would be good if someone could test on their system (which doesn't have virtualenv-burrito installed)): |
the instructions never worked for me either and I don't virtualenv-burrito but I do have virtualenvwrapper |
@miketaylr did you see that line
I have a macbook air around, that I need to reformat/clean install for Austin soon. It will be too late for the Berlin sprint but it might be worth to test the install instructions from zero. |
I did some more looking into this. Basically, I can't get the server to run using just npm scripts. I don't think we should use it to run Python stuff that requires an active virtualenv.
Somehow this is all related to the fact that npm runs these in a new process, and I guess the environment variables that the Easiest thing to do here would be write some docs explaining that you need to start and activate a virtual enviroment before running any of the npm scripts, then removing all the virtualenv stuff from them. I'm not sure how to solve it otherwise. As-is it just doesn't work. |
@miketaylr Does #2476 fix your issue? |
Yep! In a fresh clone, if i run |
Noticed this when I was running thru the Simple Setup instructions:
https://github.com/webcompat/webcompat.com/blob/master/docs/dev-env-setup.md#simple-setup-mac-os-and-linux
If you run those, everything gets installed as I would expect, and I can see that a virtual env is created, but it never gets activated.
"virtualenv": "pip install virtualenv && virtualenv env && source env/bin/activate || . env/bin/activate && npm run pip",
I'm not really sure how to fix this (or how npm commands should expect to behave when they're chained).
Notice how my virtualenv
env
isn't activated after that command.@zoepage this might be an issue for the community sprint, the workaround is to manually activate the virtualenv:
source env/bin/activate
. Otherwise you end up with the following error and it's confusing:The text was updated successfully, but these errors were encountered: