Import only works when installing the module using the -editable pip flag
I have this project on github that allows me to do some jekyll actions more easily.
When I clone this and set it to my virtualenv
( pip install virtualenv .
) it works fine, but if I just set without a flag --editable
I get these errors when I try to use the commands open 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
'''
)
Does anyone know why this works when --editable
enabled, but not otherwise?
+3
source to share
No one has answered this question yet
Check out similar questions: