当我尝试在IDLE或CLI上导入mudule'pegican'时,显示错误:
import pelican
File "C:\Python33\lib\site-packages\pelican-3.2.2-py3.3.egg\pelican\__init__.py",line 13, in <module>
from pelican import pelican_signals
ImportError: cannot import name pelican_signals
我使用从PyPI下载的软件包手动安装了pelican模块,安装它没有错误。 但是当我尝试导入它时,会发生上述错误。
我已经安装了'blinker','jinja2','markupsafe','pytz'这4个模块,现在我导入的鹈鹕不会出现ImportErrors, 但现在有一个新的 TypeError :
import pelican
File "C:\Python33\lib\site-packages\pelican-3.3-py3.3.egg\pelican\__init__.py", line 15, in <module>
from pelican.generators import (ArticlesGenerator, PagesGenerator,
File "C:\Python33\lib\site-packages\pelican-3.3-py3.3.egg\pelican\generators.py", line 22, in <module>
from pelican.contents import (
File "C:\Python33\lib\site-packages\pelican-3.3-py3.3.egg\pelican\contents.py", line 18, in <module>
from pelican.utils import (slugify, truncate_html_words, memoized, strftime,
File "C:\Python33\lib\site-packages\pelican-3.3-py3.3.egg\pelican\utils.py", line 7, in <module>
import pytz
File "<frozen importlib._bootstrap>", line 1558, in _find_and_load
File "<frozen importlib._bootstrap>", line 1525, in _find_and_load_unlocked
File "C:\Python33\lib\site-packages\pytz-2013b-py3.3.egg\pytz\__init__.py", line 1103, in <module>
tz for tz in all_timezones if resource_exists(tz)]
File "C:\Python33\lib\site-packages\pytz-2013b-py3.3.egg\pytz\__init__.py", line 1103, in <listcomp>
tz for tz in all_timezones if resource_exists(tz)]
File "C:\Python33\lib\site-packages\pytz-2013b-py3.3.egg\pytz\__init__.py", line 107, in resource_exists
open_resource(name).close()
File "C:\Python33\lib\site-packages\pytz-2013b-py3.3.egg\pytz\__init__.py", line 100, in open_resource
return resource_stream(__name__, 'zoneinfo/' + name)
File "C:\Python33\lib\site-packages\setuptools-0.7.2-py3.3.egg\pkg_resources.py", line 919, in resource_stream
self, resource_name
File "C:\Python33\lib\site-packages\setuptools-0.7.2-py3.3.egg\pkg_resources.py", line 1349, in get_resource_stream
return StringIO(self.get_resource_string(manager, resource_name))
File "C:\Python33\lib\site-packages\setuptools-0.7.2-py3.3.egg\pkg_resources.py", line 1926, in StringIO
return StringIO(*args,**kw)
TypeError: initial_value must be str or None, not bytes