Posted 23 hours ago23 hr I am trying to compile Unlicensehttps://github.com/ergrelet/unlicense I've installed vs_BuildTools.exe VS 2022However when I run:pip install git+https://github.com/ergrelet/unlicense.gitI get:https://ibb.co/BKPT5MHf How to fix the above error? Edited 23 hours ago23 hr by CodeExplorer
18 hours ago18 hr Unfortunately you didn't include the entire command-line and the whole log. In general, this VS error indicates that VS cannot find the required include files. You either didn't run it from the "Developer command prompt for VS 2022" OR you don't have the the correct SDKs of Visual Studio installed, OR the PATH variable is borked in some way..There are several workarounds:Option A: use a Python version from that time period. In my tests Python v3.9 works out of the box and doesn't even need VS Build Tools.Option B: change version requirements for the project:1) make a folder for unlicense, say c:\projects\unlicense2) open command prompt, change to that folder and clone the unlicense repo there: git clone https://github.com/ergrelet/unlicense.git . Or just download ZIP and unpack it into that folder.3) edit pyproject.toml to change versions of python packages. For you, the most important is the xxhash version, pick one where there is a pre-compiled wheel file available for your version of Python. I'd use "^3.6" there, it seems to be compatible. If that does not work, try "^3.1", that's the oldest version with a pre-built v3.11 wheel. That should be enough for you.4) run pip install . - it should run build process, find the pre-built packages in PyPI and happily use them, instead of compiling xxhash from source.Option C: try installing/building xxhash package and figure out what went wrong. Ain't got no time for that.. Edited 17 hours ago17 hr by kao
16 hours ago16 hr Author Many thanks. Python v3.9 did the trick.Other command line I have to run:pip install poetrypip install yapfpoetry run unlicenseinstead ofpoetry run yapf -r -d unlicense
2 hours ago2 hr Author And here is my first fix: fixed jmp dword ptr [import thunk]on old version was wrongly fixed by call dword ptr. imports_fixed1.rar
Create an account or sign in to comment