0

I'm trying to install python dependencies for a Django project, but I keep getting Non-user install because user site-packages disabled error. It sounds like a permission issue, I just can't figure out what went wrong. My working tools include:

  1. Django
  2. Python 3.8.5
  3. Ubuntu 20.04

Probably worth mentioning, I am using a virtual environment for this project. Also, I have tried using root to install the packages without any luck. Any ideas on how to solve this issue is more than welcome.

Alexander
  • 599
  • 2
  • 14
  • 25
  • 1
    do you have the venv activated? How did you create the venv? take a look at the comments in this one: https://stackoverflow.com/questions/24420125/python-change-user-site-directory-or-install-setup-py-prefix-with-user – Rui Lima Jun 15 '21 at 19:39
  • Yep, virtual env is activated. I used `python3 -m venv /path/to/new/virtual/environment` to create my virtual environment. – Alexander Jun 15 '21 at 19:44
  • In that question I posted in my previous comment there is an answer, see if that and/or the comments to that answer are helpful. I never come across that problem. – Rui Lima Jun 15 '21 at 19:47
  • Which package installation is causing the problem? – Razenstein Jun 15 '21 at 20:08
  • 1
    is this a deployment on a service provider or on your local computer ? Some service providers offer very limited resources in Python and prevent any new packages to be installed. – Fabrice Jaouën Jun 15 '21 at 21:27
  • @Razenstein It happens when I try to install a requirements file with multiple packages. If I install one package, I don't see the issue, which is weird. – Alexander Jun 17 '21 at 16:20
  • @FabriceJaouën I am deploying to AWS, I was running the command using Ansible, but I have tried sshing to the server and running the command manually, same issue – Alexander Jun 17 '21 at 16:21
  • I would debug it the "stupid" way: put 1 item in requirements then 2 ... 4 ... and see when it fails – Razenstein Jun 17 '21 at 17:40
  • It depends really on your provider and your billing plan: OVH is weird and nothing is clear (their core business is obviously either people on PHP or medium/large companies, AWS offers a bunch of plans with different options. Frankly, the only one I could find, which runs smoothly on Python and where everything is clearly and simply explained with up-to-date tutorials remains DigitalOcean. – Fabrice Jaouën Jun 19 '21 at 14:38

0 Answers0