-
-
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
Cannot build lock even though dependencies are found. #931
Comments
The shakedown package should probably be Python 3 only. However, I think that pipenv should create the lock only for a specific Python version if the Pipefile includes a required Python version. |
Here is the verbose output of the lock
|
This is odd. When I install dcsocli with
followed by
why is it trying to install 0.4.14 of dcoscli? Especially when |
It’s not. This is the locking process. It’s doing dependency resolution based on what it know and what you have cached. Try pipenv lock —clear
… On Oct 18, 2017, at 6:16 AM, Karsten Jeschkies ***@***.***> wrote:
This is odd. When I install dcsocli with pipenv --three install dcoscli I see
Installing dcoscli…
Collecting dcoscli
Using cached dcoscli-0.5.5-py3-none-any.whl
followed by
ROUND 1
Current constraints:
dcos-shakedown from git+https://github.com/dcos/shakedown.git#egg=dcos-shakedown
dcoscli
Finding the best candidates:
found candidate -e git+https://github.com/dcos/shakedown.git#egg=dcos-shakedown (constraint was <any>)
found candidate dcoscli==0.4.14 (constraint was <any>)
Finding secondary dependencies:
dcoscli==0.4.14 requires dcos==0.4.14, dcoscli==0.4.14, docopt<1.0,>=0.6, pkginfo==1.2.1, toml<1.0,>=0.9, virtualenv<16.0,>=13.0
why is it trying to install 0.4.14 of dcoscli? Especially when pipenv --three run dcos --version outputs dcoscli.version=0.5.5.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
You’ll need to provide the output of pipenv lock —verbose and pipenv —version
… On Oct 18, 2017, at 6:16 AM, Karsten Jeschkies ***@***.***> wrote:
This is odd. When I install dcsocli with pipenv --three install dcoscli I see
Installing dcoscli…
Collecting dcoscli
Using cached dcoscli-0.5.5-py3-none-any.whl
followed by
ROUND 1
Current constraints:
dcos-shakedown from git+https://github.com/dcos/shakedown.git#egg=dcos-shakedown
dcoscli
Finding the best candidates:
found candidate -e git+https://github.com/dcos/shakedown.git#egg=dcos-shakedown (constraint was <any>)
found candidate dcoscli==0.4.14 (constraint was <any>)
Finding secondary dependencies:
dcoscli==0.4.14 requires dcos==0.4.14, dcoscli==0.4.14, docopt<1.0,>=0.6, pkginfo==1.2.1, toml<1.0,>=0.9, virtualenv<16.0,>=13.0
why is it trying to install 0.4.14 of dcoscli? Especially when pipenv --three run dcos --version outputs dcoscli.version=0.5.5.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Clearing the lock cache did not help. Here is the full output of
|
FYI every time you pass --three you are telling pipenv to destroy your existing virtualenv, not sure if that was intended but just FYI. I will look into this a bit more but at a glance since you have pyenv installed you should set the environment variable |
@techalchemy, thanks. I did not know that |
I still think that the issue is that pipenv tries to create a closure for Python 2 and that shakedown is not limited to Python 3. |
Throwing in my observation on the dependency resolution behavior: Taking a guess here on the environment here, I'd say I'm not an expert (yet) on how |
Thanks for the pointers @vphilippon. I've ripped out my old pyenv version and installed the latest and Python 3.5.2. I then updated pip to 9.0.1 outside of the virtualenv. I also patched shakedown to require a specific Python version and used git dependencies. See I wonder how the lock works since it does not mention the commit hash as far as I can tell. Also, the lock states the dcos cli version as 0.4.14 but Overall I wonder how pipenv is handling different Python versions and what should be expected from pipenv in that regard. |
Hm the lock does not work for the dependencies:
So basically installing with |
Well the command you ran just reused the lockfile you had present already, I believe pipenv first needs to be told which version of python it is supposed to use if you need a different version from the default for your use case |
Looking at that, the default, the venv seems to use Python 3.5.2, and evaluates markers as such. That looks like a step forward. @jeschkies I would delete the |
I agree with @vphilippon but if you have further issues I would ask if you can provide your |
I did start fresh without a |
Alright. I've reproduced the issue in a clean folder. You see all commands out the output in this gist. Here is what I try to do and what happens:
|
Right but I still need you to include your |
Here is the output of |
The "dcos": {
"hashes": [
"sha256:3d48d0773b5dd5e82ddb9cfa946f17755789e8c2ff53ecc75b32194b41248611"
],
"version": "==0.4.14"
} but the |
Allright, this verbose output given is coherent and match the content of the I tried the steps and could not reproduce. I get:
and, from
both on the first install, and on the re-install from the @jeschkies In the commands from the gist, I've seen no Otherwise, if we're 100% sure the dependency cache was cleared, please give the output of |
@vphilippon are you using
The |
@jeschkies No, I'm not using We'll need someone to try using |
I don't believe pipenv respects the local pyenv setting, which will cause problems for you potentially. When I attempted to just run Running the command as "dcos": {
"hashes": [
"sha256:01d722e13296bd38c2b391ffbd5bc111fa7b5ec09bb058651713bce62a2d45a7"
],
"version": "==0.5.5"
},
"dcos-shakedown": {
"editable": true,
"git": "https://github.com/jeschkies/shakedown.git",
"ref": "012841a38a59d00043c15a66400501811715ab86"
},
"dcoscli": {
"hashes": [
"sha256:47b442a2823ab3b27cd520f5c3762ab0e630eca473a273e111619bd5c1a16ea6"
],
"version": "==0.5.5"
},
|
FYI this is an issue related to how pipenv resolves pyenv python paths, since it doesn't know about pyenv local settings it will use its own guess at which python interpreter to use in the virtualenv as compared with for dependency resolution. These will wind up being different because one will be resolved by the pyenv shims and one will not. |
@techalchemy is this a bug in pipenv or pyenv or both??? |
Here is the output of
This is so strange. Even with |
@jeschkies try @erinxocon it’s only a bug if you think pipenv should respect local pyenv settings in general. What I mean is, if you set |
@techalchemy even a |
@jeschkies It just looks at your $PATH variable to search through. @techalchemy I'm torn. Kinda seems like a user environment issue, out of the scope of pipenv. However that was originally our thinking when using pew for virtualenv management, which caused more problems due to shells that aren't configured correctly, so while not a pipenv issue, we changed to avoid problems. |
@erinxocon hm, how would you have different Python versions without pyenv? Should I just installed them and have all of them on |
@jeschkies normal python gets put on the path, and if you install 6 versions yes, all go on your path. Pyenv is a helper function but is definitely not necessary, and pipenv doesn’t read configuration files. It just looks on your path for what ‘python’ points at unless you specify a version or a specific executable. Pyenv shims are a bit messy which I believe is why we don’t use them. |
|
Hm, ok. So is there another way to manage Python versions that work nicer with pipenv? |
@jeschkies nicer? I personally use pyenv with |
I have the same issue when trying to install I've installed Pipenv globally through Homebrew, and I use pyenv to manage my Python versions. I've also specified It fails when I run I've tried using the |
Hi @jamieconnolly I think this might have something to do with the shims pyenv puts in place to make multiple environments available. Can't be sure on this as I don't use pyenv. |
@jamieconnolly I am guessing it is related to the same bug we have touchpoints for in various places relating to, as you mentioned, dependency resolution trickery. One question though -- does |
@jamieconnolly, thanks for the hint. I'll try using a pipenv installation through pip of the local pyenv configuration. @techalchemy, I should be more specific. It seems that pipenv is not picking up the correct Python version from pyenv when it generates the Pipfile.lock. As you've said
Since the answer is not necessarily yes, I'm wondering how I can manage different Python version so that pipenv picks up the correct one when it generates the lock file. I'll give |
@jeschkies what I meant by that is it doesn't respect whatever you set with |
Ok, but I'm wondering why the |
@jeschkies because if you don't specify a version, |
@techalchemy, ah, ok, I think I get a sense of the difference now. So |
@jeschkies that's mostly right, although I think |
I am seeing the same issue with Pipfile
When I try to lock, even with
So when I do that, and run the graph:
Just can't create a lock file if I specify the version like that. If I drop the And here's a another output:
|
Sorry to spam everyone, but I also found a "workaround" my issue. I initially had piping installed via This version of |
I seem to have gotten round a similar issue by removing the |
this is likely because of setup.py constraints, nothing we can do about it |
e.g. install pipenv with python3 |
Homebrew pipenv will soon use python3 as it's default to help avoid these things. |
Be sure to check the existing issues, both open and closed.
Describe the issue briefly here.
Describe you environment
Expected result
I want to install shakedown with
pipenv --three install dcos-shakedown
. It should create a Pipfile and a lock.Actual result
I get the following output
This is odd since
pipenv --three install dcoscli
can install 0.5.5 and create a lock. There is a dcoscli-0.5.5 on PyPi. I assumes that pipenv tries to create a closure for Python 2 as well but there is no dcoscli 0.5.5 for Python 2.Steps to replicate
Just run
pipenv --three install --verbose dcos-shakedown
with Python 3.5.The text was updated successfully, but these errors were encountered: