Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CounterFit installation issue #18

Open
anilkeshaw opened this issue Jan 4, 2023 · 4 comments
Open

CounterFit installation issue #18

anilkeshaw opened this issue Jan 4, 2023 · 4 comments

Comments

@anilkeshaw
Copy link

anilkeshaw commented Jan 4, 2023

Hi,

I'm trying to set up the CounterFit app however, getting the following error, and unable to proceed. I'm not sure if this is something related to the packages or python version it doesn't support.

Could you please see the below error snapshot and advise.

OS: Windows 10
Python Version : 3.11

(.venv) PS C:\nightlight> pip install CounterFit
Collecting CounterFit
Using cached CounterFit-0.1.4.dev6-py3-none-any.whl (119 kB)
Collecting Flask==2.1.2
Using cached Flask-2.1.2-py3-none-any.whl (95 kB)
Collecting Flask-SocketIO==5.2.0
Using cached Flask_SocketIO-5.2.0-py3-none-any.whl (17 kB)
Collecting eventlet==0.33.1
Using cached eventlet-0.33.1-py2.py3-none-any.whl (226 kB)
Collecting beautifulsoup4==4.9.3
Using cached beautifulsoup4-4.9.3-py3-none-any.whl (115 kB)
Collecting lxml==4.6.4
Using cached lxml-4.6.4.tar.gz (3.2 MB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: soupsieve>1.2 in c:\nightlight.venv\lib\site-packages (from beautifulsoup4==4.9.3->CounterFit) (2.3.2.post1)
Collecting dnspython>=1.15.0
Using cached dnspython-2.2.1-py3-none-any.whl (269 kB)
Collecting greenlet>=0.3
Using cached greenlet-2.0.1-cp311-cp311-win_amd64.whl (191 kB)
Requirement already satisfied: six>=1.10.0 in c:\nightlight.venv\lib\site-packages (from eventlet==0.33.1->CounterFit) (1.16.0)
Collecting Werkzeug>=2.0
Using cached Werkzeug-2.2.2-py3-none-any.whl (232 kB)
Collecting Jinja2>=3.0
Using cached Jinja2-3.1.2-py3-none-any.whl (133 kB)
Collecting itsdangerous>=2.0
Using cached itsdangerous-2.1.2-py3-none-any.whl (15 kB)
Collecting click>=8.0
Using cached click-8.1.3-py3-none-any.whl (96 kB)
Collecting python-socketio>=5.0.2
Using cached python_socketio-5.7.2-py3-none-any.whl (56 kB)
Collecting colorama
Using cached colorama-0.4.6-py2.py3-none-any.whl (25 kB)
Requirement already satisfied: MarkupSafe>=2.0 in c:\nightlight.venv\lib\site-packages (from Jinja2>=3.0->Flask==2.1.2->CounterFit) (2.1.1)
Collecting bidict>=0.21.0
Using cached bidict-0.22.1-py3-none-any.whl (35 kB)
Requirement already satisfied: python-engineio>=4.3.0 in c:\nightlight.venv\lib\site-packages (from python-socketio>=5.0.2->Flask-SocketIO==5.2.0->CounterFit) (4.3.4)
Installing collected packages: Werkzeug, lxml, Jinja2, itsdangerous, greenlet, dnspython, colorama, bidict, beautifulsoup4, python-socketio, eventlet, click, Flask, Flask-SocketIO, CounterFit
DEPRECATION: lxml is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at pypa/pip#8559
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
╰─> [96 lines of output]
Building lxml version 4.6.4.
Building without Cython.
Building against pre-built libxml2 andl libxslt libraries
running install
C:\nightlight.venv\Lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-311
creating build\lib.win-amd64-cpython-311\lxml
copying src\lxml\builder.py -> build\lib.win-amd64-cpython-311\lxml
copying src\lxml\cssselect.py -> build\lib.win-amd64-cpython-311\lxml
copying src\lxml\doctestcompare.py -> build\lib.win-amd64-cpython-311\lxml
copying src\lxml\ElementInclude.py -> build\lib.win-amd64-cpython-311\lxml
copying src\lxml\pyclasslookup.py -> build\lib.win-amd64-cpython-311\lxml
copying src\lxml\sax.py -> build\lib.win-amd64-cpython-311\lxml
copying src\lxml\usedoctest.py -> build\lib.win-amd64-cpython-311\lxml
copying src\lxml_elementpath.py -> build\lib.win-amd64-cpython-311\lxml
copying src\lxml_init_.py -> build\lib.win-amd64-cpython-311\lxml
creating build\lib.win-amd64-cpython-311\lxml\includes
copying src\lxml\includes_init_.py -> build\lib.win-amd64-cpython-311\lxml\includes
creating build\lib.win-amd64-cpython-311\lxml\html
copying src\lxml\html\builder.py -> build\lib.win-amd64-cpython-311\lxml\html
copying src\lxml\html\clean.py -> build\lib.win-amd64-cpython-311\lxml\html
copying src\lxml\html\defs.py -> build\lib.win-amd64-cpython-311\lxml\html
copying src\lxml\html\diff.py -> build\lib.win-amd64-cpython-311\lxml\html
copying src\lxml\html\ElementSoup.py -> build\lib.win-amd64-cpython-311\lxml\html
copying src\lxml\html\formfill.py -> build\lib.win-amd64-cpython-311\lxml\html
copying src\lxml\html\html5parser.py -> build\lib.win-amd64-cpython-311\lxml\html
copying src\lxml\html\soupparser.py -> build\lib.win-amd64-cpython-311\lxml\html
copying src\lxml\html\usedoctest.py -> build\lib.win-amd64-cpython-311\lxml\html
copying src\lxml\html_diffcommand.py -> build\lib.win-amd64-cpython-311\lxml\html
copying src\lxml\html_html5builder.py -> build\lib.win-amd64-cpython-311\lxml\html
copying src\lxml\html_setmixin.py -> build\lib.win-amd64-cpython-311\lxml\html
copying src\lxml\html_init_.py -> build\lib.win-amd64-cpython-311\lxml\html
creating build\lib.win-amd64-cpython-311\lxml\isoschematron
copying src\lxml\isoschematron_init_.py -> build\lib.win-amd64-cpython-311\lxml\isoschematron
copying src\lxml\etree.h -> build\lib.win-amd64-cpython-311\lxml
copying src\lxml\etree_api.h -> build\lib.win-amd64-cpython-311\lxml
copying src\lxml\lxml.etree.h -> build\lib.win-amd64-cpython-311\lxml
copying src\lxml\lxml.etree_api.h -> build\lib.win-amd64-cpython-311\lxml
copying src\lxml\includes\c14n.pxd -> build\lib.win-amd64-cpython-311\lxml\includes
copying src\lxml\includes\config.pxd -> build\lib.win-amd64-cpython-311\lxml\includes
copying src\lxml\includes\dtdvalid.pxd -> build\lib.win-amd64-cpython-311\lxml\includes
copying src\lxml\includes\etreepublic.pxd -> build\lib.win-amd64-cpython-311\lxml\includes
copying src\lxml\includes\htmlparser.pxd -> build\lib.win-amd64-cpython-311\lxml\includes
copying src\lxml\includes\relaxng.pxd -> build\lib.win-amd64-cpython-311\lxml\includes
copying src\lxml\includes\schematron.pxd -> build\lib.win-amd64-cpython-311\lxml\includes
copying src\lxml\includes\tree.pxd -> build\lib.win-amd64-cpython-311\lxml\includes
copying src\lxml\includes\uri.pxd -> build\lib.win-amd64-cpython-311\lxml\includes
copying src\lxml\includes\xinclude.pxd -> build\lib.win-amd64-cpython-311\lxml\includes
copying src\lxml\includes\xmlerror.pxd -> build\lib.win-amd64-cpython-311\lxml\includes
copying src\lxml\includes\xmlparser.pxd -> build\lib.win-amd64-cpython-311\lxml\includes
copying src\lxml\includes\xmlschema.pxd -> build\lib.win-amd64-cpython-311\lxml\includes
copying src\lxml\includes\xpath.pxd -> build\lib.win-amd64-cpython-311\lxml\includes
copying src\lxml\includes\xslt.pxd -> build\lib.win-amd64-cpython-311\lxml\includes
copying src\lxml\includes_init_.pxd -> build\lib.win-amd64-cpython-311\lxml\includes
copying src\lxml\includes\etree_defs.h -> build\lib.win-amd64-cpython-311\lxml\includes
copying src\lxml\includes\lxml-version.h -> build\lib.win-amd64-cpython-311\lxml\includes
creating build\lib.win-amd64-cpython-311\lxml\isoschematron\resources
creating build\lib.win-amd64-cpython-311\lxml\isoschematron\resources\rng
copying src\lxml\isoschematron\resources\rng\iso-schematron.rng -> build\lib.win-amd64-cpython-311\lxml\isoschematron\resources\rng
creating build\lib.win-amd64-cpython-311\lxml\isoschematron\resources\xsl
copying src\lxml\isoschematron\resources\xsl\RNG2Schtrn.xsl -> build\lib.win-amd64-cpython-311\lxml\isoschematron\resources\xsl
copying src\lxml\isoschematron\resources\xsl\XSD2Schtrn.xsl -> build\lib.win-amd64-cpython-311\lxml\isoschematron\resources\xsl
creating build\lib.win-amd64-cpython-311\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_abstract_expand.xsl -> build\lib.win-amd64-cpython-311\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_dsdl_include.xsl -> build\lib.win-amd64-cpython-311\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schematron_message.xsl -> build\lib.win-amd64-cpython-311\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_schematron_skeleton_for_xslt1.xsl -> build\lib.win-amd64-cpython-311\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\iso_svrl_for_xslt1.xsl -> build\lib.win-amd64-cpython-311\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\readme.txt -> build\lib.win-amd64-cpython-311\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
running build_ext
building 'lxml.etree' extension
creating build\temp.win-amd64-cpython-311
creating build\temp.win-amd64-cpython-311\Release
creating build\temp.win-amd64-cpython-311\Release\src
creating build\temp.win-amd64-cpython-311\Release\src\lxml
"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DCYTHON_CLINE_IN_TRACEBACK=0 -Isrc -Isrc\lxml\includes -IC:\nightlight.venv\include -IC:\Users\anil.mishra\AppData\Local\Programs\Python\Python311\include -IC:\Users\anil.mishra\AppData\Local\Programs\Python\Python311\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /Tcsrc\lxml\etree.c /Fobuild\temp.win-amd64-cpython-311\Release\src\lxml\etree.obj -w
cl : Command line warning D9025 : overriding '/W3' with '/w'
etree.c
src\lxml\etree.c(288): fatal error C1083: Cannot open include file: 'longintrepr.h': No such file or directory
Compile failed: command 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\bin\HostX86\x64\cl.exe' failed with exit code 2
creating Users
creating Users\ANIL1.MIS
creating Users\ANIL
1.MIS\AppData
creating Users\ANIL1.MIS\AppData\Local
creating Users\ANIL
1.MIS\AppData\Local\Temp
"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -I/usr/include/libxml2 "-IC:\Program Files (x86)\Microsoft Visual
Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /TcC:\Users\ANIL1.MIS\AppData\Local\Temp\xmlXPathInitmxxtxnre.c /FoUsers\ANIL1.MIS\AppData\Local\Temp\xmlXPathInitmxxtxnre.obj
xmlXPathInitmxxtxnre.c
C:\Users\ANIL~1.MIS\AppData\Local\Temp\xmlXPathInitmxxtxnre.c(1): fatal error C1083: Cannot open include
file: 'libxml/xpath.h': No such file or directory
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\bin\HostX86\x64\cl.exe' failed with exit code 2
*********************************************************************************
Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
*********************************************************************************
[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.

Thanks

@jimbobbennett
Copy link

Looks like on Windows you need to install libxml2. I've updated the README with instructions on how to do it, as well as updating CounterFit to have a dependency on a later version of this library.

Essentially:

  1. Download the wheel for lxml 4.9 from the Unofficial Windows Binaries for Python Extension Packages page
  2. Manually install this downloaded wheel with pip
  3. Install CounterFit as before

Let me know if the new steps work.

@tosinosu
Copy link

tosinosu commented Jan 26, 2023

Windows: 10
Python Version: Python 3.7.9

The solution didn't work for me. I tried to install different versions but still got the same error. See the error message below

pip install lxml-4.9.0-cp39-cp39-win_amd64.whl
ERROR: lxml-4.9.0-cp39-cp39-win_amd64.whl is not a supported wheel on this platform.

pip install lxml-4.9.0-pp38-pypy38_pp73-win_amd64.whl
ERROR: lxml-4.9.0-pp38-pypy38_pp73-win_amd64.whl is not a supported wheel on this platform.

@shubhushan49
Copy link

Hi, I had a similar problem. I first installed the eventlet package from pip and it worked fine. CounterFit will give you some errors regarding the eventlet version, you can simply ignore it.

@jimbobbennett
Copy link

@tosinosu - can you try with the latest version. I've removed the dependency on libxml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants