basketball_reference_web_scraper icon indicating copy to clipboard operation
basketball_reference_web_scraper copied to clipboard

Installation failed

Open Johnzav888 opened this issue 2 years ago • 3 comments

Hello,

I have a problem with the installation of the package. I used it smoothly some months ago, but now i got a new laptop and when i am trying to install it, i get an error, both in PyCharm and in cmd ( I assume something is wrong with the lxml package...)

 ERROR: Command errored out with exit status 1:
     command: 'c:\users\i.zavrakidis\appdata\local\programs\python\python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\i.zavrakidis\\AppData\\Local\\Temp\\pip-install-dle_ftub\\lxml_89a5d7c7ae6d4a2ca25924a2db6d7a74\\setup.py'"'"'; __file__='"'"'C:\\Users\\i.zavrakidis\\AppData\\Local\\Temp\\pip-install-dle_ftub\\lxml_89a5d7c7ae6d4a2ca25924a2db6d7a74\\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('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\i.zavrakidis\AppData\Local\Temp\pip-record-iicqzp4d\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\i.zavrakidis\appdata\local\programs\python\python39\Include\lxml'. 

I have upgraded pip to the latest version.

Any ideas why is this happening and how to overcome it ?

Thanks, John

Johnzav888 avatar Sep 06 '21 07:09 Johnzav888

This is happening to me as well. Any update from anyone?

potterhawk avatar Dec 02 '21 03:12 potterhawk

Any update? I'm getting this as well..........

eternal-padawan avatar Jan 12 '22 23:01 eternal-padawan

I guess that's caused by incompatible version of the package lxml and your python. As written in the requirement file, we need version 4.5.1 for lxml package. However, if you check the lxml-python-version, you can see that lxml version 4.5.1 only supports up to python 3.6. So if you are using python with higer version, you might have problem installing the lxml 4.5.1, then this package.

The following worked for me:

Since the lxml package wasn't changed a lot from version to version, we can use higher version instead as prerequisite for this package. So, just simply install lxml with pip install lxml. Then download the source file of this package from pyPI the user presented, or click here. Unzip it and move into the directory. Open the setup.py file and change the requirement lxml==4.5.1 to lxml==4.8.0 (the version you installed, for me is 4.8.0). Then save it, run python setup.py install. And you will see the package could successfully installed.

Frank-LSY avatar May 23 '22 07:05 Frank-LSY

Yeah, apologies with the delayed response, but this should be resolved with the 4.13.1 release.

Please reopen if you continue to see this problem.

jaebradley avatar Apr 03 '24 01:04 jaebradley