while installing
1)pip install m3-libxml2-python getting below error
Looking in indexes: https://********:****@tr1.jfrog.io/tr1/api/pypi/pypi/simple
Collecting m3-libxml2-python
Using cached https://tr1.jfrog.io/tr1/api/pypi/pypi/packages/packages/73/39/a693515e3e8ef221498c2da975f76cc377d632ee7bb74b0028736963afc6/m3-libxml2-python-2.6.9.tar.gz (201 kB)
ERROR: Command errored out with exit status 1:
command: 'C:Users*******PycharmProjectshandsonvenvScriptspython.exe' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\*******\AppData\Local\Temp\pip-install-ztksvhrz\m3-libxml2-python_f044543e4ca140678bad250cf8feca47\setup.py'"'"'; __file__='"'"'C:\Users\6110412\AppData\Local\Temp\pip-install-ztksvhrz\m3-libxml2-python_f044543e4ca140678bad250cf8feca47\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:Users6110412AppDataLocalTemppip-pip-egg-info-evb7zv8_'
cwd: C:UsersempidAppDataLocalTemppip-install-ztksvhrzm3-libxml2-python_f044543e4ca140678bad250cf8feca47
Complete output (6 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:Users*******AppDataLocalTemppip-install-ztksvhrzm3-libxml2-python_f044543e4ca140678bad250cf8feca47setup.py", line 70
break;
^
TabError: inconsistent use of tabs and spaces in indentation
----------------------------------------
WARNING: Discarding https://tr1.jfrog.io/tr1/api/pypi/pypi/packages/packages/73/39/a693515e3e8ef221498c2da975f76cc377d632ee7bb74b0028736963afc6/m3-libxml2-python-2.6.9.tar.gz#sha256=7397cd24bbcbcd74a22d3e817d5f56510d07e823e41292efa6f56871fe0107b5 (from https://tr1.jfrog.io/tr1/api/pypi/pypi/simple/m3-libxml2-python/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement m3-libxml2-python (from versions: 2.6.9)
ERROR: No matching distribution found for m3-libxml2-python.
2)pip install libxml2-python
Looking in indexes: https://6110412:****@tr1.jfrog.io/tr1/api/pypi/pypi/simple
ERROR: Could not find a version that satisfies the requirement libxml2-python (from versions: none)
ERROR: No matching distribution found for libxml2-python.
3)pip install libxml2-python3
Looking in indexes: https://***:@tr1.jfrog.io/tr1/api/pypi/pypi/simple
Collecting libxml2-python3
Using cached https://tr1.jfrog.io/tr1/api/pypi/pypi/packages/packages/41/97/a2ecf6c5b291799dbd40b3d041d89b0ecdb1b43c8c2503e27991325851cd/libxml2-python3-2.9.5.tar.gz (216 kB)
ERROR: Command errored out with exit status 1:
command: 'C:Users*******PycharmProjectshandsonvenvScriptspython.exe' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\*******\AppData\Local\Temp\pip-install-al39ikfz\libxml2-python3_49a92dc4f1674927adaf10b6048d80a8\setup.py'"'"'; __file__='"'"'C:\Users\6110412\AppData\Local\Temp\pip-install-al39ikfz\libxml2-python3_49a92dc4f1674927adaf10b6048d80a8\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:Users6110412AppDataLocalTemppip-pip-egg-info-g8z9r58s'
cwd: C:Users*******AppDataLocalTemppip-install-al39ikfzlibxml2-python3_49a92dc4f1674927adaf10b6048d80a8
Complete output (1 lines):
failed to find headers for libxml2: update includes_dir
----------------------------------------
WARNING: Discarding https://tr1.jfrog.io/tr1/api/pypi/pypi/packages/packages/41/97/a2ecf6c5b291799dbd40b3d041d89b0ecdb1b43c8c2503e27991325851cd/libxml2-python3-2.9.5.tar.gz#sha256=51a6f863b639ce89cdfed32d58d9d37066301c373247f1c370b10d7edebe5e65 (from https://tr1.jfrog.io/tr1/api/pypi/pypi/simple/libxml2-python3/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement libxml2-python3 (from versions: 2.9.5)
ERROR: No matching distribution found for libxml2-python3
It would be grateful if anyone helps me.
687 / 293 / 54 Регистрация: 28.02.2013 Сообщений: 838 |
|
1 |
|
13.09.2022, 11:09. Показов 479. Ответов 12
Добрый день, пытаюсь в venv pycharm установить python-docx. Получаю ошибку: Кликните здесь для просмотра всего текста
Collecting docxtpl running build_ext —————————————- Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘NewConnectionError(‘<pip._vendor.urllib3.connecti on.VerifiedHTTPSConnection object at 0x0000020BD1DC71F0>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed’)’: /simple/docxtpl/ Я так понял ошибка из-за того что не ставится lxml: Пытаюсь ставить lxml, опять ошибка: лог ошибки: Кликните здесь для просмотра всего текста
Collecting lxml running build_ext —————————————- Command «C:python_projectuntitled2venvScriptspython.e xe -u -c «import setuptools, tokenize;__file__=’C:\Users\Konstantin_user\App Data\Local\Temp\pycharm-packaging\lxml\setup.py’;f=getattr(tokenize, ‘open’, open)(__file__);code=f.read().replace(‘rn’, ‘n’);f.close();exec(compile(code, __file__, ‘exec’))» install —record C:UsersKonstantin_userAppDataLocalTemppip-record-aejf5aorinstall-record.txt —single-version-externally-managed —compile —install-headers C:python_projectuntitled2venvincludesitepyth on3.8lxml» failed with error code 1 in C:UsersKonstantin_userAppDataLocalTemppychar m-packaginglxml Добавлено через 5 минут Кликните здесь для просмотра всего текста
C:UsersKonstantin_user>pip install docxtpl Добавлено через 2 минуты
0 |
3690 / 2270 / 491 Регистрация: 07.11.2019 Сообщений: 3,829 |
|
13.09.2022, 11:29 |
2 |
Попробуйте поставить именно из whl, а не tar.gz
1 |
687 / 293 / 54 Регистрация: 28.02.2013 Сообщений: 838 |
|
13.09.2022, 11:44 [ТС] |
3 |
Миниатюры
0 |
687 / 293 / 54 Регистрация: 28.02.2013 Сообщений: 838 |
|
13.09.2022, 11:46 [ТС] |
4 |
Ведь он же встал на базовый интерпретатор, а тут «is not a supported wheel on this platform.» С чего бы?(
0 |
3690 / 2270 / 491 Регистрация: 07.11.2019 Сообщений: 3,829 |
|
13.09.2022, 11:59 |
5 |
А если pip3 и добавить ключей -v -v -v для подробностей.
1 |
687 / 293 / 54 Регистрация: 28.02.2013 Сообщений: 838 |
|
13.09.2022, 12:35 [ТС] |
6 |
Python -V что выдает? Python 3.8.7 Добавлено через 1 минуту
А если pip3 и добавить ключей -v -v -v для подробностей. (venv) C:python_projectuntitled>pip3 -v-v-v Usage: no such option: — Может я не правильно понял = (
0 |
3690 / 2270 / 491 Регистрация: 07.11.2019 Сообщений: 3,829 |
|
13.09.2022, 12:53 |
7 |
Михалыч, pip3 -v -v -v install lxml..что-тотам.whl И еще что выводит pip list?
1 |
687 / 293 / 54 Регистрация: 28.02.2013 Сообщений: 838 |
|
13.09.2022, 13:03 [ТС] |
8 |
Такой вот лог: Кликните здесь для просмотра всего текста
(venv) C:python_projectuntitled>pip3 -v -v -v install lxml-4.9.1-cp38-cp38-win_amd64.whl Добавлено через 3 минуты
И еще что выводит pip list? (venv) C:python_projectuntitled>pip list Добавлено через 35 секунд
wheel там есть? Нет(
0 |
3690 / 2270 / 491 Регистрация: 07.11.2019 Сообщений: 3,829 |
|
13.09.2022, 13:06 |
9 |
А если поставить wheel?
1 |
687 / 293 / 54 Регистрация: 28.02.2013 Сообщений: 838 |
|
13.09.2022, 13:09 [ТС] |
10 |
И pip обновить предварительно А он не обновляется Кликните здесь для просмотра всего текста
Collecting pip==22.2.2 Exception: Добавлено через 54 секунды
А если поставить wheel? Просто его попробовал поставить, поставился. Но потом результат тот же Код (venv) C:python_projectuntitled1>pip install lxml-4.9.1-cp38-cp38-win_amd64.whl lxml-4.9.1-cp38-cp38-win_amd64.whl is not a supported wheel on this platform.
0 |
3690 / 2270 / 491 Регистрация: 07.11.2019 Сообщений: 3,829 |
|
13.09.2022, 13:28 |
11 |
можно еще почистить кэш.. Добавлено через 2 минуты
1 |
687 / 293 / 54 Регистрация: 28.02.2013 Сообщений: 838 |
|
13.09.2022, 13:33 [ТС] |
12 |
pip cache purge Спасибо, чуть позже попробую)
0 |
687 / 293 / 54 Регистрация: 28.02.2013 Сообщений: 838 |
|
13.09.2022, 21:40 [ТС] |
13 |
В общем проблему решил радикальными методами: Потом все переустановил, по новой. И заработало Добавлено через 3 минуты
1 |
On Python 3.11, installation fails with the following error.
$ p311 -m pip install lxml
Collecting lxml
Using cached lxml-4.8.0.tar.gz (3.2 MB)
Preparing metadata (setup.py) … done
Using legacy ‘setup.py install’ for lxml, since package ‘wheel’ is not installed.
Installing collected packages: lxml
Running setup.py install for lxml … error
error: subprocess-exited-with-error
× Running setup.py install for lxml did not run successfully.
│ exit code: 1
╰─> [125 lines of output]
Building lxml version 4.8.0.
Building without Cython.
Building against libxml2 2.9.4 and libxslt 1.1.29
running install
running build
running build_py
creating build
creating build/lib.macosx-12.3-arm64-3.11
creating build/lib.macosx-12.3-arm64-3.11/lxml
copying src/lxml/_elementpath.py -> build/lib.macosx-12.3-arm64-3.11/lxml
copying src/lxml/sax.py -> build/lib.macosx-12.3-arm64-3.11/lxml
copying src/lxml/pyclasslookup.py -> build/lib.macosx-12.3-arm64-3.11/lxml
copying src/lxml/__init__.py -> build/lib.macosx-12.3-arm64-3.11/lxml
copying src/lxml/builder.py -> build/lib.macosx-12.3-arm64-3.11/lxml
copying src/lxml/doctestcompare.py -> build/lib.macosx-12.3-arm64-3.11/lxml
copying src/lxml/usedoctest.py -> build/lib.macosx-12.3-arm64-3.11/lxml
copying src/lxml/cssselect.py -> build/lib.macosx-12.3-arm64-3.11/lxml
copying src/lxml/ElementInclude.py -> build/lib.macosx-12.3-arm64-3.11/lxml
creating build/lib.macosx-12.3-arm64-3.11/lxml/includes
copying src/lxml/includes/__init__.py -> build/lib.macosx-12.3-arm64-3.11/lxml/includes
creating build/lib.macosx-12.3-arm64-3.11/lxml/html
copying src/lxml/html/soupparser.py -> build/lib.macosx-12.3-arm64-3.11/lxml/html
copying src/lxml/html/defs.py -> build/lib.macosx-12.3-arm64-3.11/lxml/html
copying src/lxml/html/_setmixin.py -> build/lib.macosx-12.3-arm64-3.11/lxml/html
copying src/lxml/html/clean.py -> build/lib.macosx-12.3-arm64-3.11/lxml/html
copying src/lxml/html/_diffcommand.py -> build/lib.macosx-12.3-arm64-3.11/lxml/html
copying src/lxml/html/html5parser.py -> build/lib.macosx-12.3-arm64-3.11/lxml/html
copying src/lxml/html/__init__.py -> build/lib.macosx-12.3-arm64-3.11/lxml/html
copying src/lxml/html/formfill.py -> build/lib.macosx-12.3-arm64-3.11/lxml/html
copying src/lxml/html/builder.py -> build/lib.macosx-12.3-arm64-3.11/lxml/html
copying src/lxml/html/ElementSoup.py -> build/lib.macosx-12.3-arm64-3.11/lxml/html
copying src/lxml/html/_html5builder.py -> build/lib.macosx-12.3-arm64-3.11/lxml/html
copying src/lxml/html/usedoctest.py -> build/lib.macosx-12.3-arm64-3.11/lxml/html
copying src/lxml/html/diff.py -> build/lib.macosx-12.3-arm64-3.11/lxml/html
creating build/lib.macosx-12.3-arm64-3.11/lxml/isoschematron
copying src/lxml/isoschematron/__init__.py -> build/lib.macosx-12.3-arm64-3.11/lxml/isoschematron
copying src/lxml/etree.h -> build/lib.macosx-12.3-arm64-3.11/lxml
copying src/lxml/etree_api.h -> build/lib.macosx-12.3-arm64-3.11/lxml
copying src/lxml/lxml.etree.h -> build/lib.macosx-12.3-arm64-3.11/lxml
copying src/lxml/lxml.etree_api.h -> build/lib.macosx-12.3-arm64-3.11/lxml
copying src/lxml/includes/xmlerror.pxd -> build/lib.macosx-12.3-arm64-3.11/lxml/includes
copying src/lxml/includes/c14n.pxd -> build/lib.macosx-12.3-arm64-3.11/lxml/includes
copying src/lxml/includes/xmlschema.pxd -> build/lib.macosx-12.3-arm64-3.11/lxml/includes
copying src/lxml/includes/__init__.pxd -> build/lib.macosx-12.3-arm64-3.11/lxml/includes
copying src/lxml/includes/schematron.pxd -> build/lib.macosx-12.3-arm64-3.11/lxml/includes
copying src/lxml/includes/tree.pxd -> build/lib.macosx-12.3-arm64-3.11/lxml/includes
copying src/lxml/includes/uri.pxd -> build/lib.macosx-12.3-arm64-3.11/lxml/includes
copying src/lxml/includes/etreepublic.pxd -> build/lib.macosx-12.3-arm64-3.11/lxml/includes
copying src/lxml/includes/xpath.pxd -> build/lib.macosx-12.3-arm64-3.11/lxml/includes
copying src/lxml/includes/htmlparser.pxd -> build/lib.macosx-12.3-arm64-3.11/lxml/includes
copying src/lxml/includes/xslt.pxd -> build/lib.macosx-12.3-arm64-3.11/lxml/includes
copying src/lxml/includes/config.pxd -> build/lib.macosx-12.3-arm64-3.11/lxml/includes
copying src/lxml/includes/xmlparser.pxd -> build/lib.macosx-12.3-arm64-3.11/lxml/includes
copying src/lxml/includes/xinclude.pxd -> build/lib.macosx-12.3-arm64-3.11/lxml/includes
copying src/lxml/includes/dtdvalid.pxd -> build/lib.macosx-12.3-arm64-3.11/lxml/includes
copying src/lxml/includes/relaxng.pxd -> build/lib.macosx-12.3-arm64-3.11/lxml/includes
copying src/lxml/includes/lxml-version.h -> build/lib.macosx-12.3-arm64-3.11/lxml/includes
copying src/lxml/includes/etree_defs.h -> build/lib.macosx-12.3-arm64-3.11/lxml/includes
creating build/lib.macosx-12.3-arm64-3.11/lxml/isoschematron/resources
creating build/lib.macosx-12.3-arm64-3.11/lxml/isoschematron/resources/rng
copying src/lxml/isoschematron/resources/rng/iso-schematron.rng -> build/lib.macosx-12.3-arm64-3.11/lxml/isoschematron/resources/rng
creating build/lib.macosx-12.3-arm64-3.11/lxml/isoschematron/resources/xsl
copying src/lxml/isoschematron/resources/xsl/XSD2Schtrn.xsl -> build/lib.macosx-12.3-arm64-3.11/lxml/isoschematron/resources/xsl
copying src/lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl -> build/lib.macosx-12.3-arm64-3.11/lxml/isoschematron/resources/xsl
creating build/lib.macosx-12.3-arm64-3.11/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_abstract_expand.xsl -> build/lib.macosx-12.3-arm64-3.11/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_dsdl_include.xsl -> build/lib.macosx-12.3-arm64-3.11/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_skeleton_for_xslt1.xsl -> build/lib.macosx-12.3-arm64-3.11/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_svrl_for_xslt1.xsl -> build/lib.macosx-12.3-arm64-3.11/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_message.xsl -> build/lib.macosx-12.3-arm64-3.11/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt -> build/lib.macosx-12.3-arm64-3.11/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
warning: build_py: byte-compiling is disabled, skipping.
running build_ext
building ‘lxml.etree’ extension
creating build/temp.macosx-12.3-arm64-3.11
creating build/temp.macosx-12.3-arm64-3.11/src
creating build/temp.macosx-12.3-arm64-3.11/src/lxml
clang -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include -I/usr/local/opt/llvm/include -DCYTHON_CLINE_IN_TRACEBACK=0 -Isrc -Isrc/lxml/includes -I/Users/chillaranand/.pyenv/versions/3.11-dev/include/python3.11 -c src/lxml/etree.c -o build/temp.macosx-12.3-arm64-3.11/src/lxml/etree.o -w -flat_namespace
src/lxml/etree.c:265439:14: error: incomplete definition of type ‘struct _frame’
f->f_back = PyThreadState_GetFrame(tstate);
~^
/Users/chillaranand/.pyenv/versions/3.11-dev/include/python3.11/pytypedefs.h:22:16: note: forward declaration of ‘struct _frame’
typedef struct _frame PyFrameObject;
^
src/lxml/etree.c:265476:19: error: incomplete definition of type ‘struct _frame’
Py_CLEAR(f->f_back);
~^
/Users/chillaranand/.pyenv/versions/3.11-dev/include/python3.11/object.h:564:44: note: expanded from macro ‘Py_CLEAR’
PyObject *_py_tmp = _PyObject_CAST(op);
^~
/Users/chillaranand/.pyenv/versions/3.11-dev/include/python3.11/object.h:107:41: note: expanded from macro ‘_PyObject_CAST’
#define _PyObject_CAST(op) ((PyObject*)(op))
^~
/Users/chillaranand/.pyenv/versions/3.11-dev/include/python3.11/pytypedefs.h:22:16: note: forward declaration of ‘struct _frame’
typedef struct _frame PyFrameObject;
^
src/lxml/etree.c:265476:19: error: incomplete definition of type ‘struct _frame’
Py_CLEAR(f->f_back);
~^
/Users/chillaranand/.pyenv/versions/3.11-dev/include/python3.11/object.h:566:14: note: expanded from macro ‘Py_CLEAR’
(op) = NULL;
^~
/Users/chillaranand/.pyenv/versions/3.11-dev/include/python3.11/pytypedefs.h:22:16: note: forward declaration of ‘struct _frame’
typedef struct _frame PyFrameObject;
^
src/lxml/etree.c:268244:5: error: incomplete definition of type ‘struct _frame’
__Pyx_PyFrame_SetLineNumber(py_frame, py_line);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/lxml/etree.c:528:62: note: expanded from macro ‘__Pyx_PyFrame_SetLineNumber’
#define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
~~~~~~~^
/Users/chillaranand/.pyenv/versions/3.11-dev/include/python3.11/pytypedefs.h:22:16: note: forward declaration of ‘struct _frame’
typedef struct _frame PyFrameObject;
^
4 errors generated.
Compile failed: command ‘/usr/bin/clang’ failed with exit code 1
creating var
creating var/folders
creating var/folders/vb
creating var/folders/vb/3wyl_42s4x1_z_7swgpq9xr40000gq
creating var/folders/vb/3wyl_42s4x1_z_7swgpq9xr40000gq/T
cc -I/usr/include/libxml2 -c /var/folders/vb/3wyl_42s4x1_z_7swgpq9xr40000gq/T/xmlXPathInith1ed9w04.c -o var/folders/vb/3wyl_42s4x1_z_7swgpq9xr40000gq/T/xmlXPathInith1ed9w04.o
cc var/folders/vb/3wyl_42s4x1_z_7swgpq9xr40000gq/T/xmlXPathInith1ed9w04.o -lxml2 -o a.out
error: command ‘/usr/bin/clang’ failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> lxml
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.