Forums

Virtualenv not activated after log out in the platform

Hi, I created yesterday a django webapp and it was working fine. Today I entered again in the platform, I open the bash console and the virtualenv seems not activated as I can not see the (myvirtualenv) at the left of the command line. So I activated but the python version is an old one and nothing is working. What is happening?

Sometimes consoles can get reset due to system maintenance, and if that happens then you'll need to reactivate your virtualenv.

The thing with the old Python version sounds very strange, though. Which Python version were you expecting, and which are you getting? How did you activate it?

So I created a virtualenv with Python 3.4. When the console resets (already two times in 5 days), I reactivate my virtualenv but the Python version changes to 2.7. I can not understand how that is possible. What I did is to create a new virtualenv with 3.4 version but Ill not do it everyday of course

I would double check that

  1. your virtualenv actually is python3.4
  2. you are using the right virtualenv
  3. the code you are running is using the virtualenv python and not the system python

thank you very much for your answer. Now I found that it was generated another virtualenv that I was used instead of the right one with the 3.4 version. So I deleted and is working fine. It seems I have to activated every day now, but thats okey

do you mean you have to activate it from the bash console? (or is it say a file editor save & run, or webapp code, or a scheduled task?)

I mean from bash console. So does it normal?

if you are starting a new console, then yes you will have to activate it each time. if you are accessing the same console, then you usually should get the console in the old state (just like you had left it). However, we do start servers for maintenance, and yesterday there was a deploy where we terminated all old servers and moved to new ones.