Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#42250 closed defect (worksforme)

clean port install of python and opengl, attempted python module import fails

Reported by: jacoblee@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.2.1
Keywords: Cc: jmroot (Joshua Root), dh@…, michaelld (Michael Dickens)
Port: py27-opengl

Description (last modified by ryandesign (Ryan Carsten Schmidt))

I am not sure this is a port error, but...

Start with no ports at all I install python27

$ sudo port install python27

..no errors or warnings..

and then

$ sudo port install py27-opengl

..no errors or warnings..

--->  Installing py27-opengl @3.0.2_1
--->  Activating py27-opengl @3.0.2_1
--->  Cleaning py27-opengl
--->  Updating database of binaries: 100.0%
--->  Scanning binaries for linking errors: 100.0%
--->  No broken files found.

Then I load python and try to import:

$ python
Python 2.7.6 (default, Nov 12 2013, 13:26:39) 
[GCC 4.2.1 Compatible Apple Clang 4.1 ((tags/Apple/clang-421.11.66))] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from OpenGL_accelerate.numpy_formathandler import NumpyHandler
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "numpy.pxd", line 151, in init OpenGL_accelerate.numpy_formathandler (src/numpy_formathandler.c:5252)
ValueError: numpy.dtype has the wrong size, try recompiling

I've read that this might have to do with a package that was compiled using another version of numpy?

Change History (9)

comment:1 in reply to:  description Changed 11 years ago by jacoblee@…

Replying to jacoblee@…: p.s. I also ran the command: sudo port select --set python python27

comment:2 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: jmr@… dh@… michaelld@… added
Description: modified (diff)
Keywords: python pyopengl numpy removed

Please remember to use WikiFormatting and to preview before submitting.

comment:3 Changed 11 years ago by michaelld (Michael Dickens)

If py27-opengl is installed, then so is py27-numpy since py27-numpy is a dependency of py27-opengl-accelerate, which is in turn a dependency of py27-opengl.

In my memory, the ValueError happens when a given port was installed using a given version of NumPy, then NumPy was updated but the given port was not. So, it seems likely that py27-opengl-accelerate need to be rebuild for a newer NumPy. I recommend that you build from source; try:

sudo port -f uninstall py27-opengl-accelerate
sudo port -s install py27-opengl-accelerate

first and then see if the import works. Chances are that it will. If that's the case, then we need to rev-bump py*-opengl-accelerate.

comment:4 Changed 11 years ago by jmroot (Joshua Root)

Works for me, and I haven't rebuilt any of this stuff since initially installing it.

comment:5 Changed 11 years ago by michaelld (Michael Dickens)

Resolution: worksforme
Status: newclosed

Great; thanks for reporting back!

comment:6 Changed 11 years ago by jmroot (Joshua Root)

Uh, what? Did you mistake me for the reporter?

comment:7 Changed 11 years ago by jacoblee@…

This ticket was closed by mistake, as noted by jmr.

In any case, Michael's recommended fix worked. Thank you!

comment:8 Changed 11 years ago by jacoblee@…

p.s. the tip about using the -s flag is something I'll keep in mind in the future.

comment:9 Changed 11 years ago by michaelld (Michael Dickens)

@jmr: haha! yes, I wasn't looking carefully about -who- responded.

@Jacob: I'm glad that did the trick! Thanks for reporting back.

I'm leaving this ticket as closed :)

Note: See TracTickets for help on using tickets.