Coder Social home page Coder Social logo

Comments (14)

dshguilherme avatar dshguilherme commented on June 22, 2024 1

Solution 1 worked and make CMake run! Great. Now to work on those Rhino -> NURBS-Python... :)

Thanks a lot!

from rw3dm.

orbingol avatar orbingol commented on June 22, 2024

@dshguilherme could you please post the CMake logs too?

from rw3dm.

dshguilherme avatar dshguilherme commented on June 22, 2024

Log only says:
image

from rw3dm.

orbingol avatar orbingol commented on June 22, 2024

Could you also post the logs in the CMake GUI too? I can only see "Configuring incomplete" part on the screenshot.

I have also some preliminary guesses for the solution:

  1. Please make sure that you have CMakeLists.txt file in the C:/Doutorado directory? (I see the directory name on the screenshot)
  2. Sometimes it is possible to get permission errors when you try to create a build directory on your Windows desktop using a non-Microsoft application. The best solution is choosing some other directory outside your Desktop or Documents. Definitely there is a fix for that but I don't remember it right now (sorry). I usually create the build directory inside the cloned repo directory. That directory is ignored using .gitignore.
  3. Please make sure that you picked "Visual Studio 2017 64-bit" from the list of compilers. CMake can be a little bit confusing on that.

from rw3dm.

dshguilherme avatar dshguilherme commented on June 22, 2024

After tweaking a lot with CMake (I was missing some key Visual Basic packages), I'm currently now stuck with CMake/Python problems. Namely this:
image
Uploading Output Log:
CMakeOutput.log

from rw3dm.

orbingol avatar orbingol commented on June 22, 2024

It seems pybind11 isn't able to detect a cpython interpreter: https://github.com/pybind/pybind11/blob/9a19306fbf30642ca331d0ec88e7da54a96860f9/tools/FindPythonLibsNew.cmake#L96

Additionally, it seems a decent problem though: pybind/pybind11#236

I will see what I can do (however, I don't think I can do anything to fix a pybind11 issue) but in the meantime, you can try the following super simple solutions. Please note that these super simple solutions don't mean they are correct:

Solution 1:

  • Add Python and Python\scripts directories to the system path
  • Open a command prompt or powershell instance
  • Write "python" and then "pip"
  • If you are not getting file not found errors, then you are good. Otherwise, check system path.
  • Restart CMake, clean CMake variables
  • Rerun CMake

Solution 2:

from rw3dm.

orbingol avatar orbingol commented on June 22, 2024

It is good to know that you figured it out :)

from rw3dm.

dshguilherme avatar dshguilherme commented on June 22, 2024

Now, after installing it, I get AttributeError: module 'rw3dm' has no attribute 'read'.
So I tried opening the module and to my surprise it is a bunch of nonsense.
image
I'm starting to think that the best way is to scan points over my geometry and interpolate them...

from rw3dm.

orbingol avatar orbingol commented on June 22, 2024

That's a binary file actually :) and it looks like a Python egg file, i.e. a zipped module. It should work fine, though.

By looking at the error, I suspect that you might be using a different python version than you compiled the module for. That also happens when you compile the Python module with Debug option selected in Visual Studio. Please try to compile it with Release option selected.

from rw3dm.

orbingol avatar orbingol commented on June 22, 2024

I am reopening this issue as I have found a problem in generation of Python wheel files and fixed it with the release of v1.1.0. I have also added the ability to call from rw3dm import * import statement (after the installation of course).

@dshguilherme could you please check it again with the latest updates?

from rw3dm.

dshguilherme avatar dshguilherme commented on June 22, 2024

When running setup.py it gives errors:
image

from rw3dm.

orbingol avatar orbingol commented on June 22, 2024

What I see from the screenshot is that

  1. You are using Debug version. Have you installed or really intended to use Python's debug version? If so, you might not be aware that you will end up compiling pretty much every single module you want to use. Please choose Release from the drop-down menu in VS2017 before starting to compile the module (I guess you missed it here: #1 (comment))
  2. Although the first solution should solve everything, it is always recommended to delete CMake build folder if you are constantly getting errors. This could be considered as the first rule of debugging with CMake.

I haven't added any information to choose Release version as some people might actually want to debug the module to add more features. Python's debug and regular versions are different, different module names and even different interpreters and it is possible to debug CPython modules with Visual Studio (and gdb, if you would like to accept the challenge :))

In any case, python setup.py develop or its pip counterpart should also work fine but you shouldn't delete the module installation directory.

from rw3dm.

dshguilherme avatar dshguilherme commented on June 22, 2024

I have select the Release in VS2017 now, and went through with the installation. Still, rw3dm doesn't seem to have any methods, as per the picture.
image

from rw3dm.

dshguilherme avatar dshguilherme commented on June 22, 2024

FIXED. Apparently I was missing the "from rw3dm import rw3dm". Not it finally works!

Thanks for being patient and helping me along this :) I'll surely cite rw3dm and NURBS-Python on my publications and properly thank you in the works.

from rw3dm.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.