-
Notifications
You must be signed in to change notification settings - Fork 53
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
Building wheel for dubins (setup.py) ... error #16
Comments
@fzdm2005 did you ever get a resolution for this? I just ran into the same problem Edit: nevermind, it seems that my error was slightly different but also occurred when trying to pip install dubins. My error ended up being:
To workaround my error, I downgraded my python from 3.9 to 3.8. Related thread here: https://bugzilla.redhat.com/show_bug.cgi?id=1791745 |
An alternative solution is to install the package from source if you want to avoid downgrading python, i.e.
|
@rdesc Edit: Just figured it out. All you need is to append your path to dubins package
|
As an update. I tried to make this work with python 3.9 and came across the following error Error compiling Cython file:
------------------------------------------------------------
...
ts = []
def f(q, t):
qs.append(q)
ts.append(t)
return 0
core.dubins_path_sample_many(self.ppth, step_size, callback, <void*>f)
^
------------------------------------------------------------
dubins/dubins.pyx:123:59: Cannot assign type 'int (double *, double, void *) except? -1' to 'DubinsPathSamplingCallback'. Exception values are incompatible. Suggest adding 'noexcept' to type 'int (double *, double, void *) except? -1'. Simple fix is change this line Line 35 in 4ee7e76
To the following: ctypedef int (*DubinsPathSamplingCallback)(double q[3], double t, void* user_data) except? -1 And then building with cython |
Forked the repo with a working binary for Python 3.9 https://github.com/rdesc/pydubins Should be able to install with 1 command now
|
I have tested the fork of @rdesc and it works also with python3.10 and python3.11. I have not tested python3.12 @AndrewWalker would it be a good idea to merge @rdesc fork into this repo so newer python versions are supported? |
Oh nice, thats good to hear! I'll update the readme on the fork. I don't think the owner of this repo is responsive. |
@rdesc Thanks for your fork! It works for me using Python 3.10. Is it possible to publish the new package to pip somehow? |
Great! Hmm that's a good idea actually. Then we could even merge some of the other fixes people have found. Maybe we could call it dubins2 or something. |
@CAI006 hmm I haven't tried this in Windows but it seems like the error is coming from Microsoft visual studio from the screenshot ? |
C:\Users\Administrator>pip install C:\dubins-1.0.1.tar
Processing c:\dubins-1.0.1.tar
Building wheels for collected packages: dubins
Building wheel for dubins (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\administrator\appdata\local\programs\python\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Administrator\AppData\Local\Temp\pip-req-build-skffgh_w\setup.py'"'"'; file='"'"'C:\Users\Administrator\AppData\Local\Temp\pip-req-build-skffgh_w\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\Administrator\AppData\Local\Temp\pip-wheel-uy59qlsk'
cwd: C:\Users\Administrator\AppData\Local\Temp\pip-req-build-skffgh_w
Complete output (16 lines):
running bdist_wheel
running build
running build_ext
skipping 'dubins\dubins.c' Cython extension (up-to-date)
building 'dubins' extension
creating build
creating build\temp.win-amd64-3.7
creating build\temp.win-amd64-3.7\Release
creating build\temp.win-amd64-3.7\Release\dubins
creating build\temp.win-amd64-3.7\Release\dubins\src
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -Idubins/include -Ic:\users\administrator\appdata\local\programs\python\python37\include -Ic:\users\administrator\appdata\local\programs\python\python37\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" /Tcdubins/src/dubins.c /Fobuild\temp.win-amd64-3.7\Release\dubins/src/dubins.obj
dubins.c
dubins/src/dubins.c(76): error C2065: “M_PI”: 未声明的标识符
dubins/src/dubins.c(385): error C2065: “M_PI”: 未声明的标识符
dubins/src/dubins.c(400): error C2065: “M_PI”: 未声明的标识符
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\bin\HostX86\x64\cl.exe' failed with exit status 2
ERROR: Failed building wheel for dubins
Running setup.py clean for dubins
Failed to build dubins
Installing collected packages: dubins
Running setup.py install for dubins ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\administrator\appdata\local\programs\python\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Administrator\AppData\Local\Temp\pip-req-build-skffgh_w\setup.py'"'"'; file='"'"'C:\Users\Administrator\AppData\Local\Temp\pip-req-build-skffgh_w\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\Administrator\AppData\Local\Temp\pip-record-d30bjoao\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\administrator\appdata\local\programs\python\python37\Include\dubins'
cwd: C:\Users\Administrator\AppData\Local\Temp\pip-req-build-skffgh_w
Complete output (16 lines):
running install
running build
running build_ext
skipping 'dubins\dubins.c' Cython extension (up-to-date)
building 'dubins' extension
creating build
creating build\temp.win-amd64-3.7
creating build\temp.win-amd64-3.7\Release
creating build\temp.win-amd64-3.7\Release\dubins
creating build\temp.win-amd64-3.7\Release\dubins\src
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -Idubins/include -Ic:\users\administrator\appdata\local\programs\python\python37\include -Ic:\users\administrator\appdata\local\programs\python\python37\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" /Tcdubins/src/dubins.c /Fobuild\temp.win-amd64-3.7\Release\dubins/src/dubins.obj
dubins.c
dubins/src/dubins.c(76): error C2065: “M_PI”: undeclared identifier
dubins/src/dubins.c(385): error C2065: “M_PI”: undeclared identifier
dubins/src/dubins.c(400): error C2065: “M_PI”: undeclared identifier
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\bin\HostX86\x64\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\administrator\appdata\local\programs\python\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Administrator\AppData\Local\Temp\pip-req-build-skffgh_w\setup.py'"'"'; file='"'"'C:\Users\Administrator\AppData\Local\Temp\pip-req-build-skffgh_w\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\Administrator\AppData\Local\Temp\pip-record-d30bjoao\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\administrator\appdata\local\programs\python\python37\Include\dubins' Check the logs for full command output.
The text was updated successfully, but these errors were encountered: