Skip to content
Snippets Groups Projects
Commit 4059171c authored by Frank Sauerburger's avatar Frank Sauerburger
Browse files

Use pip --user without sudo

Remove superuser privileges from pip and install packages in ~/.local. This also
prevents hiding pip's packages by system packages, since user packages have
precedence.
parent 61eb0bae
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -10,5 +10,5 @@ RUN apt-get update && apt-get install -y \
&& rm -rf /var/lib/apt/lists/*
# install doxec
RUN git clone https://srv.sauerburger.com/esel/doxec.git && cd doxec && git checkout v0.1.1 && python3 setup.py install
RUN git clone https://srv.sauerburger.com/esel/doxec.git && cd doxec && git checkout b0ce804f && python3 setup.py install
RUN echo "" | adduser --disabled-password student
......@@ -23,15 +23,8 @@ can run the following command line.
```bash
sudo apt-get install python3 python3-pip
sudo pip3 install numpy scipy matplotlib
pip3 install --user numpy scipy matplotlib
```
This installs the most recent versions these three packages. If you install the
packages via ubuntus package manager, you will get older version. Ubuntu's
packages can hide the more up-to-date ones installed by pip3. My personal
recommandations is to always use pip and never install python packages via
ubuntus package manager if you want to use recent version of the packages.
<!--
Doxec in a docker container needs a slightly different command, please keep them
in-sync.
......@@ -40,7 +33,8 @@ in-sync.
```bash
$ apt-get update
$ apt-get -y install python3 python3-pip
$ pip3 install numpy scipy matplotlib
$ su student
$ pip3 install --user numpy scipy matplotlib
```
-->
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment