【发布时间】:2017-09-11 20:29:13
【问题描述】:
我有this project on github,它可以让我更轻松地执行一些 jekyll 操作。
当我克隆它并将其安装到我的 virtualenv (pip install virtualenv .) 中时,它工作正常,但如果我只是安装 没有 --editable 标志,当我尝试安装时会出现这些错误使用click公开的命令:
$ jk-config-set-editor Traceback (most recent call last):
File "/home/felipe/jekyll-utils/jekyll-venv/bin/jk-config-set-editor", line 7, in <module>
from jekyllutils.configs import set_editor
ImportError: No module named 'jekyllutils'
from setuptools import setup
setup(
name="jekyllutils",
version='0.1',
py_modules=['generators'],
install_requires=[
'click',
'python-slugify',
'appdirs',
'toml'
],
entry_points='''
[console_scripts]
jk-new = jekyllutils.generators:new_post
jk-edit = jekyllutils.managers:edit_post
jk-config-set-editor = jekyllutils.configs:set_editor
jk-config-set-posts-path = jekyllutils.configs:set_path_to_posts_dir
jk-config-dump-configs = jekyllutils.configs:dump_configs
jk-config-clear-configs = jekyllutils.configs:clear_configs
'''
)
任何人都知道为什么当--editable 处于打开状态时这有效,但在其他情况下无效?
【问题讨论】:
-
你解决过这个问题吗?
-
不,我只是使用 --editable
-
好的,我不得不使用
find_packages来修复它
标签: python python-3.x pip virtualenv setuptools