0

permission denied

I was trying to install Django using pip3 install django==2.0.2 on windows. But I am getting "permission denied " error message. But pip3 install django==2.0.2 --user is working, but "Django-admin" command is not being recognized.

Please help me out.

C:\Users\Hima>pip3 install django==2.0.2

fd = os.open(file, os.O_RDWR | os.O_CREAT | os.O_EXCL)
PermissionError: [Errno 13] Permission denied: 'c:\\program files (x86)\\python38-32\\Lib\\site-packages\\accesstest_deleteme_fishfingers_custard_gijd2m'
markwalker_
  • 12,078
  • 7
  • 62
  • 99
anna
  • 405
  • 5
  • 13
  • try runing cmd.exe as administrator – Joe Jan 27 '20 at 16:53
  • Does this answer your question? [Is it acceptable and safe to run pip install under sudo?](https://stackoverflow.com/questions/15028648/is-it-acceptable-and-safe-to-run-pip-install-under-sudo) – markwalker_ Jan 27 '20 at 22:03

1 Answers1

1

Your installation with --user argument works because --user makes pip install packages in your home directory instead of system directory, which doesn't require any special privileges. You have not enough privileges to install it to system dir. If you are sure of what you are doing - run pip with administrative privileges but do remember that anyone can uploade libraries to pip and thus there is a risk of running malicious code.

Better way to go is to use a virtual environment

Charnel
  • 4,222
  • 2
  • 16
  • 28