You are not logged in.
Hey,
I have a file `install.sh` with the following contents:
#!/usr/bin/env bash
# Create Python virtual environment
python -m venv --prompt PROJECT-NAME .env
# Activate the environment
source .env/bin/activate
# Install requirements
pip install -r requirements.txt
It creates the environment, but it doesn't activate it.
If I do the 'source .env/bin/activate' manually, it works.
Have to mention that I use zsh as the main shell.
Offline
That script actually does run correctly. I.e. it sources the newly created environment and runs pip in it. When you run that script you are creating a child shell (i.e. the top shebang line) which sources that environment, runs pip, and then promptly terminates. So instead of typing `./install,sh`, type `source tmp.sh` to run those commands in your current shell and give you the result you are probably expecting.
Offline
Thanks that worked.
Offline