Code Monkey home page Code Monkey logo

Comments (4)

jcfr avatar jcfr commented on August 12, 2024

Hi @jlaura ,

Thanks for reaching out.

Since the PythonQt fork we maintain in the commontk organization is not (yet) updated against the latest version of the official PythonQt source tree available on sourceforge. I would suggest you try with the most recent sources.

See:

Note that we created this work as a staging area for improvement to CMake buildsystem of PythonQt before we contribute them upstream.

On a related note, in the coming week, we will also be working on experimental support for miniconda/anaconda for 3DSlicer (and by extension CTK).

Some details are reported here http://wiki.slicer.org/slicerWiki/index.php/Documentation/Labs/PythonCondaBuild

Let me know if you have any questions,

Thanks
Jc

from pythonqt.

jlaura avatar jlaura commented on August 12, 2024

Thanks for the heads up. I have posted to the source forge discussion site. Would you rather keep this issue open pending a response from upstream or close?

from pythonqt.

patmarion avatar patmarion commented on August 12, 2024

I think the issue is with CMake's FindPythonLibs.cmake script. It finds the correct Python interpreter but not the correct lib and headers. In order to correctly find homebrew python on mac, I use cmake code like this:

(note, this isn't totally general, but it works well enough for me for python 2.7):

if(APPLE)
  find_program(PYTHON_CONFIG_EXECUTABLE python-config)
  if (NOT PYTHON_CONFIG_EXECUTABLE)
    message(SEND_ERROR "python-config executable not found, but python is required.")
  endif()
  # using "python-config --prefix" so that cmake always uses the python that is
  # in the user's path, this is a fix for homebrew on Mac:
  # https://github.com/Homebrew/homebrew/issues/25118
  execute_process(COMMAND ${PYTHON_CONFIG_EXECUTABLE} --prefix OUTPUT_VARIABLE python_prefix OUTPUT_STRIP_TRAILING_WHITESPACE)
  set(PYTHON_INCLUDE_DIR ${python_prefix}/include/python2.7)
  set(PYTHON_LIBRARY ${python_prefix}/lib/libpython2.7${CMAKE_SHARED_LIBRARY_SUFFIX})
endif()
find_package(PythonLibs 2.7 REQUIRED)

from pythonqt.

jcfr avatar jcfr commented on August 12, 2024

@jlaura Let's close this issue. For reference, here is the associated post on PythonQt forum: http://sourceforge.net/p/pythonqt/discussion/631393/thread/bc3b8e92/?limit=25#2f9b

@patmarion Thanks for the note. I added a note to the associated CMake issue. See http://www.cmake.org/Bug/view.php?id=14809#c39236

from pythonqt.

Related Issues (20)

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.