sstoupin / dtxrd

Tools for X-ray diffraction evaluation of single crystals
Other
10 stars 1 forks source link

ModuleNotFoundError: No module named 'myio' #4

Open prjemian opened 4 years ago

prjemian commented 4 years ago

I am trying to run the program rctopo-fast with command:

(base) bash-4.2$ /APSshare/anaconda3/x86_64/bin/rctopo-fast -s -i -t 1.2
-f 1.5 -u urad -n C100-ST1-annealed-6hr-bottom-all-f=1.5 *.h5

Here's the output:

Traceback (most recent call last):
   File "/APSshare/anaconda3/x86_64/bin/rctopo-fast", line 36, in <module>
     from dtxrd.pyhdf import *
   File
"/APSshare/anaconda3/x86_64/lib/python3.7/site-packages/dtxrd/__init__.py",
line 31, in <module>
     from myio import *
ModuleNotFoundError: No module named 'myio'
prjemian commented 4 years ago

That's sounds like a problem to resolve in the dtxrd project. I believe that should be a relative import....

    from .myio import *

Python 3 is pickier about this than python 2. When developing the code, the code needs to be run as if it were installed (and not run from the project's development directory).

sstoupin commented 4 years ago

Hi Pete, Thank you for taking care of this. I have updated the codes not too long ago but haven't had a chance to test yet. rctopo-fast is the vectorized version of rctopo, something I was able to implement finally.

sstoupin commented 4 years ago

Looks like there are quite a few places where changes are needed I will try to resolve this tonight. If I use relative import as you pointed out - would it also work with python 2?

prjemian commented 4 years ago

Best to try it with both.

sstoupin commented 4 years ago

I believe I fixed it tonight. the codes are updated. Just finished the final test - downloaded as .zip, installed, everything worked. should work with either python 2 or 3. Thanks again!

prjemian commented 4 years ago

Thanks! Hope I find time this weekend or next week to try it out.