Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation script does not define PyNE PYTHON path and other errors probably caused by conflicts in versions #64

Open
ahmadMIbrahim opened this issue Feb 10, 2022 · 3 comments · May be fixed by #65

Comments

@ahmadMIbrahim
Copy link

I installed PyNE using the ubuntu install script, https://github.com/pyne/install_scripts/, but all the tests in the travis-run-tests.sh script failed because the PyNE PYTHONPATH is not defined anywhere in the scripts and other causes. I added some paths to the PYTHONPATH for the vendor, for PyNE, for MOAB, and for different installation of OpenMC. Some tests pass but other fail. Until now, test_r2s.py is always failing. It might be because of some conflict in the version of OpenMC. I am getting warnings such as:
"~python3.7/site-packages/pyne/openmc_utils.py:35: UserWarning: The openmc (OpenMC Python API) could not be imported. Some aspects of the openmc module may be incomplete."
It is giving me this error when I add the OpenMC API (~opt/openmc/openmc) that gets installed with running the original installation script, ubuntu.sh to the PYTHONPATH. When I add the Anaconda version that I had installed earlier following the OpenMC instructions, I get this error:

======================================================================
ERROR: Failure: ImportError (

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.

We have compiled some common reasons and troubleshooting tips at:

https://numpy.org/devdocs/user/troubleshooting-importerror.html

Please note and check the following:

  • The Python version is: Python3.8 from "/usr/bin/python3"
  • The NumPy version is: "1.22.0"

and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.

Original error was: No module named 'numpy.core._multiarray_umath'
)

I also think the test itself might also be outdated. I also get errors like:
"FileNotFoundError: [Errno 2] No such file or directory: ~pyne/pyne-repo/tests/files_test_r2s/r2s_examples/openmc_r2s/alara_inp."

@gonuke
Copy link
Contributor

gonuke commented Feb 17, 2022

I think this may be related to the issue I addressed in PyNE. The problem is that some versions of the dependencies have advanced in ways that we can't take advantage of. Let me see if I can implement a quick fix.

@gonuke
Copy link
Contributor

gonuke commented Feb 17, 2022

@ahmadMIbrahim - take a look at the new script in #65 to see if it fixes things for you?

@ahmadMIbrahim
Copy link
Author

I do not see the PyNE PYTHONPATH defined in gonuke:update_ubuntu_build.

When I run the script without defining my own PYTHONPATH, I encounter the same error I used to have while running the tests file, travis-run-tests.bash. This error is:
ModuleNotFoundError: No module named 'pyne'.

I tried to add my PYTHONPATH to point to the folders that include .py files in the new/fresh installations that the script has already made. On my system, these are:
PYTHONPATH=$HOME/anaconda3/lib/python3.7/site-packages/pip/_vendor/:$PYTHONPATH
PYTHONPATH=$HOME/.local/lib/python3.7/site-packages/:$PYTHONPATH
PYTHONPATH=$HOME/opt/moab/lib/python3.7/site-packages/pymoab-5.1.0-py3.7-linux-x86_64.egg/:$PYTHONPATH
PYTHONPATH=$HOME/opt/openmc/:$PYTHONPATH

I am getting much better response than before. I see most of the tests passing, but some did not pass. Some of the errors I am getting are related to OpenMC such as "NameError: name 'openmc' is not defined." It is worth mentioning that I had commented the "exit $status" line in travis-run-tests.bash to allow the script to run until the end.

Thank you very much. I feel I am in better state now.

@ahmadMIbrahim ahmadMIbrahim reopened this Feb 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants