sisl / tufte_algorithms_book

A template for textbooks in the same style as Algorithms for Optimization
350 stars 66 forks source link

Priviliges #4

Closed BeastyBlacksmith closed 3 years ago

BeastyBlacksmith commented 5 years ago

is there any way to run the python scripts ( or get the things done they do ) without having to use sudo? I don't have admin rights on my work machine.

tawheeler commented 5 years ago

Hi @BeastyBlacksmith - I do not know.

johnnychen94 commented 5 years ago

sudo is required because by default the python used is /usr/bin/python that installs the scripts into /usr/bin (or /usr/local/bin, I'm not sure), which you don't have write-permission.

A simple strategy is to install a python into someplace you have write-permission. For example, anaconda3 installs python into /home/USER/anaconda3/bin. In this case, you don't need to add sudo prefix.

P.S. in case you are not aware, which python tells you the python you're using.

BeastyBlacksmith commented 5 years ago

It is also possible to use e.g. python setup.py install --user which will install to homedir/.local/bin (at least on Linux).