I am trying to wrap the following call into a script, which runs my Python virtual environment:
[lucas@lucas-ThinkPad-W520]/home/lucas/bin$ source /home/lucas/Dropbox/projects/competitive-programming/kaggle/venv/ipython-notebook/bin/activate
(ipython-notebook) [lucas@lucas-ThinkPad-W520]/home/lucas/bin$ deactivate
[lucas@lucas-ThinkPad-W520]/home/lucas/bin$
So, I created and ran the following bash script:
[lucas@lucas-ThinkPad-W520]/home/lucas/bin$ cat venv_python3.sh
#!/bin/bash
# /usr/bin/env bash
echo "starting python3 venv"
source /home/lucas/Dropbox/projects/competitiveprogramming/kaggle/venv/ipythonnotebook/bin/activate
[lucas@lucas-ThinkPad-W520]/home/lucas/bin$ venv_python3.sh
starting python3 venv
[lucas@lucas-ThinkPad-W520]/home/lucas/bin$
As you can see, it executes the echo
call, but does not start my virtual environment. Am I missing something?
I've looked over several tutorials, but cannot find what is missing. Also, my /home/lucas/bin/
, the location of my script, is in my $PATH
.
Here are the file's permissions:
[lucas@lucas-ThinkPad-W520]/home/lucas/bin$ ls -la
total 52
drwxr-xr-x 3 lucas lucas 4096 Jun 28 23:14 .
drwxr-xr-x 79 lucas lucas 4096 Jun 28 23:13 ..
-rwxrw-r-- 1 lucas lucas 164 Jun 28 23:13 venv_python3.sh