r/pythonhelp • u/Terra-Surfer • Nov 27 '16
Assistance regarding correct installation and use of Python and Django on Mac.
I am currently trying to install Django on Mac, however it seems to be failing to do so saying I need to upgrade Pip. When I go to upgrade Pip it also fails.
I also have PyCharm installed so, if you have any tips on how to use PyCharm and Django together, I would also appreciate that.
I made the Python installations a few months ago to start learning basic programs. I'm thinking I may have somehow screwed up the initial installation. I'm new to programming and don't know how to proceed.
pip install django Collecting django Using cached Django-1.10.3-py2.py3-none-any.whl Installing collected packages: django Exception: Traceback (most recent call last): File "/Library/Python/2.7/site-packages/pip/basecommand.py", line 215, in main status = self.run(options, args) File "/Library/Python/2.7/site-packages/pip/commands/install.py", line 317, in run prefix=options.prefix_path, File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 742, in install **kwargs File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 831, in install self.move_wheel_files(self.source_dir, root=root, prefix=prefix) File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 1032, in move_wheel_files isolated=self.isolated, File "/Library/Python/2.7/site-packages/pip/wheel.py", line 346, in move_wheel_files clobber(source, lib_dir, True) File "/Library/Python/2.7/site-packages/pip/wheel.py", line 317, in clobber ensure_dir(destdir) File "/Library/Python/2.7/site-packages/pip/utils/init.py", line 83, in ensure_dir os.makedirs(path) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 157, in makedirs mkdir(name, mode) OSError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/django' You are using pip version 8.1.2, however version 9.0.1 is available. You should consider upgrading via the 'pip install --upgrade pip' command.
pip install --upgrade pip Collecting pip Using cached pip-9.0.1-py2.py3-none-any.whl Installing collected packages: pip Found existing installation: pip 8.1.2 Uninstalling pip-8.1.2: Exception: Traceback (most recent call last): File "/Library/Python/2.7/site-packages/pip/basecommand.py", line 215, in main status = self.run(options, args) File "/Library/Python/2.7/site-packages/pip/commands/install.py", line 317, in run prefix=options.prefix_path, File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 736, in install requirement.uninstall(auto_confirm=True) File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 742, in uninstall paths_to_remove.remove(auto_confirm) File "/Library/Python/2.7/site-packages/pip/req/req_uninstall.py", line 115, in remove renames(path, new_path) File "/Library/Python/2.7/site-packages/pip/utils/init.py", line 267, in renames shutil.move(old, new) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 303, in move os.unlink(src) OSError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/pip-8.1.2.dist-info/DESCRIPTION.rst' You are using pip version 8.1.2, however version 9.0.1 is available. You should consider upgrading via the 'pip install --upgrade pip' command.