cnerg/pyne

python 3 compatibility

Opened this issue · 6 comments

Update mesh.py and associated tests to be compatible with python 3. Depending on how much needs updating, this could come in a follow-up PR.

Is there an install script for docker using: python3, pyne (pymoab version)?

Here is a python3 docker script. You may need to comment out the tests at the bottom of the file since those will fail in order to complete the build.
ubuntu-16.04-pymoab-python3.txt

Also, I am working on getting python 3 working on my branch here.

@kkiesling I failed to run the dockerfile named ubuntu-16.04-pymoab-python3.txt.
Error message:

/root/opt/pyne/pyne/__init__.py:18: 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 "/root/opt/pyne/pyne/__init__.py", line 13, in <module>
    from .pyne_config import *
ImportError: No module named pyne_config

The command I used:

docker build -f ubuntu-16.04-pymoab-python3.dockerfile -t python3-pyne-pymoab .

Ah yes, forgot to fix that line. Change the scripts/nuc_data_make line to this:

RUN cd $HOME/opt/pyne/scripts && ./nuc_data_make

New error jumped out:

Traceback (most recent call last):
  File "./nuc_data_make", line 4, in <module>
    from pyne.dbgen.nuc_data_make import main
ImportError: No module named pyne.dbgen.nuc_data_make