Issue compiling Python on Mac

45 views
Skip to first unread message

Paul Johnson

unread,
Apr 15, 2019, 3:33:54 PM4/15/19
to OpenMC Users Group
Hello devs and fellow users,

I've switched over from editing input xml files (provided by a professor) to attempting the python API, but am having an issue with compiling (that is probably an easy fix).

Now, I've downloaded an example python file from: 

openmc/examples/python/basic/build-xml.py 

On github to build the files myself and I cannot get the openmc module to work. As my terminal output is:

(base) bash-3.2$ python goodbyeNeutrons

Traceback (most recent call last):

  File "goodbyeNeutrons", line 1, in <module>

    import openmc

ModuleNotFoundError: No module named 'openmc'


I'm not sure how to find/create the path as described in section 2.3.4 on readthedocs, and I know my python setup is working. 

(base) bash-3.2$ python --version

Python 3.7.3

 
I am running the file out of my home directory and is also where my Anaconda3 directory is located.

Thank you for your time,

Paul




pshr...@gmail.com

unread,
Apr 15, 2019, 3:47:53 PM4/15/19
to Paul Johnson, OpenMC Users Group
Hi Paul,

Sorry to hear you're having trouble, but glad you're looking to use the Python API for modeling!

Have you used the OpenMC's Python API on this machine before?

If not, did you have any errors when running the 'python setup.py install' command? (or python setup.py install --user if you installed it only in your user space)

Cheers,

Patrick

Patrick Shriwise
608-446-8173



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

Paul Johnson

unread,
Apr 15, 2019, 3:56:55 PM4/15/19
to OpenMC Users Group
Patrick,

Thanks for the quick response, and no I haven't used the Python API on this before. Also I am pretty new to using the command line tool to get things done so havn't used the 'python setup.py install' command previously within the conda env.

Do I use this command to install openmc? For Python I had used a pip command to install the current python version.

Best,

Paul

To unsubscribe from this group and stop receiving emails from it, send an email to openmc...@googlegroups.com.

Paul Romano

unread,
Apr 15, 2019, 5:21:25 PM4/15/19
to Paul Johnson, OpenMC Users Group
Hi Paul,

Let's start a little more basic -- how did you install OpenMC on your machine and what version did you install?

Best regards,
Paul R

To unsubscribe from this group and stop receiving emails from it, send an email to openmc-users...@googlegroups.com.

Paul Johnson

unread,
Apr 15, 2019, 5:27:09 PM4/15/19
to OpenMC Users Group
Hi Paul,

I installed OpenMC on my mac by installing Anaconda3 and conda, with conda config --add channels conda-forge, then conda install openmc. 

Also, I'm using version 10.

Thanks for your patience! 

Paul J



On Monday, April 15, 2019 at 5:21:25 PM UTC-4, Paul Romano wrote:
Hi Paul,

Let's start a little more basic -- how did you install OpenMC on your machine and what version did you install?

Best regards,
Paul R

Message has been deleted

Tang Qi

unread,
Apr 16, 2019, 3:44:01 AM4/16/19
to OpenMC Users Group
hello  Paul J

You can try anaconda3 --5.3.1version

(base) [root@centos-s-1vcpu-1gb-sfo2-01 tang]# conda  list  anaconda
# packages in environment at /home/tang/anaconda3:
#
# Name Version Build Channel
Anaconda 5.3.1 py37_0
Anaconda-client 1.7.2 py37_0
Anaconda-navigator 1.9.2 py37_0
Anaconda-project 0.8.2 py37_0

The openmc version  I installed is: openmc =0.10.0= py37h1b5bbce_1002      conda-forge

I hope to help you

Best,
Tang

在 2019年4月16日星期二 UTC+8上午5:27:09,Paul Johnson写道:
Reply all
Reply to author
Forward
0 new messages