Skip to content

Commit

Permalink
Use system pip3 rather than venv pip3
Browse files Browse the repository at this point in the history
Following opensafely-core/research-template-docker#26
which added venv activation into .bashrc for the rstudio user (the default
user for our codespaces/devcontainer configuration), calling `pip3` would
call /opt/venv/bin/pip3. Within a virtualenv, the `--user` option is not
allowed and users reported this error. Instead we decouple the installation
of opensafely-cli from the venv so it is always available regardless of
virtualenv state.
  • Loading branch information
Jongmassey committed May 21, 2024
1 parent 76269ed commit 06cbe3c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .devcontainer/postCreate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -euo pipefail

pip3 install --user -r .devcontainer/requirements.in
/usr/local/bin/pip3 install --user -r .devcontainer/requirements.in

#set R working directory
! grep -q "$1" $R_HOME/etc/Rprofile.site && sudo tee -a $R_HOME/etc/Rprofile.site <<< "setwd(\"$1\")"
Expand Down
1 change: 1 addition & 0 deletions analysis/stata.do
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
capture noisily import delimited ./output/output/dataset.csv, clear

0 comments on commit 06cbe3c

Please sign in to comment.