Cannot install lxml - python

When I'm trying to install lxml just like pip install lxml I'm getting an error " Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?".
I found a similar issue Getting "Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?" when installing lxml through pip, but when I'm trying to solve the problem following that advice I'm getting another error lxml-4.5.2-cp38-cp38-win_amd64.whl is not a supported wheel on this platform. The path to the wheel is D:\whl\lxml-4.5.2-cp38-cp38-win_amd64.whl
Using Python 3.8.1 under Windows 10 x64

I`ve solved the problem!
The error occurred in PyCharm editor. Then I tried to install lxml in VS Code editor and it was done successfully. IDK why the problem occurred, but after reinstalling PyCharm everything was OK
BTW if reinstalling didn't help, try to follow advice by Ethan in the comments

Related

ERROR: failed building wheel when installing spectral-cube (astropy)

I'm trying to install the package spectral-cube from the astropy project using pip (22.0.4). I get a long error which ends with this:
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for casa-formats-io.
Failed to build casa-formats-io.
ERROR: Could not build wheels for casa-formats-io, which is required to install pyproject.toml-based projects
Even after downloading casa-formats-io from their github I still get this error.
I've also tried installing this using conda, but the error is the same.
I'm using MacOS 12.3. But I had the problem with older versions.
I'm kind of confused as to what I can do.
Thanks for the help!
I was able to fix my own problem. The error appeared because the package I was trying to download wasn't available/compatible with the newest python version (3.10). So, I simply uninstalled Python and downloaded an older version (3.8).
Thanks anyways :)

Error installing pyQt5: error: metadata-generation-failed

I was tring to install PyQt5 and a get this error:
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
I've tried using brew install pyqt and installing pyqt6 went out just fine. What's wrong.
Ok, I faced this issue with python 3.10.4 and after searching I found two solutions for this problem because this problem not being only with turtle but for other libraries.
#Note: These solutions for downloading any library if you have a problem mentioned above and this problem faced me in windows CMD.
So you could try this way:
pip install <libraryName>==0.0.1
0.0.1 This is the last version of the library so you should find the version of the library that you want to install for this purpose, you can find the version of the library using this command:
pip show module <name_of_the_library>
another solution that could work is using --use-deprecated=backtrack-on-build-failures
Example:
pip install turtle --use-deprecated=backtrack-on-build-failures
Hope to help you.

Debugging Installing LXML for Python 2.x on Windows

I have absolutely no experience programming Python, but I'm trying to set up some modules to implement this project, and am seriously struggling with lxml. I've hunted through a lot of help forums trying to figure out how to go about getting lxml set up, and none of the solutions have helped so far.
Things I've tried:
Downloading the lxml file from this website. I'm running Python 2.7.9, and have tried using both cp27 files from that website. Both give me the same message:
lxml-4.3.3-cp27-cp27m-win_amd64.whl is not a supported wheel on this platform.
After more hunting, it seemed like the command:
python -m pip install lxml
should be a viable alternative. However, this leads to these error messages (not the full output for space conservation, but this struck me as the relevant parts) :
c:\users\aeon~1.wil\appdata\local\temp\xmlXPathInityhhfkk.c(1) : fatal error C1083: Cannot open include file: 'libxml/xpath.h': No such file or directory
*********************************************************************************
Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
*********************************************************************************
error: command 'C:\\Users\\aeon.williams\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\cl.exe' failed with exit status 2
I downloaded the libxml2 wheel from here, and ran the ...cp27-none-win32.whl successfully. I tried to run python -m pip install lxml again after this, but still got the same error message.
I'm sure I'm struggling because of how little I understand Python modules and pip, but I'm not exactly sure what direction to go in now to try to get lxml working on my computer. If anyone has any suggestions, please let me know!

Having trouble with PyEnchant installation on El Capitan

It's possible I should just open this is an issue on the Enchant package, but it could definitely be something I'm missing too. I'm using El Capitan and python 2.7. I tried a few things:
pip install penchant seems to successfully install pyenchant-1.6.6, but when I try to import enchant I get the error ImportError: The 'enchant' C library was not found. Please install it via your OS package manager, or use a pre-built binary wheel from PyPI. I followed the advice here and upgraded pip.
I followed the advice here and started with brew install enchant, but that gave the error
curl: (22) The requested URL returned error: 404 Not Found
Error: Failed to download resource "glib--patch"
Download failed: https://gist.githubusercontent.com/jacknagel/af332f42fae80c570a77/raw/7b5fd0d2e6554e9b770729fddacaa2d648327644/glib-hardcoded-paths.diff
I also downloaded the wheel here (second-to-last link) and tried to pip install it, but got the error that it is not a supported wheel on this platform.
Thoughts? Thanks.

Installing Scrapy on windows 7 with python 2.7.3 gives error

easy_install scarpy on command prompt says scrapy is not a recognized archive type. Help!
Error Message: "error: Not a recognized archive type: Scrapy"
Unfortunately, a few dependencies of scrapy won't installed automatically from easy_install and you have to do it manually.
Install binary version of Twisted
install binary version of lxml
install Scrapy
Hope that this will solve your error message. If not, check this google group discussion with someone that had the same problem as you.

Categories