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

Error in create an atom #12

Closed
LuMa817 opened this issue Oct 12, 2017 · 4 comments
Closed

Error in create an atom #12

LuMa817 opened this issue Oct 12, 2017 · 4 comments
Labels

Comments

@LuMa817
Copy link

LuMa817 commented Oct 12, 2017

Hi when I am trying to create an atom using: "atom=Caesium()", my python shell gives an error as following:

Traceback (most recent call last):
File "<pyshell#20>", line 1, in
atom=Caesium()
File "/Users/lukema/Library/Mobile Documents/comappleCloudDocs/Research/ARC-Alkali-Rydberg-Calculator-master/arc/alkali_atom_functions.py", line 172, in init
from .arc_c_extensions import NumerovWavefunction
ModuleNotFoundError: No module named 'arc.arc_c_extensions'

Am doing anything wrong before diving too deep into the code ?
Best

@nikolasibalic
Copy link
Owner

Hi @LuMa817

Thank you for the question. It seems like you have downloaded directly current version of the master branch. This is for development only and it doesn't come prepackaged with compiled C extension.

Instead, for installation, you should download the latest release ( https://github.com/nikolasibalic/ARC-Alkali-Rydberg-Calculator/releases ). Please download .zip that corresponds to your operating system and your Python version.

Let me know if you encounter any problems. Or, if everything works, so that I can close the thread.
Nikola

@LuMa817
Copy link
Author

LuMa817 commented Oct 13, 2017

Hi @nikolasibalic
I downloaded the latest release and tried it again. It seems to have the same problem.

Traceback (most recent call last):
File "<pyshell#5>", line 1, in
atom=Caesium()
File "/Users/lukema/Library/Mobile Documents/comappleCloudDocs/Research/ARC_mac_x64_python35_v1_3/arc/alkali_atom_functions.py", line 172, in init
from .arc_c_extensions import NumerovWavefunction
ModuleNotFoundError: No module named 'arc.arc_c_extensions'

I do have the file "arc_c_extensions.cpython-35m-darwin.so" in the file. But I am using Python 3.6 instead of 3.5. Will this be problem ?

@nikolasibalic
Copy link
Owner

nikolasibalic commented Oct 13, 2017

@LuMa817
I would guess that is the problem (you have Python 3.6 and package is compiled for Python 3.5). I don't have access to Mac at the moment, so you can either:

  1. Try to compile yourself the extension. On Mac it should be easy, provided that you have Python development headers (python-dev) and C compiler. Then you can just enter with terminal the arc folder, where setupc.py is located (note that it's setupc.py not setup.py) and call python setupc.py build_ext --inplace That should build required module.

  2. Alternatively, you can try downgrading Python to 3.5

Let me know if this doesn't resolve the problem.

@LuMa817
Copy link
Author

LuMa817 commented Oct 13, 2017

@nikolasibalic
it works after I re-complied the C code. Thanks very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants