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

2.0.0b1. private pypi. No candidate is found that matches the environment or hashes #1202

Closed
vitidev opened this issue Jul 5, 2022 · 1 comment
Labels
🐛 bug Something isn't working

Comments

@vitidev
Copy link

vitidev commented Jul 5, 2022

  • [ X ] I have searched the issue tracker and believe that this is not a duplicate.

Make sure you run commands with -v flag before pasting the output.

Steps to reproduce

local pypi server (via pypiserver)

pypi-server run -p 8080 -v packages

[[tool.pdm.source]]
url = "http://127.0.0.1:8080/simple/"
verify_ssl = false
name = "private"

dummy package (setup.py)

from setuptools import setup

setup(
    name='pdm-dummy',
    version='0.1.1',
    packages=['dummy'],
    package_dir={'': 'src'},
    url='',
    license='',
    author='',
    author_email='',
    description='pdm update test',
    extras_require={  }
)

test

pdm add pdm-dummy -v
Adding packages to default dependencies: pdm-dummy
pdm.termui: ======== Start resolving requirements ========
pdm.termui:   pdm-dummy
pdm.termui:   python>=3.10
pdm.termui:   Adding requirement pdm-dummy
unearth: Skip https://pypi.org/simple/pdm-dummy/ because of Client Error(404): Not Found.
pdm.termui:   Adding requirement python>=3.10
pdm.termui: ======== Starting round 0 ========
pdm.termui: Pinning: python None
pdm.termui: ======== Ending round 0 ========
pdm.termui: ======== Starting round 1 ========
pdm.termui: Pinning: pdm-dummy 0.1.1
pdm.termui: ======== Ending round 1 ========
pdm.termui: ======== Starting round 2 ========
pdm.termui: ======== Resolution Result ========
pdm.termui: Stable pins:
pdm.termui:      python None
pdm.termui:   pdm-dummy 0.1.1
unearth: Skip https://pypi.org/simple/pdm-dummy/ because of Client Error(404): Not Found.
  Lock successful
Changes are written to pdm.lock.
Changes are written to pyproject.toml.
Synchronizing working set with lock file: 1 to add, 0 to update, 0 to remove

unearth: Skip https://pypi.org/simple/pdm-dummy/ because of Client Error(404): Not Found.
  x Install pdm-dummy 0.1.1 failed
pdm.termui: Error occurs:
Traceback (most recent call last):
  File "C:\Python\lib\concurrent\futures\thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "C:\Users\user\.local\pipx\venvs\pdm\lib\site-packages\pdm\installers\synchronizers.py", line 217, in install_candidate
    self.manager.install(can)
  File "C:\Users\user\.local\pipx\venvs\pdm\lib\site-packages\pdm\installers\manager.py", line 39, in install
    installer(str(prepared.build()), self.environment, prepared.direct_url())
  File "C:\Users\user\.local\pipx\venvs\pdm\lib\site-packages\pdm\models\candidates.py", line 320, in build
    self.obtain(allow_all=False)
  File "C:\Users\user\.local\pipx\venvs\pdm\lib\site-packages\pdm\models\candidates.py", line 370, in obtain
    raise CandidateNotFound(
pdm.exceptions.CandidateNotFound: No candidate is found for `pdm-dummy` that matches the environment or hashes
Retry failed jobs
unearth: Skip https://pypi.org/simple/pdm-dummy/ because of Client Error(404): Not Found.
  x Install pdm-dummy 0.1.1 failed
pdm.termui: Error occurs:
Traceback (most recent call last):
  File "C:\Python\lib\concurrent\futures\thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "C:\Users\user\.local\pipx\venvs\pdm\lib\site-packages\pdm\installers\synchronizers.py", line 217, in install_candidate
    self.manager.install(can)
  File "C:\Users\user\.local\pipx\venvs\pdm\lib\site-packages\pdm\installers\manager.py", line 39, in install
    installer(str(prepared.build()), self.environment, prepared.direct_url())
  File "C:\Users\user\.local\pipx\venvs\pdm\lib\site-packages\pdm\models\candidates.py", line 320, in build
    self.obtain(allow_all=False)
  File "C:\Users\user\.local\pipx\venvs\pdm\lib\site-packages\pdm\models\candidates.py", line 370, in obtain
    raise CandidateNotFound(
pdm.exceptions.CandidateNotFound: No candidate is found for `pdm-dummy` that matches the environment or hashes
Traceback (most recent call last):
  File "C:\Python\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Python\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "c:\users\user\.local\bin\pdm.exe\__main__.py", line 7, in <module>
  File "C:\Users\user\.local\pipx\venvs\pdm\lib\site-packages\pdm\core.py", line 256, in main
    return Core().main(args)
  File "C:\Users\user\.local\pipx\venvs\pdm\lib\site-packages\pdm\core.py", line 189, in main
    raise cast(Exception, err).with_traceback(traceback)
  File "C:\Users\user\.local\pipx\venvs\pdm\lib\site-packages\pdm\core.py", line 184, in main
    f(options.project, options)
  File "C:\Users\user\.local\pipx\venvs\pdm\lib\site-packages\pdm\cli\commands\add.py", line 58, in handle
    actions.do_add(
  File "C:\Users\user\.local\pipx\venvs\pdm\lib\site-packages\pdm\cli\actions.py", line 288, in do_add
    do_sync(
  File "C:\Users\user\.local\pipx\venvs\pdm\lib\site-packages\pdm\cli\actions.py", line 218, in do_sync
    handler.synchronize()
  File "C:\Users\user\.local\pipx\venvs\pdm\lib\site-packages\pdm\installers\synchronizers.py", line 402, in synchronize
    raise InstallationError("Some package operations are not complete yet")
pdm.exceptions.InstallationError: Some package operations are not complete yet

Expected behavior

Successfully installed

Environment Information

# Paste the output of `pdm info && pdm info --env` below:
$ pdm info && pdm info --env
PDM version:
  2.0.0b1
Python Interpreter:
  C:\Python\python.exe (3.10)
Project Root:
  z:/0
Project Packages:
  z:\0\__pypackages__\3.10
{
  "implementation_name": "cpython",
  "implementation_version": "3.10.5",
  "os_name": "nt",
  "platform_machine": "AMD64",
  "platform_release": "10",
  "platform_system": "Windows",
  "platform_version": "10.0.19044",
  "python_full_version": "3.10.5",
  "platform_python_implementation": "CPython",
  "python_version": "3.10",
  "sys_platform": "win32"
}
@frostming
Copy link
Collaborator

Please try v2.0.0b2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants