Issues installing PyNE on OS X 10.10.5

142 views
Skip to first unread message

andfr...@tamu.edu

unread,
Sep 2, 2015, 6:03:00 PM9/2/15
to PyNE Users
Hi,

So I tried to install PyNE on my mac by:

1) cloning it from github
2) running $ python setup.py install

It seems like everything seems to build, except I get the following error:

error: [Errno 21] Is a directory: 'scripts/build_nuc_data'

I tried deleting this directory, rerunning the setup script and I receive the same error.

I'd appreciate it if someone could help me out.

Thanks,
Andrew Franklin

Katy Huff

unread,
Sep 2, 2015, 6:41:39 PM9/2/15
to andfr...@tamu.edu, PyNE Users
The instructions here are subtle, but on the last line of this page http://pyne.io/install/osx.html#osx-source we're trying to get you to :

- source .bashrc to adjust your path
- and run "nuc_data_make" which builds the file that pyne is (on your machine) failing to find.

It's written in a weird way in the docs, though, I see now. It kinda buries the fact that you have to run nuc_data_make.

The docs there say:

Once those lines have been added, run the following command before running nuc_data_make:

source ~/.bashrc


--
You received this message because you are subscribed to the Google Groups "PyNE Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyne-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

andfr...@tamu.edu

unread,
Sep 2, 2015, 8:14:53 PM9/2/15
to PyNE Users, andfr...@tamu.edu
So the setup script is running without issue. I add the two lines to ~/.bashrc. I'm now trying to run nuc_data_make and receive the following warnings:

/Users/andfranklin/Library/Python/2.7/lib/python/site-packages/pyne-0.5.0_rc1-py2.7.egg/pyne/__init__.py:15: Warning: Error importing PyNE: you should not try to import PyNE from its source directory; please exit the PyNE source tree, and relaunch your python interpreter from there.
warn(msg, Warning)
Traceback (most recent call last):
File "scripts/nuc_data_make", line 4, in <module>
from pyne.dbgen.nuc_data_make import main
File "/Users/andfranklin/Library/Python/2.7/lib/python/site-packages/pyne-0.5.0_rc1-py2.7.egg/pyne/__init__.py", line 10, in <module>
from .pyne_config import *
ImportError: dlopen(/Users/andfranklin/Library/Python/2.7/lib/python/site-packages/pyne-0.5.0_rc1-py2.7.egg/pyne/pyne_config.so, 2): Library not loaded: libhdf5.8.dylib
Referenced from: /Users/andfranklin/Library/Python/2.7/lib/python/site-packages/pyne-0.5.0_rc1-py2.7.egg/pyne/pyne_config.so
Reason: image not found

I've tried opening a new terminal and re-sourcing the bashrc and bash_profile. That doesn't seem to help.

I also tried to import pyne in a python interpreter in a completely different directory to see if there is something wrong with the script. I received the same error.

Katy Huff

unread,
Sep 2, 2015, 9:52:54 PM9/2/15
to andfr...@tamu.edu, PyNE Users
So, as it says, you should exit the source tree before executing nuc_data_make (that is, leave the pyne directory and call nuc_data_make from outside it:

"you should not try to import PyNE from its source directory; please exit the PyNE source tree, and relaunch your python interpreter from there."


--
You received this message because you are subscribed to the Google Groups "PyNE Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyne-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Katy Huff

unread,
Sep 2, 2015, 9:53:29 PM9/2/15
to andfr...@tamu.edu, PyNE Users
oh, but you already did that. sorry I didn't read. 
That's a little weird to me. 
I'm not sure what's wrong.

Cameron Bates

unread,
Sep 19, 2015, 8:55:06 PM9/19/15
to PyNE Users, andfr...@tamu.edu
Sorry for the delayed reponse here, but it looks like it can't find your hdf5 library. It probably found it during build but it isn't in your DYLD_LIBRARY_PATH.

Cameron

andfr...@tamu.edu

unread,
Sep 25, 2015, 8:26:01 PM9/25/15
to PyNE Users, andfr...@tamu.edu
No problem! Same apology for me. So, I've installed hdf5 with homebrew and added the following line to my bash_profile:

export DYLD_LIBRARY_PATH="/usr/local/Cellar/hdf5/1.8.15/lib:${DYLD_LIBRARY_PATH}"

I don't know if this will effect anything, but I've updated the versions of python on my system to the most current (2.7.10 and 3.5.0). Before I proceeded to install, I made sure all of the dependencies on the github page were satisfied. Then, I tried running a clean install:

python setup.py clean
python setup.py install

I'm still getting the same errors.

Anthony Scopatz

unread,
Sep 25, 2015, 9:06:37 PM9/25/15
to andfr...@tamu.edu, PyNE Users
Hi All,

Sorry to jump into this so late, but does the conda package not work? Is there even a mac conda package for pyne?

Be Well
Anthony

Andrew Franklin

unread,
Sep 25, 2015, 10:18:19 PM9/25/15
to PyNE Users, andfr...@tamu.edu
I've tried installing PyNE using the following command (as posted under the Conda Package Manager in Installation):

conda install -c https://conda.binstar.org/pyne pyne

I receive the following errors when trying to import "data":

__main__:1: VnVWarning: pyne.nucname is not yet V&V compliant.

__main__:1: VnVWarning: pyne.data is not yet V&V compliant.


So, for some reason the miniconda installation isn't working for me either.


Honestly, I would like to be able to install PyNE using the standard "pip" command. The only reason I have miniconda installed is because I have the MOOSE Simulation Environment installed. All of my python scripting and development is done using manual python installs (i.e. I don't typically use python installs via macports, homebrew or conda). I'm not interested in using PyNE via conda or miniconda if that is possible.

Cameron Bates

unread,
Sep 27, 2015, 1:21:25 PM9/27/15
to PyNE Users, andfr...@tamu.edu
PyNE will always give you those warnings just to indicate that we do not have complete code coverage tests / documentation of a given module.

You should be able to use pip's -e option, but I haven't tried personally. I know there are issues with the direct "pip install https://github.com/pyne/pyne/archive/develop.zip" because we don't forward all the arguments correctly for setuptools.

Are you still getting this specific error :
ImportError: dlopen(/Users/andfranklin/Library/Python/2.7/lib/python/site-packages/pyne-0.5.0_rc1-py2.7.egg/pyne/pyne_config.so, 2): Library not loaded: libhdf5.8.dylib
Sometimes conda has it's own hdf5 which may be being found by pyne during the cmake install process this could be the cause in which case you may want to add the conda library path to the front of your DYLD_LIBRARY_PATH. 

you can also look at the output of otool -L /Users/andfranklin/Library/Python/2.7/lib/python/site-packages/pyne-0.5.0_rc1-py2.7.egg/pyne/pyne_config.so to see what it finds or doesn't.
 
Best,
Cameron

Andrew Franklin

unread,
Oct 1, 2015, 12:40:13 PM10/1/15
to PyNE Users, andfr...@tamu.edu
Finally got it installed! Special thanks to Katy for helping me after her seminar.

This issue was because I have MOOSE installed. I had to unload MOOSE before running the setup script, and now everything works perfectly. A brief summary of the commands I went through to manually install PyNE:

$ module unload moose
$ module unload moose/.clang
$ cd <PyNE source dir>
$ python setup.py install
$ cd scripts
$ ./nuc_data_make

Thanks all :)

Anthony Scopatz

unread,
Oct 1, 2015, 12:41:29 PM10/1/15
to Andrew Franklin, PyNE Users, andfr...@tamu.edu
hmmmm I don't understand why moose would be causing problems at all. 

Katy Huff

unread,
Oct 1, 2015, 12:45:26 PM10/1/15
to Anthony Scopatz, Andrew Franklin, PyNE Users, andfr...@tamu.edu
Andrew, 
Excellent!
To Anthony's question, the moose module adds a bunch of moose dependencies to the front ofthe dyldlibrary path, which makes the first (probably moab or hdf5) library in your path a different one than you want.
I, too, must moose module unload before doing any pyning.

Happy to help!!
Katy

Anthony Scopatz

unread,
Oct 1, 2015, 3:41:07 PM10/1/15
to Katy Huff, Andrew Franklin, PyNE Users, andfr...@tamu.edu
Thanks Katy,

This sounds like poor software engineering on the part of moose and/or modules. Can an issue be opened with them?  Is there any way for us to work around this?  PyNE should be able to link against whatever version of MOAB or HDF5 they link against, unless they are using some painfully old version.

Be Well
Anthony

Katy Huff

unread,
Oct 1, 2015, 4:47:27 PM10/1/15
to Anthony Scopatz, Andrew Franklin, PyNE Users, andfr...@tamu.edu
Since the module can be unloaded in a line or two, I don't find it a blocking issue. They're doing it the way that most HPC modules do this particular thing, I think.

However, the moose team does have a place to submit issues if anyone wants to: https://github.com/idaholab/moose/issues/new

Maybe something we could do on our end is allow a setup.py or nuc_data_make CLI  argument like --use-hdf5=$HDF5_PATH .  


Reply all
Reply to author
Forward
0 new messages