0
votes

I have written few environment setting commands in postactivate (~/.virtualenvs/myenv/bin/postactivate) but whenever I run workon myenv, the postactivate doesn't seem to run. i also added execute permission to the file but still no impact.

I came to know that whenever we create a new virtualenv via virtualenvwrapper (VEW), postactivate file gets automatically created but it isn't happening.

I am using virtualenvwrapper version 4.7.1

i also grep'ed for postactivate in VEW code and it is present only in user_scripts.py.

I have also gone through 2-3 similar questions on SO but didn't get any relevant answers.

1

1 Answers

1
votes

I had an identical problem.

A quick fix is just to add the commands to the activate file. Then unset them in deactivate().