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

pipenv install --pre doesn't work #3185

Closed
Vayel opened this issue Nov 7, 2018 · 3 comments
Closed

pipenv install --pre doesn't work #3185

Vayel opened this issue Nov 7, 2018 · 3 comments

Comments

@Vayel
Copy link

@Vayel Vayel commented Nov 7, 2018

Issue description

pipenv install --pre doesn't work when there are pre-release packages in the Pipfile.

Expected result

The same as:

pipenv lock --pre
pipenv install

Actual result

$ pipenv install --dev --pre
Pipfile.lock not found, creating…
Locking [dev-packages] dependencies…

Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
  First try clearing your dependency cache with $ pipenv lock --clear, then try the original command again.
 Alternatively, you can use $ pipenv install --skip-lock to bypass this mechanism, then run $ pipenv graph to inspect the situation.
  Hint: try $ pipenv lock --pre if it is a pre-release dependency.
Could not find a version that matches black
Skipped pre-versions: 18.3a0, 18.3a0, 18.3a1, 18.3a1, 18.3a2, 18.3a2, 18.3a3, 18.3a3, 18.3a4, 18.3a4, 18.4a0, 18.4a0, 18.4a1, 18.4a1, 18.4a2, 18.4a2, 18.4a3, 18.4a3, 18.4a4, 18.4a4, 18.5b0, 18.5b0, 18.5b1, 18.5b1, 18.6b0, 18.6b0, 18.6b1, 18.6b1, 18.6b2, 18.6b2, 18.6b3, 18.6b3, 18.6b4, 18.6b4, 18.9b0, 18.9b0
There are incompatible versions in the resolved dependencies.

Steps to replicate

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

[packages]
black = "*"
$ pipenv install --pre
Pipfile.lock not found, creating…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…

Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
  First try clearing your dependency cache with $ pipenv lock --clear, then try the original command again.
 Alternatively, you can use $ pipenv install --skip-lock to bypass this mechanism, then run $ pipenv graph to inspect the situation.
  Hint: try $ pipenv lock --pre if it is a pre-release dependency.
Could not find a version that matches black
Skipped pre-versions: 18.3a0, 18.3a0, 18.3a1, 18.3a1, 18.3a2, 18.3a2, 18.3a3, 18.3a3, 18.3a4, 18.3a4, 18.4a0, 18.4a0, 18.4a1, 18.4a1, 18.4a2, 18.4a2, 18.4a3, 18.4a3, 18.4a4, 18.4a4, 18.5b0, 18.5b0, 18.5b1, 18.5b1, 18.6b0, 18.6b0, 18.6b1, 18.6b1, 18.6b2, 18.6b2, 18.6b3, 18.6b3, 18.6b4, 18.6b4, 18.9b0, 18.9b0
There are incompatible versions in the resolved dependencies.

But if we lock first, it works:

$ pipenv lock --pre
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Updated Pipfile.lock (ec9a68)!
$ pipenv install
Installing dependencies from Pipfile.lock (ec9a68)…
  🐍   ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 5/5 — 00:00:00
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.

pipenv install --pre is expected to work because the --pre option is mentioned in pipenv install -h.


$ pipenv --support

Pipenv version: '2018.10.13'

Pipenv location: '/home/simudyne/.local/lib/python3.6/site-packages/pipenv'

Python location: '/home/simudyne/anaconda3/bin/python3'

Python installations found:

  • 3.6.6: /usr/bin/python3.6
  • 3.6.6: /usr/bin/python3.6m
  • 2.7.15rc1: /usr/bin/python2.7

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '3.6.4',
 'os_name': 'posix',
 'platform_machine': 'x86_64',
 'platform_python_implementation': 'CPython',
 'platform_release': '4.15.0-38-generic',
 'platform_system': 'Linux',
 'platform_version': '#41-Ubuntu SMP Wed Oct 10 10:59:38 UTC 2018',
 'python_full_version': '3.6.4',
 'python_version': '3.6',
 'sys_platform': 'linux'}

System environment variables:

  • CLUTTER_IM_MODULE
  • SIMUDYNE_PASSWORD
  • LS_COLORS
  • LESSCLOSE
  • XDG_MENU_PREFIX
  • LANG
  • GDM_LANG
  • DISPLAY
  • GTK2_MODULES
  • COLORTERM
  • XDG_VTNR
  • SSH_AUTH_SOCK
  • MANDATORY_PATH
  • XDG_SESSION_ID
  • XDG_GREETER_DATA_DIR
  • USER
  • DESKTOP_SESSION
  • QT4_IM_MODULE
  • TEXTDOMAINDIR
  • GNOME_TERMINAL_SCREEN
  • DEFAULTS_PATH
  • QT_QPA_PLATFORMTHEME
  • PWD
  • HOME
  • TEXTDOMAIN
  • SSH_AGENT_PID
  • QT_ACCESSIBILITY
  • XDG_SESSION_TYPE
  • XDG_DATA_DIRS
  • XDG_SESSION_DESKTOP
  • GJS_DEBUG_OUTPUT
  • GTK_MODULES
  • TERM
  • SHELL
  • VTE_VERSION
  • XDG_SEAT_PATH
  • QT_IM_MODULE
  • XMODIFIERS
  • IM_CONFIG_PHASE
  • XDG_CURRENT_DESKTOP
  • GPG_AGENT_INFO
  • GNOME_TERMINAL_SERVICE
  • XDG_SEAT
  • SHLVL
  • LANGUAGE
  • GDMSESSION
  • GNOME_DESKTOP_SESSION_ID
  • LOGNAME
  • DBUS_SESSION_BUS_ADDRESS
  • XDG_RUNTIME_DIR
  • XAUTHORITY
  • XDG_SESSION_PATH
  • XDG_CONFIG_DIRS
  • PATH
  • GJS_DEBUG_TOPICS
  • SESSION_MANAGER
  • SIMUDYNE_USER
  • LESSOPEN
  • GTK_IM_MODULE
  • _
  • OLDPWD
  • PYTHONDONTWRITEBYTECODE
  • PIP_SHIMS_BASE_MODULE
  • PIP_PYTHON_PATH

Pipenv–specific environment variables:

Debug–specific environment variables:

  • PATH: /home/simudyne/anaconda3/bin:/home/simudyne/bin:/home/simudyne/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
  • SHELL: /bin/bash
  • LANG: en_GB.UTF-8
  • PWD: /tmp/pipenv_tmp

Contents of Pipfile ('/tmp/pipenv_tmp/Pipfile'):

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

[packages]
black = "*"

Contents of Pipfile.lock ('/tmp/pipenv_tmp/Pipfile.lock'):

{
    "_meta": {
        "hash": {
            "sha256": "dfc10fff42e3ba8a498208323198291e5e3d3e33cc2fc42131dc6d0675ec9a68"
        },
        "pipfile-spec": 6,
        "requires": {},
        "sources": [
            {
                "name": "pypi",
                "url": "https://pypi.python.org/simple",
                "verify_ssl": true
            }
        ]
    },
    "default": {
        "appdirs": {
            "hashes": [
                "sha256:9e5896d1372858f8dd3344faf4e5014d21849c756c8d5701f78f8a103b372d92",
                "sha256:d8b24664561d0d34ddfaec54636d502d7cea6e29c3eaf68f3df6180863e2166e"
            ],
            "version": "==1.4.3"
        },
        "attrs": {
            "hashes": [
                "sha256:10cbf6e27dbce8c30807caf056c8eb50917e0eaafe86347671b57254006c3e69",
                "sha256:ca4be454458f9dec299268d472aaa5a11f67a4ff70093396e1ceae9c76cf4bbb"
            ],
            "version": "==18.2.0"
        },
        "black": {
            "hashes": [
                "sha256:817243426042db1d36617910df579a54f1afd659adb96fc5032fcf4b36209739",
                "sha256:e030a9a28f542debc08acceb273f228ac422798e5215ba2a791a6ddeaaca22a5"
            ],
            "index": "pypi",
            "version": "==18.9b0"
        },
        "click": {
            "hashes": [
                "sha256:2335065e6395b9e67ca716de5f7526736bfa6ceead690adf616d925bdc622b13",
                "sha256:5b94b49521f6456670fdb30cd82a4eca9412788a93fa6dd6df72c94d5a8ff2d7"
            ],
            "version": "==7.0"
        },
        "toml": {
            "hashes": [
                "sha256:229f81c57791a41d65e399fc06bf0848bab550a9dfd5ed66df18ce5f05e73d5c",
                "sha256:235682dd292d5899d361a811df37e04a8828a5b1da3115886b73cf81ebc9100e"
            ],
            "version": "==0.10.0"
        }
    },
    "develop": {}
}
@techalchemy
Copy link
Member

@techalchemy techalchemy commented Nov 7, 2018

it works fine in most cases, i'm guessing it would work fine if you erased everything including the venv and tried it again and that it was a caching issue. Can you check?

techalchemy added a commit that referenced this issue Nov 8, 2018
- Pass `pre` correctly when using `pipenv install --pre`
- Ensures we always make inline tables when writing to pipfile
- Fixes #3183
- Fixes #3185

Signed-off-by: Dan Ryan <dan@danryan.co>
@Vayel
Copy link
Author

@Vayel Vayel commented Nov 8, 2018

@techalchemy Here is the full process:

cd /tmp
mkdir pipenv_3185
cd pipenv_3185
echo '[[source]]' >> Pipfile
echo 'url = "https://pypi.python.org/simple"' >> Pipfile
echo 'verify_ssl = true' >> Pipfile
echo 'name = "pypi"' >> Pipfile
echo '' >> Pipfile
echo '[packages]' >> Pipfile
echo 'black = "*"' >> Pipfile

When I run pipenv install, I obtain:

$ pipenv install --pre

Creating a virtualenv for this project…
Pipfile: /tmp/pipenv_3185/Pipfile
Using /home/simudyne/anaconda3/bin/python3 (3.6.4) to create virtualenv…
⠇Already using interpreter /home/simudyne/anaconda3/bin/python3
Using base prefix '/home/simudyne/anaconda3'
New python executable in /home/simudyne/.local/share/virtualenvs/pipenv_3185-vbyD6CVq/bin/python3
Also creating executable in /home/simudyne/.local/share/virtualenvs/pipenv_3185-vbyD6CVq/bin/python
Installing setuptools, pip, wheel...done.

Virtualenv location: /home/simudyne/.local/share/virtualenvs/pipenv_3185-vbyD6CVq
Pipfile.lock not found, creating…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…

Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
  First try clearing your dependency cache with $ pipenv lock --clear, then try the original command again.
 Alternatively, you can use $ pipenv install --skip-lock to bypass this mechanism, then run $ pipenv graph to inspect the situation.
  Hint: try $ pipenv lock --pre if it is a pre-release dependency.
Could not find a version that matches black
Skipped pre-versions: 18.3a0, 18.3a0, 18.3a1, 18.3a1, 18.3a2, 18.3a2, 18.3a3, 18.3a3, 18.3a4, 18.3a4, 18.4a0, 18.4a0, 18.4a1, 18.4a1, 18.4a2, 18.4a2, 18.4a3, 18.4a3, 18.4a4, 18.4a4, 18.5b0, 18.5b0, 18.5b1, 18.5b1, 18.6b0, 18.6b0, 18.6b1, 18.6b1, 18.6b2, 18.6b2, 18.6b3, 18.6b3, 18.6b4, 18.6b4, 18.9b0, 18.9b0
There are incompatible versions in the resolved dependencies.

I also tried to clear the cache:

$ pipenv install --pre --clear

Creating a virtualenv for this project…
Pipfile: /tmp/pipenv_3185/Pipfile
Using /home/simudyne/anaconda3/bin/python3 (3.6.4) to create virtualenv…
⠏Already using interpreter /home/simudyne/anaconda3/bin/python3
Using base prefix '/home/simudyne/anaconda3'
New python executable in /home/simudyne/.local/share/virtualenvs/pipenv_3185-vbyD6CVq/bin/python3
Also creating executable in /home/simudyne/.local/share/virtualenvs/pipenv_3185-vbyD6CVq/bin/python
Installing setuptools, pip, wheel...done.

Virtualenv location: /home/simudyne/.local/share/virtualenvs/pipenv_3185-vbyD6CVq
Pipfile.lock not found, creating…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…

Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
  First try clearing your dependency cache with $ pipenv lock --clear, then try the original command again.
 Alternatively, you can use $ pipenv install --skip-lock to bypass this mechanism, then run $ pipenv graph to inspect the situation.
  Hint: try $ pipenv lock --pre if it is a pre-release dependency.
Could not find a version that matches black
Skipped pre-versions: 18.3a0, 18.3a0, 18.3a1, 18.3a1, 18.3a2, 18.3a2, 18.3a3, 18.3a3, 18.3a4, 18.3a4, 18.4a0, 18.4a0, 18.4a1, 18.4a1, 18.4a2, 18.4a2, 18.4a3, 18.4a3, 18.4a4, 18.4a4, 18.5b0, 18.5b0, 18.5b1, 18.5b1, 18.6b0, 18.6b0, 18.6b1, 18.6b1, 18.6b2, 18.6b2, 18.6b3, 18.6b3, 18.6b4, 18.6b4, 18.9b0, 18.9b0
There are incompatible versions in the resolved dependencies.

With lock + install, it works:

$ pipenv lock --pre

Creating a virtualenv for this project…
Pipfile: /tmp/pipenv_3185/Pipfile
Using /home/simudyne/anaconda3/bin/python3 (3.6.4) to create virtualenv…
⠇Already using interpreter /home/simudyne/anaconda3/bin/python3
Using base prefix '/home/simudyne/anaconda3'
New python executable in /home/simudyne/.local/share/virtualenvs/pipenv_3185-vbyD6CVq/bin/python3
Also creating executable in /home/simudyne/.local/share/virtualenvs/pipenv_3185-vbyD6CVq/bin/python
Installing setuptools, pip, wheel...done.

Virtualenv location: /home/simudyne/.local/share/virtualenvs/pipenv_3185-vbyD6CVq
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Updated Pipfile.lock (ec9a68)!

$ pipenv install

Installing dependencies from Pipfile.lock (ec9a68)…
  🐍   ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 5/5 — 00:00:00
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.
@techalchemy
Copy link
Member

@techalchemy techalchemy commented Nov 8, 2018

yup I already have a fix up (thus the PR pointing at this issue)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.