Ошибки при установке django

I am trying to install Django on my a new mac which I got yesterday. I am switching over from a Windows, but I didn’t think that should have been much of an issue. Every time I try install either the version 1.6.5 or the development version I keep on getting the same error:

Exception:
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg/pip/commands/install.py", line 283, in run
    requirement_set.install(install_options, global_options, root=options.root_path)
  File "/Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg/pip/req.py", line 1435, in install
    requirement.install(install_options, global_options, *args, **kwargs)
  File "/Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg/pip/req.py", line 671, in install
    self.move_wheel_files(self.source_dir, root=root)
  File "/Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg/pip/req.py", line 901, in move_wheel_files
    pycompile=self.pycompile,
  File "/Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg/pip/wheel.py", line 215, in move_wheel_files
    clobber(source, lib_dir, True)
  File "/Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg/pip/wheel.py", line 205, in clobber
    os.makedirs(destdir)
  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'

Storing debug log for failure in /Users/Peter/Library/Logs/pip.log

I am trying to install Django on my a new mac which I got yesterday. I am switching over from a Windows, but I didn’t think that should have been much of an issue. Every time I try install either the version 1.6.5 or the development version I keep on getting the same error:

Exception:
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg/pip/commands/install.py", line 283, in run
    requirement_set.install(install_options, global_options, root=options.root_path)
  File "/Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg/pip/req.py", line 1435, in install
    requirement.install(install_options, global_options, *args, **kwargs)
  File "/Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg/pip/req.py", line 671, in install
    self.move_wheel_files(self.source_dir, root=root)
  File "/Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg/pip/req.py", line 901, in move_wheel_files
    pycompile=self.pycompile,
  File "/Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg/pip/wheel.py", line 215, in move_wheel_files
    clobber(source, lib_dir, True)
  File "/Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg/pip/wheel.py", line 205, in clobber
    os.makedirs(destdir)
  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'

Storing debug log for failure in /Users/Peter/Library/Logs/pip.log

Today I wanted to install Django with steps of Django site, but when I installing that I get this error and searched but I couldn’t find good answer:

Hash of the package https://pypi.python.org/packages/py2.py3/D/Django/Django-1.8.5-py2.py3-none-any.whl#md5=3c182cf9de00382ecf27fdc65fcfbe70 (from https://pypi.python.org/simple/django/) (37e1d67ae64ad916aeb1e0b1f58a3b5e) doesn't match the expected hash 3c182cf9de00382ecf27fdc65fcfbe70!
Bad md5 hash for package https://pypi.python.org/packages/py2.py3/D/Django/Django-1.8.5-py2.py3-none-any.whl#md5=3c182cf9de00382ecf27fdc65fcfbe70 (from https://pypi.python.org/simple/django/)

I use windows 10.

asked Oct 4, 2015 at 18:10

Farshid Shekari's user avatar

Farshid ShekariFarshid Shekari

2,3914 gold badges27 silver badges47 bronze badges

5

There are couple of things you can do. First, you can tell pip to ignore looking at the cache:

~$ pip install --ignore-installed Django

or you can try downloading the tarball instead:

~$ pip install https://www.djangoproject.com/download/1.8.5/tarball/

answered Oct 4, 2015 at 18:30

Ozgur Vatansever's user avatar

Ozgur VatanseverOzgur Vatansever

49.4k17 gold badges84 silver badges119 bronze badges

0

This problem is because terminal is using cache version of Django for install. use below code

pip install django --no-cache-dir

answered Nov 28, 2015 at 4:40

Vivek's user avatar

VivekVivek

3411 gold badge5 silver badges15 bronze badges

The same error,I too got…This is due to the presence of a cache of Djanco.

pip install django --no-cache-dir

RECOMMENDED TO WINDOWS 10 USERS

answered Dec 24, 2015 at 13:02

Joel K Thomas's user avatar

3 / 3 / 1

Регистрация: 17.12.2018

Сообщений: 257

1

06.02.2019, 07:13. Показов 5528. Ответов 7


Студворк — интернет-сервис помощи студентам

Смотрела видео урок Дударя, он показывал как установить джанго, но когда я пишу pip install django выдаёт ошибку. Pip у меня установлен, ибо версия питона выше 3.4.



0



3 / 3 / 1

Регистрация: 17.12.2018

Сообщений: 257

06.02.2019, 07:17

 [ТС]

2

1) Вот версия питона когда я пишу «py»:

2) Вот когда я пишу python:

3) pip установлен:

4) Вот ошибка при установки джанго:



0



3 / 3 / 1

Регистрация: 17.12.2018

Сообщений: 257

06.02.2019, 07:30

 [ТС]

3

5) Версия pip:

Миниатюры

Не могу установить Django
 



0



3 / 3 / 1

Регистрация: 17.12.2018

Сообщений: 257

06.02.2019, 07:55

 [ТС]

4

УРА ПОЛУЧИЛОСЬ УСТАНОВИТЬ! Антивирус Касперского тупо блокировал какие-то хосты, поэтому не получалось установить соединение с сайтом. Я его отключила и получилось установить.



1



Эксперт Python

5412 / 3836 / 1214

Регистрация: 28.10.2013

Сообщений: 9,554

Записей в блоге: 1

06.02.2019, 12:35

5

Цитата
Сообщение от Ivan _pupkin
Посмотреть сообщение

Антивирус Касперского тупо блокировал какие-то хосты

Пакет можно установить локально — просто скачав с репозитория pypi.org whl архив пакета.
Далее:

Код

pip install путь_до_загруженного_пакета.whl

Пакет также можно установить просто склонировал его с репозитория на гитхабе.



0



m0nte-cr1st0

1040 / 575 / 242

Регистрация: 15.01.2019

Сообщений: 2,178

Записей в блоге: 1

06.02.2019, 13:05

6

Django с большой нужно писать просто

Python
1
pip install Django

И Касперский тут не причём, просто на этот раз вы ввели всё верно, обычное совпадение, не более.



0



3 / 3 / 1

Регистрация: 17.12.2018

Сообщений: 257

06.02.2019, 13:10

 [ТС]

7

m0nte-cr1st0, я с большой тоже писала, ибо он в своём уроке писал с большой буквы, но не устанавливалось.



0



102 / 75 / 38

Регистрация: 08.11.2017

Сообщений: 271

06.02.2019, 13:22

8

Лучший ответ Сообщение было отмечено Ivan _pupkin как решение

Решение

m0nte-cr1st0, большая буква здесь не причём.



0



Copying this answer from Stack Overflow:

You need to upgrade pip as follows:

curl https://bootstrap.pypa.io/get-pip.py | python

Note: You may need to use sudo python above if not in a virtual environment.

(Note that upgrading pip using pip i.e pip install --upgrade pip will also not upgrade it correctly. Its just a chicken-and-egg issue. pip wont work unless using TLS >=1.2)

As mentioned in this detailed answer, this is due to the recent TLS deprecation for pip. Python.org sites have stopped support for TLS versions 1.0 and 1.1.

From the Python status page:

Completed — The rolling brownouts are finished, and TLSv1.0 and
TLSv1.1 have been disabled. Apr 11, 15:37 UTC

For Pycharm (virtualenv) users:

  1. Run virtual environment with shell. (replace «./venv/bin/activate» to your own path)

    source ./venv/bin/activate
    
  2. Run upgrade

    curl https://bootstrap.pypa.io/get-pip.py | python
    
  3. Restart your pycharm, and check your python interpreter in Preference.

Понравилась статья? Поделить с друзьями:
  • Ошибки при установке cubase 5
  • Ошибки при установке импланта зуба
  • Ошибки при установке антенны на даче
  • Ошибки при установке пластиковых подоконников
  • Ошибки при установке composer