-
-
Notifications
You must be signed in to change notification settings - Fork 612
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
pip-compile fails with TypeError on Ubuntu 16.04 + Python 3.5 #349
Comments
Weird, I cannot replicate this locally on a Mac. I was using the exact same commands you were using here. Must be some platform-specific issue. |
Definitely platform specific, it worked on earlier Ubuntu and Python 3.4. I'll try to find time later, to dig deeper into this one |
It is not specific to python 3.5.1. In ubuntu 16.04:
|
Tried like this (incorporating pull request #350):
pip-compile now passes, pip-sync doesn't:
|
After I do the following pip-sync passes:
Why does first pip-sync do the following?
|
I'm encountering this problem as well with Ubuntu 16.04 and Python 3.5. Apparently |
Making sure we pass strings to diff --git a/piptools/repositories/pypi.py b/piptools/repositories/pypi.py
index 79c8674..0a3849c 100644
--- a/piptools/repositories/pypi.py
+++ b/piptools/repositories/pypi.py
@@ -95,8 +95,8 @@ class PyPIRepository(BaseRepository):
return ireq # return itself as the best match
all_candidates = self.find_all_candidates(ireq.name)
- candidates_by_version = lookup_table(all_candidates, key=lambda c: c.version, unique=True)
- matching_versions = ireq.specifier.filter((candidate.version for candidate in all_candidates),
+ candidates_by_version = lookup_table(all_candidates, key=lambda c: str(c.version), unique=True)
+ matching_versions = ireq.specifier.filter((str(candidate.version) for candidate in all_candidates),
prereleases=prereleases)
# Reuses pip's internal candidate sort key to sort |
I'm on Mac OS X 10.11.4 with latest command line tools (v7.3) and this exact thing happens to me as well, but only under Python 3.5. @nvie which version of the command line tools are you running? |
The second part @tadamic mentioned ( |
Latest try on
@nvie, I'd say the remaining problem in this issue is equal to one described in #422 so
|
For me the same. pip-sync uninstalls pkg-resources-0.0.0 |
Should be fixed: |
Create virtual env and install
pip
andpip-tools
:Then compile
requirements.in
:The text was updated successfully, but these errors were encountered: