I pip the "opencc"
when i shell the code below
import opencc
it shows
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import opencc
File "C:Python34libsite-packagesopencc\__init__.py", line 6, in <module>
from version import __version__
ImportError: No module named 'version'
but "____init__.py"and"version.py" are in the same directory
C:Python34libsite-packagesopencc
opencc
|----__init__.py
|----version.py
file:version.py
__version__ = '0.1'
when i change
from version import __version__
into
__version__ = '0.1'
opencc,it works
I know it doesn't make a big difference,but i just want to know why the init.py can't import the module version.py in the same directory,
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…