I am trying to create a python virtual environment for Django in ubuntu 20.04 using jenkins execute shell. I have seen a solution here at askubuntu and trying to reproduce this solution but getting the following error in console output:
Running as SYSTEM Building in workspace /var/lib/jenkins/workspace/python_virtual_Env [python_virtual_Env] $ /bin/bash /tmp/jenkins8922469990510149005.sh ModuleNotFoundError: No module named 'virtualenv.seed.embed.via_app_data' /tmp/jenkins8922469990510149005.sh: line 3: cd: virtual_django1/bin: No such file or directory /var/lib/jenkins/workspace/python_virtual_Env /tmp/jenkins8922469990510149005.sh: line 6: activate: No such file or directory Build step 'Execute shell' marked build as failure Finished: FAILURE
Below are my commands which i have used in jenkins execute shell:
#!/bin/bash
virtualenv virtual_django1
cd virtual_django1/bin
pwd
dir
source activate
I have ran the above commands with and without #!/bin/bash but still error persist. How can i get rid off this error in console and get able to create as well activate python virtual environment using jenkins execute shell.