-
Notifications
You must be signed in to change notification settings - Fork 6
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
Cannot compile the code in Windows #28
Comments
Hey @KatyDager ! |
Hi! File "path of the calc.py file", line 276, in File "C:\Users\user\anaconda3\lib\site-packages\bison_init_.py", line 270, in init File "src/bison/cython/bison_.pyx", line 139, in bison.bison_.ParserEngine.init File "src/bison/cython/bison_.pyx", line 177, in bison.bison_.ParserEngine.openCurrentLib File "src/bison/cython/bison_.pyx", line 645, in bison.bison_.ParserEngine.buildLib Exception: b'The system cannot find the path specified.\r\n' When I tried using python -c "import bison" to check if the installation succeeded I get an invalid syntax error. The pybison package is installed tho. Thank you for answering! |
It looks like your are missing bison/flex on windows, you can use chocolatey to install those packages, e.g. choco install mingw # mingw is a dependency, if I remember correctly
choco install winflexbison3 --version=2.5.18.20190508 # depending the lexer/grammar code, you need to use the appropiate version, like so You can check the installed version with Hope this helps! |
Thank you a lot! I already had bison and flex installed (from their websites) and I installed them using chocolately. File "C:\Users\user\anaconda3\lib\distutils_msvccompiler.py", line 412, in compile File "C:\Users\user\anaconda3\lib\distutils_msvccompiler.py", line 518, in spawn File "C:\Users\user\anaconda3\lib\distutils\ccompiler.py", line 910, in spawn File "C:\Users\user\anaconda3\lib\distutils\spawn.py", line 38, in spawn File "C:\Users\user\anaconda3\lib\distutils\spawn.py", line 80, in _spawn_nt DistutilsExecError: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\bin\HostX86\x64\cl.exe' failed with exit status 2 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "calc1.py", line 276, in File "C:\Users\user\anaconda3\lib\site-packages\bison_init_.py", line 270, in init File "src/bison/cython/bison_.pyx", line 139, in bison.bison_.ParserEngine.init File "src/bison/cython/bison_.pyx", line 177, in bison.bison_.ParserEngine.openCurrentLib File "src/bison/cython/bison_.pyx", line 715, in bison.bison_.ParserEngine.buildLib File "C:\Users\user\anaconda3\lib\distutils_msvccompiler.py", line 414, in compile CompileError: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\bin\HostX86\x64\cl.exe' failed with exit status 2 Thank you a lot for your help! |
It looks like MSVC has a problem compiling the cython / C files in the project. |
Hello! I have tried to run the calc.py and calc1.py on my Windows OS, but I have encountered a problem.
The error I am getting is: Exception: b'The system cannot find the path specified.\r\n'
Do you have any idea why?
Thank you!
Best regards
The text was updated successfully, but these errors were encountered: