Установка Django с помощью Pythonista и Stash приводит к ошибкам: имя 'sys' не определено с помощью «import sys » в скрипте
Я пытаюсь установить Django с помощью Pythonista 3.4 на Ipad Pro (M4) с помощью Stash (после запуска launch_stash.py
):
[~/Documents]$ pip install django
И у меня появляются эти ошибки:
site-packages/stash/bin/pip.py:35: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
from distutils.util import convert_path
Querying PyPI ...
Downloading package ...
Opening: https://files.pythonhosted.org/packages/63/e0/6a5b5ea350c5bd63fe94b05e4c146c18facb51229d9dee42aa39f9fc2214/Django-5.2-py3-none-any.whl
Save as: /private/var/mobile/Containers/Data/Application/31B610E4-119A-4907-8E17-35502B9C7701/tmp//Django-5.2-py3-none-any.whl (8301361 bytes)
[====================] 100.00% | 7.9MiB
stash: ^C
KeyboardInterrupt: Exit: 0
Installing wheel: Django-5.2-py3-none-any.whl...
stash: <class 'NameError'>: name 'sys' is not defined
У меня уже есть import sys
в моем launch_stash.py
Я попытался добавить import sys
в консоль ПОСЛЕ запуска launch_stash.py
с import sys
внутри. Кроме того, я попытался принудительно установить разные версии django. У меня все еще есть ошибки:
[~/Documents]$ pip install django
Querying PyPI ...
Downloading package ...
Opening: https://files.pythonhosted.org/packages/63/e0/6a5b5ea350c5bd63fe94b05e4c146c18facb51229d9dee42aa39f9fc2214/Django-5.2-py3-none-any.whl
Save as: /private/var/mobile/Containers/Data/Application/31B610E4-119A-4907-8E17-35502B9C7701/tmp//Django-5.2-py3-none-any.whl (8301361 bytes)
[====================] 100.00% | 7.9MiB
stash: ^C
KeyboardInterrupt: Exit: 0
Error: failed to download package from https://files.pythonhosted.org/packages/63/e0/6a5b5ea350c5bd63fe94b05e4c146c18facb51229d9dee42aa39f9fc2214/Django-5.2-py3-none-any.whl
stash: ^C
KeyboardInterrupt: Exit: 1
Кроме того, у меня есть эта досадная ошибка :
stash: ^C KeyboardInterrupt: Exit: 1
Он появляется в первый раз сразу после запуска launch_stash.py
:
stash: ^C
KeyboardInterrupt: Exit: 0
StaSh v0.7.5 on python 3.10.4
Warning: you are running StaSh in python3. Some commands may not work correctly in python3.
Please help us improving StaSh by reporting bugs on github.
Tip: A background job can be issued by appending & at the end of a normal command, e.g. httpserver &
[~/Documents]$ pip install django
…
Сначала я подумал, что это проблема с подключенной Apple Magic Keyboard. Я попробовал без нее, но ошибка все та же.
Не могли бы вы, пожалуйста, помочь мне с установкой?