Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use python virtual env in azure webjob

I'm trying to set up a python script as an azure webjob and the script is using several external dependencies, and in the documantation there seem to be no reference to using virtual env for webjobs.

how can i set a virtual env for the webjob? preferably without collecting the enviroment locally and running the script thorugh run.cmd

like image 738
Srgrn Avatar asked Jan 31 '26 01:01

Srgrn


1 Answers

If you are trying to activate an already existing virtualenv, you can call its activate script. For instance, if you want to activate the web app's virtualenv, you can run

/path/to/web-app/env/Scripts/activate.bat

to acticate that particular virtulenv.

like image 146
Ozgur Akcali Avatar answered Feb 01 '26 14:02

Ozgur Akcali



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!