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

Error: No version available for nautc #66

Closed
1 task done
nasyxx opened this issue Mar 7, 2020 · 1 comment · Fixed by #67
Closed
1 task done

Error: No version available for nautc #66

nasyxx opened this issue Mar 7, 2020 · 1 comment · Fixed by #67
Labels
🐛 bug Something isn't working 🧩 dependency resolution Resolution failures

Comments

@nasyxx
Copy link
Sponsor Contributor

nasyxx commented Mar 7, 2020

  • 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.

The nautc package is here:

https://pypi.org/project/nautc/

https://github.com/nasyxx/nautc.git

Steps to reproduce

mkdir temp && cd temp
pdm init
pdm add nautc

Actual behavior

Failed to add package nautc.

λ pdm add -v nautc
Adding packages to default dependencies: nautc
Error: No version available for nautc.
Traceback (most recent call last):
  File "/Users/Nasy/.pyenv/versions/3.8.1/lib/python3.8/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/Users/Nasy/.pyenv/versions/3.8.1/lib/python3.8/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/Nasy/.pyenv/versions/3.8.1/lib/python3.8/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/Nasy/.pyenv/versions/3.8.1/lib/python3.8/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/Users/Nasy/.pyenv/versions/3.8.1/lib/python3.8/site-packages/click/decorators.py", line 64, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/Users/Nasy/.pyenv/versions/3.8.1/lib/python3.8/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/Users/Nasy/.pyenv/versions/3.8.1/lib/python3.8/site-packages/pdm/cli/commands.py", line 205, in add
    actions.do_add(project, dev, section, sync, save, strategy, editables, packages)
  File "/Users/Nasy/.pyenv/versions/3.8.1/lib/python3.8/site-packages/pdm/cli/actions.py", line 218, in do_add
    resolved = do_lock(project, strategy, tracked_names, all_dependencies)
  File "/Users/Nasy/.pyenv/versions/3.8.1/lib/python3.8/site-packages/pdm/cli/actions.py", line 135, in do_lock
    mapping, dependencies, summaries = resolve(
  File "/Users/Nasy/.pyenv/versions/3.8.1/lib/python3.8/site-packages/pdm/resolver/__init__.py", line 119, in resolve
    state = resolver.resolve({k: reqs.values() for k, reqs in requirements.items()})
  File "/Users/Nasy/.pyenv/versions/3.8.1/lib/python3.8/site-packages/pdm/resolver/resolvers.py", line 298, in resolve
    resolution.resolve(requirements, max_rounds=max_rounds)
  File "/Users/Nasy/.pyenv/versions/3.8.1/lib/python3.8/site-packages/pdm/resolver/resolvers.py", line 237, in resolve
    self._contribute_to_criteria(name, requirement, parent=f"__{key}__")
  File "/Users/Nasy/.pyenv/versions/3.8.1/lib/python3.8/site-packages/pdm/resolver/resolvers.py", line 124, in _contribute_to_criteria
    crit = Criterion.from_requirement(self._p, requirement, parent)
  File "/Users/Nasy/.pyenv/versions/3.8.1/lib/python3.8/site-packages/pdm/resolver/resolvers.py", line 51, in from_requirement
    raise NoVersionsAvailable(requirement, parent)
pdm.exceptions.NoVersionsAvailable: No version available for nautc.

Expected behavior

It should successfully add package nautc.

Environment Information

pdm version:

# Paste the output of `pdm info && pdm info --env` below:
Python Interpreter: /Users/Nasy/.pyenv/versions/3.8.1/bin/python (3.8.1)
Project Root:       /Users/Nasy/temp/tp
{
  "implementation_name": "cpython",
  "implementation_version": "3.8.1",
  "os_name": "posix",
  "platform_machine": "x86_64",
  "platform_release": "19.3.0",
  "platform_system": "Darwin",
  "platform_version": "Darwin Kernel Version 19.3.0: Thu Jan  9 20:58:23 PST 2020; root:xnu-6153.81.5~1/RELEASE_X86_64",
  "python_full_version": "3.8.1",
  "platform_python_implementaiton": "CPython",
  "python_version": "3.8",
  "sys_platform": "darwin"
}
@nasyxx nasyxx added the 🐛 bug Something isn't working label Mar 7, 2020
@frostming frostming added the 🧩 dependency resolution Resolution failures label Mar 8, 2020
@frostming
Copy link
Collaborator

Ah, pdm tries to find candidates that are compatible with all versions specified in python_requires in pyproject.toml. nautc requires python >=3.6, <4.0, so pdm thinks it supports a narrower set of python versions than the project.

It is a bug, pdm needs to ignore that <4.0 for now.

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

Successfully merging a pull request may close this issue.

2 participants