我試圖在我的ubuntu 16.04上使用安裝Django1.10。現在我遇到了一個我認爲與安裝路徑目錄有關的錯誤,但我不知道如何通過。以下是錯誤:在ubuntu16.04上使用pip安裝Django面臨錯誤
-
Exception: Traceback (most recent call last): File "/home/atenagm/.local/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main status = self.run(options, args) File "/home/atenagm/.local/lib/python2.7/site-packages/pip/commands/install.py", line 317, in run prefix=options.prefix_path, File "/home/atenagm/.local/lib/python2.7/site-packages/pip/req/req_set.py", line 742, in install **kwargs File "/home/atenagm/.local/lib/python2.7/site-packages/pip/req/req_install.py", line 831, in install self.move_wheel_files(self.source_dir, root=root, prefix=prefix) File "/home/atenagm/.local/lib/python2.7/site-packages/pip/req/req_install.py", line 1032, in move_wheel_files isolated=self.isolated, File "/home/atenagm/.local/lib/python2.7/site-packages/pip/wheel.py", line 346, in move_wheel_files clobber(source, lib_dir, True) File "/home/atenagm/.local/lib/python2.7/site-packages/pip/wheel.py", line 317, in clobber ensure_dir(destdir) File "/home/atenagm/.local/lib/python2.7/site-packages/pip/utils/init.py", line 83, in ensure_dir os.makedirs(path) File "/usr/lib/python2.7/os.py", line 157, in makedirs mkdir(name, mode) OSError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/Django-1.10.dist-info'
誰能告訴我,我應該做些什麼來解決這個問題?提前致謝。
如果你在UBUNTU上安裝django,那麼你必須使用'sudo pip install Django == 1.10'。 'sudo'給出管理權限。 –