QUESTION: pipenv "-e ." --dev works same way on pip and pip3?
See original GitHub issueThis looks like a blog post or something but it’s a question, sorry for the verbose…
So I just started the development of a library in order to learn python, coming from a Java/JS envs and used to dependency managers I “discover” pipenv.
Before using pipenv I was making use of:
- python 2.7
- virtualenv, virtualenvwrapper
- pip
So I have this project structure (basically):
my_project
|------->my_project (src code)
|-------> cli.py
|-------> setup.py
my setup.py
from setuptools import setup
setup(
name='my_project',
version='0.1',
py_modules=['my_project'],
install_requires=['Click'],
entry_points='''
[console_scripts]
my_project=my_project.cli:runnable
'''
)
With this setup if I ran
pip install --editable .
it installed my package under dev mode in the site-package directory from my virtualenv, so I was able to run my_project
from terminal as a command.
If I follow the same process for pip3 and py3 it works the same way…
Now I’m trying to make use of pipenv
so I removed my virtualenv, and create a new one with pipenv --three
, so now I have a new virtualenv with py3, then I executed pipenv shell
to get into that virtualenv created by pipenv.
To make sure all is good I ran python --version
which outputs Python 3.6.2
which is the one declared on my Pipfile. So all good.
So here’s the thing…
Following the instructions from pipenv (Editable Dependencies) I executed
pipenv install '-e .' --dev
It appends this to my Pipfile
[dev-packages]
"-e ." = "*"
It installed everything and looks like all is good, but at the time of trying to execute my_project
from terminal I got some errors:
Traceback (most recent call last):
File "/Users/atrevino/.virtualenvs/my_project-rf5gIlFJ/bin/my_project", line 11, in <module>
load_entry_point('my_project==0.1', 'console_scripts', 'my_project')()
File "/Users/atrevino/.virtualenvs/my_project-rf5gIlFJ/lib/python3.6/site-packages/pkg_resources/__init__.py", line 570, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/Users/atrevino/.virtualenvs/my_project-rf5gIlFJ/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2751, in load_entry_point
return ep.load()
File "/Users/atrevino/.virtualenvs/my_project-rf5gIlFJ/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2405, in load
return self.resolve()
File "/Users/atrevino/.virtualenvs/my_project-rf5gIlFJ/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2411, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
ModuleNotFoundError: No module named 'my_project'
so is there a difference using py3 or py2 with pipenv install '-e .' --dev
or maybe am I missing some configuration on my setup.py?
Again, sorry for the long post and have a great day!
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (4 by maintainers)
Top GitHub Comments
Make sure you’re using the latest version! We fixed the syntax in the pipfile recently.
\o/