Не удается запустить python управлять миграцией файлов - PullRequest
0 голосов
/ 07 апреля 2020

Так что это старый проект, пытающийся запустить его на python2 django 1, команда pip install -r requirements.txt работает нормально, но появляется ошибка, когда я пытаюсь запустить миграцию на manage.py файле.

Успешный журнал для require.txt:

(comparedjs) rehman@localhost:~/projects/comparedjs/comparedjs$ pip install -r requirements.txt
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting git+https://github.com/aaronsw/pytorctl.git (from -r requirements.txt (line 39))
  Cloning https://github.com/aaronsw/pytorctl.git to /tmp/pip-req-build-Bo1ad2
  Running command git clone -q https://github.com/aaronsw/pytorctl.git /tmp/pip-req-build-Bo1ad2
Collecting Django==1.9.7
  Using cached Django-1.9.7-py2.py3-none-any.whl (6.6 MB)
Collecting Fabric==1.11.1
  Using cached Fabric-1.11.1-py2-none-any.whl (91 kB)
Processing /home/rehman/.cache/pip/wheels/cf/7d/99/ad1cad84793c8275f7750f711eda7e49cee1d0b0a688fc30ed/GeoIP-1.3.2-cp27-cp27mu-linux_x86_64.whl
Processing /home/rehman/.cache/pip/wheels/a5/99/7e/1f6d116f7c3b3364ff840c73a8c8614d96e0cf4d78c9448837/Markdown-2.6.6-py2-none-any.whl
Collecting mysqlclient
  Using cached mysqlclient-1.4.6.tar.gz (85 kB)
Collecting Pillow==3.3.0
  Using cached Pillow-3.3.0-cp27-cp27mu-manylinux1_x86_64.whl (5.5 MB)
Processing /home/rehman/.cache/pip/wheels/d0/25/ae/654e8f6eb25c09b1b89b06546d6508b86a8436ff1e9ef97366/Unidecode-0.4.19-py2-none-any.whl
Collecting amqp==1.4.9
  Using cached amqp-1.4.9-py2.py3-none-any.whl (51 kB)
Collecting anyjson==0.3.3
  Using cached anyjson-0.3.3.tar.gz (8.3 kB)
Requirement already satisfied: argparse==1.2.1 in /usr/lib/python2.7 (from -r requirements.txt (line 10)) (1.2.1)
Processing /home/rehman/.cache/pip/wheels/17/f1/b0/bc7009f7df923445ca1e6054edb996e8709d1168f486182b38/beautifulsoup4-4.2.1-py2-none-any.whl
Processing /home/rehman/.cache/pip/wheels/ef/c6/94/83b5a9a5bb1351095aaf66ad105cb21f3e425917e644e8be61/billiard-3.3.0.22-cp27-cp27mu-linux_x86_64.whl
Collecting celery==3.1.18
  Using cached celery-3.1.18-py2.py3-none-any.whl (515 kB)
Processing /home/rehman/.cache/pip/wheels/8c/d1/79/d90a9ba086c49f3f5ddd92535e9e3977aee3e27ef5cd457a23/colorama-0.2.5-py2-none-any.whl
Processing /home/rehman/.cache/pip/wheels/c1/12/7a/c676d85d30d1aa17f3882dab925a777ab1f651c4072cccefd7/configobj-5.0.6-py2-none-any.whl
Processing /home/rehman/.cache/pip/wheels/7d/9c/94/98f98ab004c50c86735b1c7fa8403327b579736b1a3a8ece31/django_celery-3.1.17-py2-none-any.whl
Collecting django-filter==0.13.0
  Using cached django_filter-0.13.0-py2.py3-none-any.whl (27 kB)
Collecting django-mailchimp-v1.3==1.4.0
  Using cached django_mailchimp_v1.3-1.4.0-py2-none-any.whl (49 kB)
Collecting djangorestframework==3.4.1
  Using cached djangorestframework-3.4.1-py2.py3-none-any.whl (705 kB)
Collecting google-api-python-client==1.6.2
  Using cached google_api_python_client-1.6.2-py2.py3-none-any.whl (52 kB)
Processing /home/rehman/.cache/pip/wheels/a1/1d/3b/9c22bb578fec9cd2888eae1973e50cb3177bac5dd0e3a2ab9b/html5lib-0.999-py2-none-any.whl
Processing /home/rehman/.cache/pip/wheels/7a/4e/a8/cceb0ffd9c2c11f22f46c5247931969301291bf6efecbf2cb3/httplib2-0.10.3-py2-none-any.whl
Collecting kombu==3.0.37
  Using cached kombu-3.0.37-py2.py3-none-any.whl (240 kB)
Collecting meld3==1.0.2
  Using cached meld3-1.0.2-py2.py3-none-any.whl (24 kB)
Processing /home/rehman/.cache/pip/wheels/4b/80/ca/dcb85e220aeb8e8f035ed9eb8fdaa9a10414b58986d53f2a97/mysql_connector-2.2.9-cp27-cp27mu-linux_x86_64.whl
Collecting oauth2
  Using cached oauth2-1.9.0.post1-py2.py3-none-any.whl (25 kB)
Collecting oauth2client
  Using cached oauth2client-4.1.3-py2.py3-none-any.whl (98 kB)
Processing /home/rehman/.cache/pip/wheels/7b/39/aa/860a7363ff910a870651f36600cbae40a14dcabb7b7709db96/python_Levenshtein-0.12.0-cp27-cp27mu-linux_x86_64.whl
Collecting python-dateutil
  Using cached python_dateutil-2.8.1-py2.py3-none-any.whl (227 kB)
Collecting redis
  Using cached redis-3.4.1-py2.py3-none-any.whl (71 kB)
Collecting requests==2.9.1
  Using cached requests-2.9.1-py2.py3-none-any.whl (501 kB)
Collecting six==1.10.0
  Using cached six-1.10.0-py2.py3-none-any.whl (10 kB)
Collecting stripe==1.46.0
  Using cached stripe-1.46.0-py2-none-any.whl (200 kB)
Processing /home/rehman/.cache/pip/wheels/cb/93/a0/4cceab80dd60819c2ac3db60eb97fd26977be2ea54c0f56c21/supervisor-3.2.1-py2-none-any.whl
Collecting uritemplate==3.0.0
  Using cached uritemplate-3.0.0-py2-none-any.whl (10 kB)
Processing /home/rehman/.cache/pip/wheels/8e/71/64/3a4ec967c2a22bd10aab9bc4817648baec80c53c2592791751/urllib3-1.7.1-py2-none-any.whl
Collecting vine==1.1.3
  Using cached vine-1.1.3-py2.py3-none-any.whl (12 kB)
Requirement already satisfied: wsgiref==0.1.2 in /usr/lib/python2.7 (from -r requirements.txt (line 43)) (0.1.2)
Processing /home/rehman/.cache/pip/wheels/d1/d5/a0/3c27cdc8b0209c5fc1385afeee936cf8a71e13d885388b4be2/PyYAML-5.3.1-cp27-cp27mu-linux_x86_64.whl
Collecting ua-parser
  Using cached ua_parser-0.10.0-py2.py3-none-any.whl (35 kB)
Collecting user-agents
  Using cached user_agents-2.1-py2-none-any.whl (12 kB)
Processing /home/rehman/.cache/pip/wheels/10/8e/1a/fc8232770477660c4046b6e5bc9a5efc5bee4be8fcb51f4158/django_user_agents-0.4.0-py2-none-any.whl
Collecting raven
  Downloading raven-6.10.0-py2.py3-none-any.whl (284 kB)
     |████████████████████████████████| 284 kB 14 kB/s 
Collecting pyasn1
  Using cached pyasn1-0.4.8-py2.py3-none-any.whl (77 kB)
Collecting ndg-httpsclient
  Using cached ndg_httpsclient-0.5.1-py2-none-any.whl (30 kB)
Processing /home/rehman/.cache/pip/wheels/3f/61/f3/8c46cb898d2185f734677894501dea9d3074f93eb9b6d7172e/pyjwkest-1.4.2-py2-none-any.whl
Collecting social-auth-app-django
  Using cached social_auth_app_django-3.1.0-py2-none-any.whl (23 kB)
Collecting social-auth-core
  Using cached social_auth_core-3.3.3-py2-none-any.whl (326 kB)
Processing /home/rehman/.cache/pip/wheels/54/a7/d9/4e881dbc41e6c2e03822eb895ea36f5cd95a6e9c1453d6acf8/django_ckeditor-5.4.0-py2.py3-none-any.whl
Processing /home/rehman/.cache/pip/wheels/3d/2b/3a/4690266166d65fadc3fea1ccd2511589bffefb5a745932522b/django_hijack-2.1.10-py2-none-any.whl
Processing /home/rehman/.cache/pip/wheels/73/f2/d0/69b0817c8a46b4e7d92bb56b48e14fa3eb9a45dd9d98706b48/django_hijack_admin-2.1.10-py2-none-any.whl
Collecting paramiko<2.0,>=1.10
  Downloading paramiko-1.18.5-py2.py3-none-any.whl (183 kB)
     |████████████████████████████████| 183 kB 50 kB/s 
Collecting pytz>dev
  Downloading pytz-2019.3-py2.py3-none-any.whl (509 kB)
     |████████████████████████████████| 509 kB 12 kB/s 
Collecting rsa>=3.1.4
  Using cached rsa-4.0-py2.py3-none-any.whl (38 kB)
Collecting pyasn1-modules>=0.0.5
  Using cached pyasn1_modules-0.2.8-py2.py3-none-any.whl (155 kB)
Requirement already satisfied: setuptools in ./lib/python2.7/site-packages (from python-Levenshtein->-r requirements.txt (line 31)) (44.1.0)
Collecting contextlib2; python_version < "3.2"
  Downloading contextlib2-0.6.0.post1-py2.py3-none-any.whl (9.8 kB)
Collecting PyOpenSSL
  Using cached pyOpenSSL-19.1.0-py2.py3-none-any.whl (53 kB)
Collecting pycryptodomex
  Using cached pycryptodomex-3.9.7-cp27-cp27mu-manylinux1_x86_64.whl (13.7 MB)
Processing /home/rehman/.cache/pip/wheels/5f/11/0c/aad680baf5ef4fbcbab992c9f03e1130357e0c173a4fdabfff/future-0.18.2-py2-none-any.whl
Processing /home/rehman/.cache/pip/wheels/3c/ac/32/1ef0006e08d6e7e9c8c08bd4ce053a405543ae05b43a4e6447/python_openid-2.2.5-py2-none-any.whl
Collecting cryptography>=1.4
  Using cached cryptography-2.9-cp27-cp27mu-manylinux2010_x86_64.whl (2.7 MB)
Collecting requests-oauthlib>=0.6.1
  Using cached requests_oauthlib-1.3.0-py2.py3-none-any.whl (23 kB)
Collecting oauthlib>=1.0.3
  Using cached oauthlib-3.1.0-py2.py3-none-any.whl (147 kB)
Collecting PyJWT>=1.4.0
  Using cached PyJWT-1.7.1-py2.py3-none-any.whl (18 kB)
Collecting django-js-asset
  Using cached django_js_asset-1.2.2-py2.py3-none-any.whl (5.8 kB)
Processing /home/rehman/.cache/pip/wheels/20/7b/ba/c6579d91d2144ee14160e91120746ddfad5bed3cf887bb0c7c/django_compat-1.0.15-py2.py3-none-any.whl
Collecting pycrypto!=2.4,<3.0,>=2.1
  Downloading pycrypto-2.6.1.tar.gz (446 kB)
     |████████████████████████████████| 446 kB 26 kB/s 
Collecting ecdsa<2.0,>=0.11
  Downloading ecdsa-0.15-py2.py3-none-any.whl (100 kB)
     |████████████████████████████████| 100 kB 42 kB/s 
Collecting enum34; python_version < "3"
  Using cached enum34-1.1.10-py2-none-any.whl (11 kB)
Collecting ipaddress; python_version < "3"
  Using cached ipaddress-1.0.23-py2.py3-none-any.whl (18 kB)
Collecting cffi!=1.11.3,>=1.8
  Using cached cffi-1.14.0-cp27-cp27mu-manylinux1_x86_64.whl (387 kB)
Collecting pycparser
  Using cached pycparser-2.20-py2.py3-none-any.whl (112 kB)
Building wheels for collected packages: mysqlclient, anyjson, torctl, pycrypto
  Building wheel for mysqlclient (setup.py) ... done
  Created wheel for mysqlclient: filename=mysqlclient-1.4.6-cp27-cp27mu-linux_x86_64.whl size=106912 sha256=b96832de64be878a273a52cabf426245c4b1d133da81d0db07588181fc4a7332
  Stored in directory: /home/rehman/.cache/pip/wheels/04/5f/2b/e542c27913779611971f196081df58f969c742c01d93af1197
  Building wheel for anyjson (setup.py) ... done
  Created wheel for anyjson: filename=anyjson-0.3.3-py2-none-any.whl size=4952 sha256=b4a56a9ad529d14fcd3fa94a9f56080df1651f5ea7d144627c68dd8f6ab0e555
  Stored in directory: /home/rehman/.cache/pip/wheels/51/e4/7b/e4ca0dd6d60916a0a20d94ad352a671675ed88f83a57830924
  Building wheel for torctl (setup.py) ... done
  Created wheel for torctl: filename=torctl-0.2-py2-none-any.whl size=67317 sha256=80f73105375d225610a956e2892d0d63ac7034c581f3e9464db518dd010db697
  Stored in directory: /tmp/pip-ephem-wheel-cache-7WXCQT/wheels/c4/3a/87/1d604378e37b4c4d4c07b26c7866955102de8d824553cec0ec
  Building wheel for pycrypto (setup.py) ... done
  Created wheel for pycrypto: filename=pycrypto-2.6.1-cp27-cp27mu-linux_x86_64.whl size=520983 sha256=7f5bf51ae1fec5b450e1574fc2bc0983b5dacc12f51fa50508987a6a15fb1962
  Stored in directory: /home/rehman/.cache/pip/wheels/b6/e6/c8/d1eca13628952ceec1d40d96e0a7a1380460d2349ce0b85312
Successfully built mysqlclient anyjson torctl pycrypto
Installing collected packages: Django, pycrypto, six, ecdsa, paramiko, Fabric, GeoIP, Markdown, mysqlclient, Pillow, Unidecode, amqp, anyjson, beautifulsoup4, billiard, pytz, kombu, celery, colorama, configobj, django-celery, django-filter, django-mailchimp-v1.3, djangorestframework, httplib2, uritemplate, pyasn1, rsa, pyasn1-modules, oauth2client, google-api-python-client, html5lib, meld3, mysql-connector, oauth2, python-Levenshtein, python-dateutil, redis, requests, stripe, supervisor, urllib3, vine, pyyaml, ua-parser, user-agents, django-user-agents, contextlib2, raven, enum34, ipaddress, pycparser, cffi, cryptography, PyOpenSSL, ndg-httpsclient, pycryptodomex, future, pyjwkest, python-openid, oauthlib, requests-oauthlib, PyJWT, social-auth-core, social-auth-app-django, django-js-asset, django-ckeditor, django-compat, django-hijack, django-hijack-admin, torctl
Successfully installed Django-1.9.7 Fabric-1.11.1 GeoIP-1.3.2 Markdown-2.6.6 Pillow-3.3.0 PyJWT-1.7.1 PyOpenSSL-19.1.0 Unidecode-0.4.19 amqp-1.4.9 anyjson-0.3.3 beautifulsoup4-4.2.1 billiard-3.3.0.22 celery-3.1.18 cffi-1.14.0 colorama-0.2.5 configobj-5.0.6 contextlib2-0.6.0.post1 cryptography-2.9 django-celery-3.1.17 django-ckeditor-5.4.0 django-compat-1.0.15 django-filter-0.13.0 django-hijack-2.1.10 django-hijack-admin-2.1.10 django-js-asset-1.2.2 django-mailchimp-v1.3-1.4.0 django-user-agents-0.4.0 djangorestframework-3.4.1 ecdsa-0.15 enum34-1.1.10 future-0.18.2 google-api-python-client-1.6.2 html5lib-0.999 httplib2-0.10.3 ipaddress-1.0.23 kombu-3.0.37 meld3-1.0.2 mysql-connector-2.2.9 mysqlclient-1.4.6 ndg-httpsclient-0.5.1 oauth2-1.9.0.post1 oauth2client-4.1.3 oauthlib-3.1.0 paramiko-1.18.5 pyasn1-0.4.8 pyasn1-modules-0.2.8 pycparser-2.20 pycrypto-2.6.1 pycryptodomex-3.9.7 pyjwkest-1.4.2 python-Levenshtein-0.12.0 python-dateutil-2.8.1 python-openid-2.2.5 pytz-2019.3 pyyaml-5.3.1 raven-6.10.0 redis-3.4.1 requests-2.9.1 requests-oauthlib-1.3.0 rsa-4.0 six-1.10.0 social-auth-app-django-3.1.0 social-auth-core-3.3.3 stripe-1.46.0 supervisor-3.2.1 torctl-0.2 ua-parser-0.10.0 uritemplate-3.0.0 urllib3-1.7.1 user-agents-2.1 vine-1.1.3

после запуска python manage.py migrate

Я получаю эту ошибку

Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/home/rehman/projects/comparedjs/comparedjs/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 353, in execute_from_command_line
    utility.execute()
  File "/home/rehman/projects/comparedjs/comparedjs/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 327, in execute
    django.setup()
  File "/home/rehman/projects/comparedjs/comparedjs/local/lib/python2.7/site-packages/django/__init__.py", line 18, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/home/rehman/projects/comparedjs/comparedjs/local/lib/python2.7/site-packages/django/apps/registry.py", line 115, in populate
    app_config.ready()
  File "/home/rehman/projects/comparedjs/comparedjs/local/lib/python2.7/site-packages/django/contrib/admin/apps.py", line 22, in ready
    self.module.autodiscover()
  File "/home/rehman/projects/comparedjs/comparedjs/local/lib/python2.7/site-packages/django/contrib/admin/__init__.py", line 26, in autodiscover
    autodiscover_modules('admin', register_to=site)
  File "/home/rehman/projects/comparedjs/comparedjs/local/lib/python2.7/site-packages/django/utils/module_loading.py", line 50, in autodiscover_modules
    import_module('%s.%s' % (app_config.name, module_to_search))
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/home/rehman/projects/comparedjs/comparedjs/local/lib/python2.7/site-packages/django/contrib/gis/admin/__init__.py", line 5, in <module>
    from django.contrib.gis.admin.options import GeoModelAdmin, OSMGeoAdmin
  File "/home/rehman/projects/comparedjs/comparedjs/local/lib/python2.7/site-packages/django/contrib/gis/admin/options.py", line 2, in <module>
    from django.contrib.gis.admin.widgets import OpenLayersWidget
  File "/home/rehman/projects/comparedjs/comparedjs/local/lib/python2.7/site-packages/django/contrib/gis/admin/widgets.py", line 4, in <module>
    from django.contrib.gis.geos import GEOSException, GEOSGeometry
  File "/home/rehman/projects/comparedjs/comparedjs/local/lib/python2.7/site-packages/django/contrib/gis/geos/__init__.py", line 18, in <module>
    geos_version_info()
  File "/home/rehman/projects/comparedjs/comparedjs/local/lib/python2.7/site-packages/django/contrib/gis/geos/libgeos.py", line 191, in geos_version_info
    raise GEOSException('Could not parse version info string "%s"' % ver)
django.contrib.gis.geos.error.GEOSException: Could not parse version info string "3.7.1-CAPI-1.11.1 27a5e771"

Пожалуйста, дайте мне знать, если у меня нет При условии что-нибудь важное, любая помощь очень ценится.

Спасибо

...