I have a script for which I must have a specific virtualenv on.
Running the script with #!/usr/bin/env python / python3 / python3.6 will not cut it if the virtualenv is not on when the script runs, so I have done something like this:
#!/home/bla/bla2/bla3/venv/bin/python
import virtualenv stuff...
I assume that
- virtualenv will be installed beforehand
- the script / dir / venv will stay in the exact same place
Given those 2 assumptions, is this a good idea? If not, what would be better? I'm reluctant to having a wrapper bash script that would turn on the venv and then call my script