0

当我尝试在 IDLE 或 CLI 上导入 mudule 'pelican' 时,显示错误:

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 个模块,现在我 import pelican 不会发生 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
4

0 回答 0