-
Notifications
You must be signed in to change notification settings - Fork 58
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
Windows Support #17
Comments
@Pebaz and @jf--- is it possible to go one step further and from this provide a Edit: sorry, maybe this doesn't belong in python-fcl, but rather in fcl itself? flexible-collision-library/fcl#429 |
Actually, perhaps the best person to ping is @mmatl - based on this comment flexible-collision-library/fcl#70 (comment) and from what I've seen (please correct me if wrong), the PyPi pip install on Linux basically makes it work out of the box without needing to compile FCL or do any other magic. If this could be extended to work on Mac and Windows too... that would be amazing! How simple would this be? Can I contribute in any way? |
Just an update, firstly thank you very much @Pebaz for all your work on adding a Windows build script and documentation in your PR #18 I was able to build it on Windows, but the script didn't work out of the box. The build script installs eigen, libccd, octomap with no problems, but when it comes to installing fcl, at the end of the installation process at this line https://github.com/Pebaz/python-fcl/blob/master/requirements/build_win32.ps1#L91 I find that at this point in the script, it actually hasn't created I worked around it by manually creating the I then ended up with an However, I then tried copying over this I have uploaded my build here, if others may find it useful: https://blenderbim.org/builds/fcl-py37-win.zip I think it is possible to turn it into a |
Hello @Moult ! |
Hello again @Moult ! I believe I was able to figure out why the build script did not work for you. I was able to reproduce the error by running the script in a normal PowerShell prompt. However, when I ran it as Administrator, the script executed just fine and I was able to install FCL successfully. I made a few changes to the Readme as well as the build script to denote that an Administrator prompt is necessary to build successfully. Also, I identified why you had the same error when copying your build over to a new machine. In order for FCL to work, it needs access to the C runtime DLLs which you later copied over. I ran into this same issue and was able to resolve it by first installing the MSVC compiler. It's really easy on Unix platforms because they already come with libc. On Win32, you have to install MSVC to get it to work. I went one step further and created a redistributable Wheel and upload it to PyPi as python-fcl-win32. In order to facilitate this, I had to create a separate Anyway, let me know if the new Have a great rest of your weekend! |
Use PyPi windows build of fcl instead. BerkeleyAutomation/python-fcl#17
@Pebaz I checked and I did run PowerShell as administator - after all, it did create eigen, libccd, octomap artifacts in C:\Program Files (x86)... just not for fcl for some reason. I tested your wheel and it works great! Thank you again! Thanks for going the extra step and uploading to PyPi! I am now using your PyPi distribution for the software I'm building! For anyone interested, I'm building https://blenderbim.org/ the BlenderBIM Add-on, an add-on to Blender which provides BIM capabilities for architects, engineers, and those in the construction industry. The fcl library lets people perform collision / clash detection when coordinating building models :) Your work has been invaluable! The only steps left are Mac support (I don't know how simple this is, perhaps it just needs a Mac environment and that's it...) and for everybody to start cleaning the fork of the fork of the fork of the fork of this library and pull all the improvements together :) |
@Pebaz sorry to bother, but do you think by any chance you could help release a version for Python 3.9 to PyPi? If you're busy, I'm also happy to learn how to do this myself and contribute a build with your guidance :) The reason I ask is that Blender is moving to Python 3.9, and I am building a tool that integrates fcl with Blender. |
Hello @Moult ! I will look into this! |
I was successfully able to install Have you experienced any issues installing on Python 3.9? |
This could be occurring due to your local installation of Python being compiled with a different compiler than You can determine this by doing: >>> import sys
>>> sys.version
3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)]
^
|
MSC == MSVC, not sure why they left out the V If you need to use MingW or something else on Windows other than MSVC, you will have to clone this repo and follow the build instructions carefully listed here. One other thing that could be the issue is that the |
Sorry for getting back to this late. I confirmed that I am running MSVC and a 64-bit version of Python, so not sure why the pre-built binaries in I also tried installing the library from source (following your build instructions) and got the same error at the end of it. I don't know what else to try. |
Can you confirm that the I know it's a bit hacky, but can you confirm that you are running the build script in an Admin PowerShell prompt when compiling from sources? Also, try running the It may be worth trying to install the prebuilt binaries onto your system Python rather than in a virtual environment just to rule out any virtual environment related issues. I'll try to help as best I can, let me know if any of these things work! :) |
I can confirm there is a PYD file for FCL in the virtual environment: Tried installing the pre-built binaries on my system Python. Still same error. I am importing fcl in my script correctly, right? I just have Trying to run the setup-win32.py directly (after commenting out the lib deletion, and running in Admin PowerShell) results in this error: |
@ConorMesser I'm going to try to look into this more closely today if I have time. Since MSVC is failing, I'd say there's probably some sort of misconfiguration in there somewhere. While I try to reproduce the error locally, can you provide these details so it can help me reason about the problem (sorry if they've already been provided!):
I'll try my best to figure out what's wrong here. While I'm doing that, can you try to update your MSVC installation to use the MS Build Tools or whatever is the latest (compatible) thing? I've got a slightly outdated MS Build Tools and it's working but there could be an issue there so wanted to make sure those were up to date. |
If possible, can you also post the entire (scrubbed) output from the |
@ConorMesser I've given it a go, and I just can't seem to figure out why the compilation would fail. Just one more thing, are you doing these sequences of actions?
|
@Pebaz Thanks a lot. Your work gave me some hints on windows. I reworked your script and combined it with pull request for 0.6.1. For some reason fcl is correctly compiled locally on windows but not on ci (github actions). |
Hi, I met the same issue as @ConorMesser, do we have any solutions for this yet @Pebaz? Error message:
|
@sethzhao506 It probably means that |
Thank you so much! For anyone who might encounter, I download the wheel file and pip install the wheel file according to specific version of python. |
|
This should be addressed by #29; thanks everyone for your hard work on that! |
Is there any way this library can be compiled to work on Windows?
Is it technically feasible or possible?
The text was updated successfully, but these errors were encountered: