0

I have a virtual env. Name it test-venv.

python3 -m venv test-venv
source test-venv/bin/activate

After that my bash session is working with the venv activated.

I would like to put that in a make command.

Makefile

evenv: # Enter test-venv
   source test-venv/bin/activate

My problem is that, I guess another bash session is created when I execute a make target, so when the target execution finish, I am not longer in the venv.

How can I achieve this, if it is possible?

Gonzalo
  • 752
  • 8
  • 23
  • 1
    It is not possible. This same question was asked less than a day ago: https://stackoverflow.com/questions/67274023/how-to-activate-a-virtual-environment-for-use-outside-the-makefile – MadScientist Apr 27 '21 at 19:17
  • @MadScientist this question or similar is asked multiple times per week – jordanm Apr 27 '21 at 19:18
  • 1
    Yes. Seems like a basic conceptual stumbling block regarding processes, subprocesses, and how they work together. – MadScientist Apr 27 '21 at 19:19
  • I could not find that. Thank you. Would you recommend to delete this one? – Gonzalo Apr 27 '21 at 20:01

0 Answers0