So here is the beginning of my code:
#!/usr/bin/python
import h5py
f = h5py.File("/data/vera/run-2/hdfaa.001","r")
When I run it, it works well in the home directory. But when I run this in the directories inside the home directory, there is the error printed:
Traceback (most recent call last):
File "h5py.py", line 3, in <module>
import h5py
File "/.../h5py.py", line 5, in <module>
f = h5py.File("/...","r")
AttributeError: 'module' object has no attribute 'File'
When I use IPython of python interpreter, it can import the library and have the attribute h5py.File. But once I have the script interpreted, the interpreter cannot import the h5py library anymore. After I have deleted the file, it works fine again.
I have used the interpreter to check my script and there shouldn't be any problem with the scripting.
Since I am quite new to python, so I have no idea where goes wrong.