-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Installation error from requirements.txt with -e #671
Comments
Please provide your pipfile. |
Using this [[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"
[dev-packages]
[packages]
Flask = "==0.9"
"Flask-SQLAlchemy" = {ref = "1556d1822c46019e518707af0adc034ad4363ab4", git = "ssh://git@github.com/closeio/flask-sqlalchemy.git", editable = true}
"Flask-Migrate" = "==1.8.0"
|
fixed the bug you're encountering. Now you'll see this error message:
|
all is working well for me on python2 on master. |
I'm still getting the same error on v7.7.3. Starting point: same requirements.txt above, no Pipfile yet, and I ran $ pipenv install
Creating a virtualenv for this project…
⠋New python executable in /Users/philfreo/.local/share/virtualenvs/pipenv-problem-qZknlxgQ/bin/python2.7
Also creating executable in /Users/philfreo/.local/share/virtualenvs/pipenv-problem-qZknlxgQ/bin/python
Installing setuptools, pip, wheel...done.
Virtualenv location: /Users/philfreo/.local/share/virtualenvs/pipenv-problem-qZknlxgQ
Requirements.txt found, instead of Pipfile! Converting…
Warning: Your Pipfile now contains pinned versions, if your requirements.txt did.
We recommend updating your Pipfile to specify the "*" version, instead.
No package provided, installing all dependencies.
Pipfile.lock not found, creating…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
No handlers could be found for logger "pip.vcs.git"
Updated Pipfile.lock!
Installing dependencies from Pipfile.lock…
🐍 ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 13/13 — 00:00:05
An error occured while installing -e git+ssh://git@github.com/closeio/flask-sqlalchemy.git@1556d1822c46019e518707af0adc034ad4363ab4#egg=flask-sqlalchemy! Will try again.
Installing initially–failed dependencies…
Obtaining flask-sqlalchemy from git+ssh://git@github.com/closeio/flask-sqlalchemy.git@1556d1822c46019e518707af0adc034ad4363ab4#egg=flask-sqlalchemy
Skipping because already up-to-date.
Requirement already satisfied: Flask>=0.9 in /Users/philfreo/.local/share/virtualenvs/pipenv-problem-qZknlxgQ/lib/python2.7/site-packages (from flask-sqlalchemy)
Requirement already satisfied: SQLAlchemy>=0.7 in /Users/philfreo/.local/share/virtualenvs/pipenv-problem-qZknlxgQ/lib/python2.7/site-packages (from flask-sqlalchemy)
Requirement already satisfied: Werkzeug>=0.7 in /Users/philfreo/.local/share/virtualenvs/pipenv-problem-qZknlxgQ/lib/python2.7/site-packages (from Flask>=0.9->flask-sqlalchemy)
Requirement already satisfied: Jinja2>=2.4 in /Users/philfreo/.local/share/virtualenvs/pipenv-problem-qZknlxgQ/lib/python2.7/site-packages (from Flask>=0.9->flask-sqlalchemy)
Requirement already satisfied: MarkupSafe>=0.23 in /Users/philfreo/.local/share/virtualenvs/pipenv-problem-qZknlxgQ/lib/python2.7/site-packages (from Jinja2>=2.4->Flask>=0.9->flask-sqlalchemy)
Installing collected packages: flask-sqlalchemy
Found existing installation: Flask-SQLAlchemy 2.1
Exception:
Traceback (most recent call last):
File "/Users/philfreo/.local/share/virtualenvs/pipenv-problem-qZknlxgQ/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/Users/philfreo/.local/share/virtualenvs/pipenv-problem-qZknlxgQ/lib/python2.7/site-packages/pip/commands/install.py", line 342, in run
prefix=options.prefix_path,
File "/Users/philfreo/.local/share/virtualenvs/pipenv-problem-qZknlxgQ/lib/python2.7/site-packages/pip/req/req_set.py", line 778, in install
requirement.uninstall(auto_confirm=True)
File "/Users/philfreo/.local/share/virtualenvs/pipenv-problem-qZknlxgQ/lib/python2.7/site-packages/pip/req/req_install.py", line 703, in uninstall
'(at %s)' % (link_pointer, self.name, dist.location)
AssertionError: Egg-link /Users/philfreo/.local/share/virtualenvs/pipenv-problem-qZknlxgQ/src/flask-sqlalchemy does not match installed location of flask-sqlalchemy (at /Users/philfreo/Sites/foo/pipenv-problem)
☤ ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 0/1 — 00:00:00 |
looks like you have a problem with your python installation. |
And yes you do have a pipfile. |
try running pipenv install twice. |
I meant that I didn't start with a Pipfile. After running the above, here's what was created:
Running Regarding my python installation, I'm currently pyenv via brew. I can try getting rid of pyenv? |
everything's working fine for me, with that pipfile (on python 2). |
do a 'pipenv lock' and then 'pipenv install' |
and make sure you have the latest version, please |
there was a bug in the previous versions, causing "flask-sqlalchemy" to be the lockfile twice. that has been fixed. |
i suspect that is the cause of your issue. |
|
|
Why are you installing flask-sqlalchemy from source anyway? any why is it editable? |
That worked! So, it seems like the following steps are all required in this order even in a fresh setup with nothing but the above requirements.txt:
I'm needed to fork flask-sqlalchemy in order to relax its requirements from Flask >= 0.10 to be 0.9 instead. flask-sqlalchemy (at least for my purposes) actually works fine with Flask 0.9, and I have a large application that would be non-trivial to update from Flask 0.9 to Flask 0.10. I'm only using If I simply remove the
(Note: this is just a reduced requirements.txt that shows the problem; my actual application has a much larger requirements.txt that I'm hoping to convert to pipenv) |
no, we fixed the bug. you just had an old lockfile present, which was causing those steps to be necessary. glad we fixed your bug! |
No, the error happens even when there's no lockfile present. Look at this:
|
I will investigate. |
cannot reproduce |
idk how you got a ./src folder in there, but it shouldn't be there. |
it seems to be what's causing all the trouble. |
try this in a fresh directory |
|
You've managed to magically avoid a dependency mismatch with this specific set of dependencies, somehow. Must be an implementation detail of the way pip-tool's resolver is written. You got lucky, basically :) |
Put another way: it's not unusual for us to fork a pypi public package to make some tweak -- some of them completely unrelated to dependencies. Seems like this only way to install those forks is with |
do you run your own pypi index? |
No |
then yes. |
otherwise, we have another solution: https://pipenv.readthedocs.io/en/latest/advanced.html#specifying-package-indexes |
-e is the way to go. i'll see about installing the egg-links into the venv instead of littering them in the project directory. |
Ok. I don't understand this stuff super well, but it still seems like a bug that I must do I'll see if I can use this workaround on my production app too. |
okay i got a patch in for installing the .egg-info's into venv/src/ |
I think your bug is becuase you have an egg-info laying around somewhere that should be there — to be clear, using this pipfile in a fresh directory works great for me. |
I showed an |
yes. |
this is why i recommend installing pipenv with pipsi https://pipenv.readthedocs.io/en/latest/advanced.html#fancy-installation-of-pipenv |
okay i just cut release 7.7.4, which contains that patch. see if that improves things for ya. |
Thanks. I'll try to cleanup everything and will give that a shot. Meanwhile, I get a different issue when trying things on my production app. I opened #673 with details. |
thanks for the patience |
With 7.7.4 However once I have a lockfile, deleting |
may have to pass additional args to pip tools |
I uninstalled pipenv from pip, installed pipsi and installed pipenv via pipsi (following this), and tried it again from scratch. Even then, I still had to do the
|
|
I don't know... I tried to show how I'm starting fresh. Maybe related to these lines:
|
What is the "error"/"failure" that causes it to retry? And maybe that's where the path you're asking about gets installed? |
Wonder why it fails the first time. |
I cannot reproduce this on my machine. |
okay, i think i found the source of the problem. Try v7.7.5. |
and delete any egg-info you see first |
It works! 🎆 👍 🍻 🙌
|
Thanks so much for all the help / fixes so far!! I'll see what kind of progress I can make on converting the production app now. |
✨🍰✨ |
Still having errors, with pipenv 7.6.9, trying to port a project. Here's a reduced/simplified case showing a reproducible error:
The text was updated successfully, but these errors were encountered: