Closed nataliekoehn closed 2 years ago
Sip is not included with CPython's default distribution. You'd need to install it yourself. Try this:
python3 -m pip install sip
And you would need to install the C++ library as well. Perhaps this is available from Homebrew? Otherwise you would have to get the source code from https://www.riverbankcomputing.com/software/sip/download and compile that.
Note that CuraEngine can also be compiled without libArcus, if you only need it for automation. To do that, disable the ENABLE_ARCUS
parameter in CMake, for instance with:
cmake -DENABLE_ARCUS=OFF ..
(or using the CMake-GUI.)
Let me know if this works for you.
@Ghostkeeper The SIP version (4.19.25) we're currently using isn't in the pypi repository. It has to be build from source.
@nataliekoehn as I feel your pain (I'm also a Mechanical engineer) I'm currently in the process of making it a lot easier to build Cura and its dependencies from source using Conan (https://docs.conan.io/en/latest/) See PR #122
In the meantime you can try to install and compile SIP yourself. See the following steps:
python3 configure.py
make
make install
This should build the sip binary and install the header in the correct location. If you still have trouble with the message Could NOT find SIP (missing: SIP_EXECUTABLE SIP_INCLUDE_DIRS)
you can find the sip binary with where sip
and the include dir with find / -name 'sip.h'
now you can add the -DSIP_EXECUTABLE=<location where it found sip executable> -DSIP_INCLUDE_DIRS=<path where sip.h was found>
to your cmake
command.
Alternatively, you can follow the Conan method which I'm setting up: https://github.com/jellespijker/conan-um/ This should allow you to build Cura and all deps from source on Windows, Mac and Linux with a single commands. Keep in mind this is still very much WIP and subject to breaking changes.
您好,windows10编译libArcus提示ModuleNotFoundError: No module named 'sip' -- Python > 3.7 - not linking to lib
how should i do?
My team and I are mechanical engineers and are not software strong, but need to build an automation for our 3D printing workflow. I am trying to get CuraEngine set up on my mac (MacOS Catalina, version: 10.15.7) but running into an issue when getting libArcus set up. When I run cmake .. I run into errors (code below). I do have sip installed, using brew install sip. In the documentation it looks like it requires python3-dev (3.4+) and python3-sip-dev (4.16+) which I was not sure if that is automatically included in my Python version or not, I was unable to find details online. Is that why I am running into issues?
Code:
Natalie@Nats-MBP build % pwd /Users/user/uvic/mech400/libArcus/build Natalie@Nats-MBP build % cmake .. -- Found PythonInterp: /usr/local/bin/python3 (found suitable version "3.9", minimum required is "3.4") -- Found PythonLibs: /Library/Frameworks/Python.framework/Versions/3.9/lib/libpython3.9.dylib (found suitable version "3.9.0", minimum required is "3.4") -- Found PythonInterp: /usr/local/bin/python3 (found suitable version "3.9", minimum required is "3.5") -- Found PythonLibs: /Library/Frameworks/Python.framework/Versions/3.9/lib/libpython3.9.dylib (found suitable version "3.9.0", minimum required is "3.5") Traceback (most recent call last): File "", line 1, in
ModuleNotFoundError: No module named 'sip'
CMake Error at /Applications/CMake.app/Contents/share/cmake-3.9/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find SIP (missing: SIP_EXECUTABLE SIP_INCLUDE_DIRS)
Call Stack (most recent call first):
/Applications/CMake.app/Contents/share/cmake-3.9/Modules/FindPackageHandleStandardArgs.cmake:377 (_FPHSA_FAILURE_MESSAGE)
cmake/FindSIP.cmake:86 (find_package_handle_standard_args)
CMakeLists.txt:41 (find_package)
-- Configuring incomplete, errors occurred! See also "/Users/user/uvic/mech400/libArcus/build/CMakeFiles/CMakeOutput.log".