Pelican ImportError:没有名为' pelican'

时间:2017-09-21 04:08:14

标签: python-3.x pelican

我正在关注此文档以安装Pelican http://docs.getpelican.com/en/3.7.1/quickstart.html

在此步骤中,抛出了导入错误。

cd ~/projects/yoursite/output
python -m pelican.server

导入错误:

MacBook-Air:output dorjee$ python3 -m pelican.server
/Library/Frameworks/Python.framework/Versions/3.4/bin/python3: Error 
while finding spec for 'pelican.server' (<class 'ImportError'>: No 
module named 'pelican')

1 个答案:

答案 0 :(得分:1)

在检查pelican版本时,我意识到python虚拟环境未被激活。当它被激活时,错误就消失了。

$ pelican --version
-bash: pelican: command not found `

$ source ~/Environments/pelicanenv/bin/activate

$ python3 -m pelican.server
127.0.0.1 - - [20/Sep/2017 23:08:49] "GET / HTTP/1.1" 200 - `