Unable to install wxPython 4.0.2 via pip (4.0.1 works fine)

Hi, I’m getting the following build error when installing version 4.0.2 using pip:

The problem does not occur for version 4.0.1, and even the demo program works fine.

Getting pyembed flags from python-config : Could not build a python embedded interpreter

The configuration failed

My system configuration:

  • Manjaro Linux (based on Arch Linux, so it is rolling release)
  • Python 3.6 from Miniconda, added to PATH (I’m using the base environment)

What is the change in 4.0.2 which is causing the build to fail?

Why not 4.0.3?

The version of waf being used to do the build was changed in 4.0.2 to be the newest at that time. It is a little more strict about the Python being used for the build on Linux. The main thing that comes to mind is that the Python must have been built with --enable-shared. Stock Python packages from the distro are all built that way (as far as I know) but it’s possible that miniconda is not built that way, as it’s not the default. Maybe there’s a conda package that can be installed that adds on the shared lib in a way that waf will be able to see it?

If that doesn’t seem to be the cause of the problem then it could be this issue: https://github.com/wxWidgets/Phoenix/issues/904. That has been fixed already for 4.0.4 but you can manually patch your copy and build from source (not pip) until 4.0.4 is released. Just run python build.py build bdist_wheel to get a wheel file you can install with pip.

If that doesn’t help then check in build/waf/3.6/config.log for further clues.

···

Robin

On Wednesday, December 19, 2018 at 2:07:32 PM UTC-8, Prashant Raina wrote:

Hi, I’m getting the following build error when installing version 4.0.2 using pip:

The problem does not occur for version 4.0.1, and even the demo program works fine.

Getting pyembed flags from python-config : Could not build a python embedded interpreter

The configuration failed

My system configuration:

  • Manjaro Linux (based on Arch Linux, so it is rolling release)
  • Python 3.6 from Miniconda, added to PATH (I’m using the base environment)

What is the change in 4.0.2 which is causing the build to fail?

Thanks for the suggestion, Robin.
So here’s what I’ve found: https://github.com/conda/conda-build/issues/2738

Apparently, the shared library exists, and the linker flags be found using python3-config, but the flag for Py_ENABLE_SHARED is not set for some reason.

I’ll try installing the latest version from source.

  • Prashant
···

On Wed, Dec 19, 2018 at 5:44 PM Robin Dunn robin@alldunn.com wrote:

Why not 4.0.3?

The version of waf being used to do the build was changed in 4.0.2 to be the newest at that time. It is a little more strict about the Python being used for the build on Linux. The main thing that comes to mind is that the Python must have been built with --enable-shared. Stock Python packages from the distro are all built that way (as far as I know) but it’s possible that miniconda is not built that way, as it’s not the default. Maybe there’s a conda package that can be installed that adds on the shared lib in a way that waf will be able to see it?

If that doesn’t seem to be the cause of the problem then it could be this issue: https://github.com/wxWidgets/Phoenix/issues/904. That has been fixed already for 4.0.4 but you can manually patch your copy and build from source (not pip) until 4.0.4 is released. Just run python build.py build bdist_wheel to get a wheel file you can install with pip.

If that doesn’t help then check in build/waf/3.6/config.log for further clues.

Robin

On Wednesday, December 19, 2018 at 2:07:32 PM UTC-8, Prashant Raina wrote:

Hi, I’m getting the following build error when installing version 4.0.2 using pip:

The problem does not occur for version 4.0.1, and even the demo program works fine.

Getting pyembed flags from python-config : Could not build a python embedded interpreter

The configuration failed

My system configuration:

  • Manjaro Linux (based on Arch Linux, so it is rolling release)
  • Python 3.6 from Miniconda, added to PATH (I’m using the base environment)

What is the change in 4.0.2 which is causing the build to fail?

You received this message because you are subscribed to the Google Groups “wxPython-dev” group.

To unsubscribe from this group and stop receiving emails from it, send an email to wxPython-dev+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Conda-forge successfully builds wxPython 4.0.3 — so I don’t think it’s a mini conda issue.

You may want to look and see how they do it for hints. Or just use that version :slight_smile:

-CHB

···

On Dec 19, 2018, at 10:13 PM, Prashant Raina prashantraina2005@gmail.com wrote:

Thanks for the suggestion, Robin.
So here’s what I’ve found: https://github.com/conda/conda-build/issues/2738

Apparently, the shared library exists, and the linker flags be found using python3-config, but the flag for Py_ENABLE_SHARED is not set for some reason.

I’ll try installing the latest version from source.

  • Prashant

On Wed, Dec 19, 2018 at 5:44 PM Robin Dunn robin@alldunn.com wrote:

Why not 4.0.3?

The version of waf being used to do the build was changed in 4.0.2 to be the newest at that time. It is a little more strict about the Python being used for the build on Linux. The main thing that comes to mind is that the Python must have been built with --enable-shared. Stock Python packages from the distro are all built that way (as far as I know) but it’s possible that miniconda is not built that way, as it’s not the default. Maybe there’s a conda package that can be installed that adds on the shared lib in a way that waf will be able to see it?

If that doesn’t seem to be the cause of the problem then it could be this issue: https://github.com/wxWidgets/Phoenix/issues/904. That has been fixed already for 4.0.4 but you can manually patch your copy and build from source (not pip) until 4.0.4 is released. Just run python build.py build bdist_wheel to get a wheel file you can install with pip.

If that doesn’t help then check in build/waf/3.6/config.log for further clues.

Robin

On Wednesday, December 19, 2018 at 2:07:32 PM UTC-8, Prashant Raina wrote:

Hi, I’m getting the following build error when installing version 4.0.2 using pip:

The problem does not occur for version 4.0.1, and even the demo program works fine.

Getting pyembed flags from python-config : Could not build a python embedded interpreter

The configuration failed

My system configuration:

  • Manjaro Linux (based on Arch Linux, so it is rolling release)
  • Python 3.6 from Miniconda, added to PATH (I’m using the base environment)

What is the change in 4.0.2 which is causing the build to fail?

You received this message because you are subscribed to the Google Groups “wxPython-dev” group.

To unsubscribe from this group and stop receiving emails from it, send an email to wxPython-dev+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

You received this message because you are subscribed to the Google Groups “wxPython-dev” group.

To unsubscribe from this group and stop receiving emails from it, send an email to wxPython-dev+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.