Skip to content
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

Package from Pipfile.lock ignored because of last (irrelevant) marker not matching #2520

Closed
dresnick-sf opened this issue Jul 5, 2018 · 5 comments
Assignees
Labels
Category: Dependency Resolution Issue relates to dependency resolution. Type: Bug 🐛 This issue is a bug.

Comments

@dresnick-sf
Copy link

Issue description

This package is not installed though I'm running with python 2.7:

        "monotonic": {
            "hashes": [
                "sha256:23953d55076df038541e648a53676fb24980f7a1be290cdda21300b3bc21dfb0",
                "sha256:552a91f381532e33cbd07c6a2655a21908088962bb8fa7239ecbcc6ad1140cc7"
            ],
            "markers": "python_version == '2.6' or python_version == '2.7' or python_version == '3.0' or python_version == '3.1' or python_version == '3.2'",
            "version": "==1.5"
        }

The output from pipenv:

Ignoring monotonic: markers 'python_version == "3.2"' don't match your environment
Expected result

A package with markers matching my version of python to be installed.

Actual result

When running with -v I see this as it is installing:

Installing "monotonic==1.5; python_version == '3.2' --hash=sha256:23953d55076df038541e648a53676fb24980f7a1be290cdda21300b3bc21dfb0 --hash=sha256:552a91f381532e33cbd07c6a2655a21908088962bb8fa7239ecbcc6ad1140cc7"
Steps to replicate

Building this Dockerfile shows the problem.

FROM ubuntu:xenial-20180525

RUN set -x \
	&& DEBIAN_FRONTEND=noninteractive \
	&& apt-get update \
	&& apt-get -y --no-install-recommends install \
		python-pip \
		python-setuptools \
	&& pip install --upgrade pip==10.0.1 pipenv==2018.7.1 \
	&& apt-get clean
WORKDIR /home
RUN set -x \
	&& pipenv install monotonic \
	&& cat Pipfile.lock \
	&& pipenv --rm \
	&& rm Pipfile* \
	&& pipenv install click coloredlogs \
	&& pipenv --rm \
	&& pipenv install --deploy --system
RUN pipenv --support

The key part of the output:

+ pipenv install --deploy --system
Installing dependencies from Pipfile.lock (fe9a7a)...
Ignoring monotonic: markers 'python_version == "3.2"' don't match your environment

$ pipenv --support

Pipenv version: '2018.7.1'

Pipenv location: '/usr/local/lib/python2.7/dist-packages/pipenv'

Python location: '/usr/bin/python'

Other Python installations in PATH:

  • 2.7: /usr/bin/python2.7

  • 2.7: /usr/bin/python2.7

  • 2.7.12: /usr/bin/python

  • 2.7.12: /usr/bin/python2

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '0',
 'os_name': 'posix',
 'platform_machine': 'x86_64',
 'platform_python_implementation': 'CPython',
 'platform_release': '4.9.87-linuxkit-aufs',
 'platform_system': 'Linux',
 'platform_version': '#1 SMP Wed Mar 14 15:12:16 UTC 2018',
 'python_full_version': '2.7.12',
 'python_version': '2.7',
 'sys_platform': 'linux2'}

System environment variables:

  • HOSTNAME
  • PYTHONDONTWRITEBYTECODE
  • PATH
  • PWD
  • PIP_PYTHON_PATH
  • HOME

Pipenv–specific environment variables:

Debug–specific environment variables:

  • PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
  • PWD: /home

Contents of Pipfile ('/home/Pipfile'):

[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[dev-packages]

[packages]
click = "*"
coloredlogs = "*"

[requires]
python_version = "2.7"

Contents of Pipfile.lock ('/home/Pipfile.lock'):

{
    "_meta": {
        "hash": {
            "sha256": "b9e4a130dd91096ccb8440b9f0d585991e5ce067fcb232f5ba420792e5fe9a7a"
        },
        "pipfile-spec": 6,
        "requires": {
            "python_version": "2.7"
        },
        "sources": [
            {
                "name": "pypi",
                "url": "https://pypi.org/simple",
                "verify_ssl": true
            }
        ]
    },
    "default": {
        "click": {
            "hashes": [
                "sha256:29f99fc6125fbc931b758dc053b3114e55c77a6e4c6c3a2674a2dc986016381d",
                "sha256:f15516df478d5a56180fbf80e68f206010e6d160fc39fa508b65e035fd75130b"
            ],
            "index": "pypi",
            "version": "==6.7"
        },
        "coloredlogs": {
            "hashes": [
                "sha256:34fad2e342d5a559c31b6c889e8d14f97cb62c47d9a2ae7b5ed14ea10a79eff8",
                "sha256:b869a2dda3fa88154b9dd850e27828d8755bfab5a838a1c97fbc850c6e377c36"
            ],
            "index": "pypi",
            "version": "==10.0"
        },
        "humanfriendly": {
            "hashes": [
                "sha256:72a2efa8b477abb4fbdb3e5e224942c13e201c1df8c70fc244ef13b982ceb010",
                "sha256:937b4d2c99d29007023ebcab23579429541bfb3357a97e5df38fc5d851a112a3"
            ],
            "version": "==4.12.1"
        },
        "monotonic": {
            "hashes": [
                "sha256:23953d55076df038541e648a53676fb24980f7a1be290cdda21300b3bc21dfb0",
                "sha256:552a91f381532e33cbd07c6a2655a21908088962bb8fa7239ecbcc6ad1140cc7"
            ],
            "markers": "python_version == '2.6' or python_version == '2.7' or python_version == '3.0' or python_version == '3.1' or python_version == '3.2'",
            "version": "==1.5"
        }
    },
    "develop": {}
}
@dresnick-sf
Copy link
Author

This works as expected with v2018.05.18.

@uranusjr
Copy link
Member

uranusjr commented Jul 5, 2018

Hi! Could you help verify whether this happens at 2018.6.25? It would help us a lot to pin down exactly what change caused this issue. Thanks! Also, sorry for the bug :(

@uranusjr uranusjr added the Type: Bug 🐛 This issue is a bug. label Jul 5, 2018
@dresnick-sf
Copy link
Author

It has the same error on 2018.6.25.

@uranusjr
Copy link
Member

uranusjr commented Jul 5, 2018

I see, thanks so much! We’ll investigate.

@techalchemy
Copy link
Member

the debugging info on here is actually super helpful, I think I know exactly why this is happening and how to fix. Thanks for reporting

@techalchemy techalchemy self-assigned this Jul 5, 2018
@techalchemy techalchemy added the Category: Dependency Resolution Issue relates to dependency resolution. label Jul 5, 2018
techalchemy added a commit to sarugaku/requirementslib that referenced this issue Jul 11, 2018
- Fixes #25
- Fixes pypa/pipenv#2520

Signed-off-by: Dan Ryan <dan@danryan.co>
techalchemy added a commit to sarugaku/requirementslib that referenced this issue Mar 31, 2020
- Fixes #25
- Fixes pypa/pipenv#2520

Signed-off-by: Dan Ryan <dan@danryan.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Dependency Resolution Issue relates to dependency resolution. Type: Bug 🐛 This issue is a bug.
Projects
None yet
Development

No branches or pull requests

3 participants