praxes / hexrd

Legacy hexrd repository (python2.7)
http://hexrd.readthedocs.org
14 stars 42 forks source link

conda build still broken, new error... #85

Closed joelvbernier closed 9 years ago

joelvbernier commented 9 years ago

I tried a clean build from the current praxes/master on my workstation (Mac OS 1.8.5). The build itself generated no error, gut I get the following when trying to fire up the GUI, which seems to be an error related to the setup.py file:

[bernier2@photonjb2] hexrd > hexrd gui Traceback (most recent call last): File "/Users/bernier2/anaconda/bin/hexrd", line 4, in from hexrd.cli import main File "/Users/Shared/hexrd/hexrd/cli/init.py", line 11, in from .main import main File "/Users/Shared/hexrd/hexrd/cli/main.py", line 14, in from hexrd.cli import cacheframes File "/Users/Shared/hexrd/hexrd/cli/cacheframes.py", line 3, in from hexrd.coreutil import initialize_experiment File "/Users/Shared/hexrd/hexrd/coreutil.py", line 17, in from hexrd.xrd import experiment as expt File "/Users/Shared/hexrd/hexrd/xrd/experiment.py", line 52, in from hexrd.xrd import grain as G File "/Users/Shared/hexrd/hexrd/xrd/grain.py", line 46, in from hexrd.xrd.xrdutil import calculateBiotStrain, makeMeasuredScatteringVectors File "/Users/Shared/hexrd/hexrd/xrd/xrdutil.py", line 72, in from hexrd.xrd import transforms_CAPI as xfcapi File "/Users/Shared/hexrd/hexrd/xrd/transforms_CAPI.py", line 32, in from hexrd.xrd import _transforms_CAPI ImportError: cannot import name _transforms_CAPI [bernier2@photonjb2] hexrd >

joelvbernier commented 9 years ago

Yep, both the transforms and sglite packages seem to be missing in the copy from the disutils build…

FROM THE REPO:

[bernier2@photonjb2] hexrd > ls COPYING LICENSE init.py _version.py arrayutil.py cacheframes.py cli/ config/ constants.py copyright.py data/ coreutil.py fileutil.py findorientations.py fitgrains.py gridutil.py matrixutil.py orientations.py pfigutil.py plotwrap.py quadrature/ qt/ sglite/ tens.py testing/ transforms/ utils/ valunits.py wx/ xrd/

FROM THE BUILD DIRECTORY (setup.py):

[bernier2@photonjb2] hexrd > ls ../build/lib.macosx-10.5-x86_64-2.7/hexrd/ COPYING LICENSE init.py _version.py arrayutil.py cacheframes.py cli/ config/ constants.py copyright.py coreutil.py data/ fileutil.py findorientations.py fitgrains.py gridutil.py matrixutil.py orientations.py pfigutil.py plotwrap.py qt/ quadrature/ tens.py testing/ utils/ valunits.py wx/ xrd/

ddale commented 9 years ago

I was careful to do clean builds and installs on all three platforms. I didn't see errors on windows or linux when I ran 'hexrd gui' after installing with distutils, but I don't recall running the gui on mac.

I just tried doing a clean distutils install on my windows laptop, and it works fine.

transforms/ and sglite/ aren't supposed to exist under hexrd in site-packages. The extension modules get installed under hexrd/xrd.

I bet you are either running hexrd gui in the project directory, or you have PYTHONPATH set to include the hexrd project directory. In that case, python will attempt to import hexrd from the project directory, but if you haven't run "python setup.py build_ext --inplace" or "python setup.py develop", then it won't be able to load the extension modules.

ddale commented 9 years ago

taking a closer look at your traceback, I'm pretty sure my last comments were correct. Its attempting to load the hexrd from /Users/Shared/hexrd/hexrd, not the distutils install from site-packages.

joelvbernier commented 9 years ago

PYTHONPATH was not set. I did launch from the project dir, but I don't recall that causing problems in the past?

Sent from my iPhone

On Dec 13, 2014, at 4:12 AM, Darren Dale notifications@github.com wrote:

I was careful to do clean builds and installs on all three platforms. I didn't see errors on windows or linux when I ran 'hexrd gui' after installing with distutils, but I don't recall running the gui on mac.

I just tried doing a clean distutils install on my windows laptop, and it works fine.

transforms/ and sglite/ aren't supposed to exist under hexrd in site-packages. The extension modules get installed under hexrd/xrd.

I bet you are either running hexrd gui in the project directory, or you have PYTHONPATH set to include the hexrd project directory. In that case, python will attempt to import hexrd from the project directory, but if you haven't run "python setup.py build_ext --inplace" or "python setup.py develop", then it won't be able to load the extension modules.

— Reply to this email directly or view it on GitHub.

ddale commented 9 years ago

because you would have already run python setup.py build_ext --inplace or python setup.py develop, which provides the extension modules in the project tree.