Найти - Пользователи
Полная версия: помощь в переносе сайта x64 на х32
Начало » Python для новичков » помощь в переносе сайта x64 на х32
1 2
pitosh
в питоне новичок
нужно перенести сайт с одного сервера на другой на котором уже есть сайты на питоне
проблема в том что на конечном сервере система х32, а проект крутится на х64
поставил на х32 pip3.6 запускаю установку
 pip3 install -r requirements.txt
и вот что получаю
 Exception:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/lib/python3/dist-packages/pip/commands/install.py", line 262, in run
    for req in parse_requirements(filename, finder=finder, options=options, session=session):
  File "/usr/lib/python3/dist-packages/pip/req.py", line 1632, in parse_requirements
    req = InstallRequirement.from_line(line, comes_from, prereleases=getattr(options, "pre", None))
  File "/usr/lib/python3/dist-packages/pip/req.py", line 173, in from_line
    return cls(req, comes_from, url=url, prereleases=prereleases)
  File "/usr/lib/python3/dist-packages/pip/req.py", line 71, in __init__
    req = pkg_resources.Requirement.parse(req)
  File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2667, in parse
    reqs = list(parse_requirements(s))
  File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2605, in parse_requirements
    line, p, specs = scan_list(VERSION,LINE_END,line,p,(1,2),"version spec")
  File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2573, in scan_list
    raise ValueError("Expected "+item_name+" in",line,"at",line[p:])
ValueError: ('Expected version spec in', 'django-jet @ git+https://github.com/LowerDeez/django-jet@0711116e4e008943713db148244e25b0b11fe16b', 'at', ' @ git+https://github.com/LowerDeez/django-jet@0711116e4e008943713db148244e25b0b11fe16b')
Storing debug log for failure in /home/admin/.pip/pip.log
какие будут советы? менять сервер не предлогать
Rodegast
Какая версия python-а? Покажи что в requirements.txt
pitosh
на х32 такие версии
  python
python             python2.7          python2-config     python3.4          python3.4m         python3.6          python3.6m         python3-config     python3m-config
python2            python2.7-config   python3            python3.4-config   python3.4m-config  python3.6-config   python3.6m-config  python3m           python-config
cat requirements.txt
 amqp==2.6.1
bcrypt==3.2.0
billiard==3.6.3.0
celery==4.4.7
certifi==2020.12.5
cffi==1.14.4
chardet==4.0.0
click==7.1.2
coreapi==2.3.3
coreschema==0.0.4
cryptography==3.4.1
#dataclasses==0.8
dataclasses==0.6
dataclasses-json==0.5.2
defusedxml==0.6.0
diff-match-patch==20200713
Django==2.2
django-admin-rangefilter==0.6.4
django-admin-sortable2==0.7.8
django-ckeditor==6.0.0
django-codemirror2==0.2
django-constance==2.8.0
django-cors-headers==3.10.1
django-critical-css==0.0.3
django-crontab==0.7.1
django-des==2.4.1
django-environ==0.4.5
django-filter==2.4.0
django-import-export==2.4.0
django-inline-static==0.1.0
django-jet @ git+https://github.com/LowerDeez/django-jet@0711116e4e008943713db148244e25b0b11fe16b
django-jinja==2.7.0
django-js-asset==1.2.2
django-json-widget==1.1.0
django-model-utils==4.0.0
django-modeltranslation==0.13.1
django-mptt==0.11.0
django-mptt-admin==2.0.1
django-nested-inline==0.4.4
django-ok-seo==0.8.8
django-parler==2.2
django-picklefield==3.0.1
django-polymorphic==3.0.0
django-postie==0.7.3
django-redis==4.12.1
django-rest-auth==0.9.5
django-robots==4.0
django-rosetta==0.9.5
django-rq==2.3.2
django-script-pattern==0.3.3
django-solo==1.1.3
django-versatileimagefield==2.0
django-vuejs-translate @ git+https://gitlab.com/cyberbudy/django-vuejs-translate@0a6bc20d3160400ff6ca18cb82df5cbf900c8a9b
django-webpack-loader==0.7.0
djangorestframework==3.11.1
drf-yasg==1.17.1
et-xmlfile==1.0.1
Fabric3==1.14.post1
future==0.18.2
gevent==1.5a3
greenlet==0.4.16
gunicorn==20.0.4
idna==2.10
importlib-metadata==4.8.3
inflection==0.5.1
itypes==1.2.0
jdcal==1.4.1
Jinja2==2.11.3
kombu==4.6.11
MarkupPy==1.14
MarkupSafe==1.1.1
marshmallow==3.10.0
marshmallow-enum==1.5.1
mock==4.0.3
mypy-extensions==0.4.3
oauthlib==3.1.0
odfpy==1.4.1
ok-esputnik==0.3
openpyxl==3.0.6
packaging==20.9
paramiko==2.7.2
Pillow==8.1.0
polib==1.1.0
psycopg2-binary==2.8.6
pycparser==2.20
PyJWT==2.0.1
PyNaCl==1.4.0
pyparsing==2.4.7
python-magic==0.4.18
python3-openid==3.2.0
pytz==2021.1
PyYAML==5.4.1
redis==3.5.3
requests==2.25.1
requests-oauthlib==1.3.0
rq==1.5.2
ruamel.yaml==0.16.12
ruamel.yaml.clib==0.2.2
semantic-version==2.8.5
setuptools-rust==0.11.6
six==1.15.0
social-auth-app-django==4.0.0
social-auth-core==4.0.3
sqlparse==0.4.1
stringcase==1.2.0
tablib==3.0.0
tilda-wrapper-api==0.1.5
tinify==1.5.1
toml==0.10.2
trafaret==1.2.0
typing-extensions==3.7.4.3
typing-inspect==0.6.0
Unidecode==1.2.0
uritemplate==3.0.1
urllib3==1.26.3
vine==1.3.0
xlrd==2.0.1
xlwt==1.3.0
zipp==3.6.0
Rodegast
Под Django==2.2 нужен python как минимум 3.5 Ты уверен что pip3 именно от версии 3.6?

Ну и ветки https://github.com/LowerDeez/django-jet@0711116e4e008943713db148244e25b0b11fe16b уже не существует.
pitosh
ситуация такая
сначала было так
  pip3 -V
pip 1.5.4 from /usr/lib/python3/dist-packages (python 3.4)
после попытки поставить пип 3.6
  pip3 -V
Traceback (most recent call last):
  File "/usr/local/bin/pip3", line 7, in <module>
    from pip._internal.cli.main import main
  File "/usr/local/lib/python3.4/dist-packages/pip/__init__.py", line 1, in <module>
    from typing import List, Optional
ImportError: No module named 'typing'
но вот что есть в других сайтах на этом сервере
/home/admin/web/prikorm/env/bin/pip3.6 -V
pip 21.3.1 from /home/admin/web/prikorm/env/lib/python3.6/site-packages/pip (python 3.6)

добавлю что на сервере стоит убунту 14
pitosh
нашел вот такую программу pyenv https://github.com/pyenv/pyenv#installation
ставлю командой
 curl https://pyenv.run | bash

затем запускаю установку питона
  pyenv install 3.9.0
Downloading Python-3.9.0.tar.xz...
-> https://www.python.org/ftp/python/3.9.0/Python-3.9.0.tar.xz
Installing Python-3.9.0...
patching file Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
patching file configure
patching file configure.ac
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/admin/.pyenv/versions/3.9.0/lib/python3.9/ssl.py", line 98, in <module>
    import _ssl             # if we can't import it, let the error propagate
ModuleNotFoundError: No module named '_ssl'
ERROR: The Python ssl extension was not compiled. Missing the OpenSSL lib?
Please consult to the Wiki page to fix the problem.
https://github.com/pyenv/pyenv/wiki/Common-build-problems
BUILD FAILED (Ubuntu 14.04 using python-build 20180424)
Inspect or clean up the working tree at /tmp/python-build.20240205094246.20815
Results logged to /tmp/python-build.20240205094246.20815.log
Last 10 log lines:
        fi
Looking in links: /tmp/tmp98ubuf69
Processing /tmp/tmp98ubuf69/setuptools-49.2.1-py3-none-any.whl
Processing /tmp/tmp98ubuf69/pip-20.2.3-py2.py3-none-any.whl
Installing collected packages: setuptools, pip
  WARNING: The script easy_install-3.9 is installed in '/home/admin/.pyenv/versions/3.9.0/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The scripts pip3 and pip3.9 are installed in '/home/admin/.pyenv/versions/3.9.0/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed pip-20.2.3 setuptools-49.2.1

и пишет ошибку
либу ставлю но не помогает
 admin@shop:~$ sudo apt-get install openssl
Reading package lists... Done
Building dependency tree
Reading state information... Done
openssl is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
admin@shop:~$ sudo apt-get install libssl-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libssl-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

полез по ссылке https://github.com/pyenv/pyenv/wiki/Common-build-problems#error-the-python-ssl-extension-was-not-compiled-missing-the-openssl-lib
но те решения мне не помогли
даже предлагают скомпилить свою версию openssl но не компилится
 Test Summary Report
-------------------
../test/recipes/80-test_cms.t                    (Wstat: 1280 Tests: 6 Failed: 5)
  Failed tests:  1-5
  Non-zero exit status: 5
../test/recipes/80-test_ssl_new.t                (Wstat: 256 Tests: 29 Failed: 1)
  Failed test:  12
  Non-zero exit status: 1
Files=155, Tests=1465, 98 wallclock secs ( 1.42 usr  0.12 sys + 90.11 cusr  4.42 csys = 96.07 CPU)
Result: FAIL
make[1]: *** [_tests] Error 1
make[1]: Leaving directory `/home/admin/openssl-1.1.1g'
make: *** [tests] Error 2

у кого какие мысли будут?
ZerG
У тебя вроде стоит уже на сервере python3.6 судя по venv
попробуй для начала создать в папке с проектом
python3.6 -m venv .venv
если даст
source .venv/bin/activate
pip install -r requirements.txt
pitosh
уже нету python3.6
 python3.6
No command 'python3.6' found, did you mean:
 Command 'python3.4' from package 'python3.4-minimal' (main)
python3.6: command not found
стоял,потом начал глючить,я удалил его а теперь не могу поставить
  sudo apt-get  install python3.6
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package python3.6 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'python3.6' has no installation candidate
ZerG
apt-get install software-properties-common python-software-properties
sudo add-apt-repository -y ppa:jblgf0/python
sudo apt-get update
sudo apt-get install python3.6
pitosh
вот что получаю
W: Failed to fetch http://ppa.launchpad.net/jblgf0/python/ubuntu/dists/trusty/main/binary-i386/Packages 404 Not Found
ну и дальше
  apt-get install python3.6
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package python3.6 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
W: Ignoring Provides line with DepCompareOp for package python-cffi-backend-api-max
W: Ignoring Provides line with DepCompareOp for package python-cffi-backend-api-min
W: You may want to run apt-get update to correct these problems
E: Package 'python3.6' has no installation candidate
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB