exquisite spam
exquisite spam

Reputation: 41

How to prevent users installing packages via pip

I wish to PREVENT users from running pip to install packages into their home directory.

I have a fairly large number students who have network mounted home directories and file and space quotas on their directories.

I want to be able to allow them access to the system python / anaconda, but to prevent them from using pip to install things themselves. A huge amount of teaching time is wasted during unpicking things students have installed and unlocking their accounts because they've filled their home directory with pip-installed software.

Any suggestions would be greatly appreciated.

Upvotes: 4

Views: 3018

Answers (1)

sinoroc
sinoroc

Reputation: 22295

Nothing will be 100% effective. But here are some ideas...

  • Use a global configuration for pip with an index-url purposefully wrong.
  • Do not install pip or remove the executable bit.
  • Use a proxy to block access to pypi.org.

Upvotes: 3

Related Questions