Skip to content

Can't add package: WheelBuildError #90

Closed
@Aloxaf

Description

  • 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

❯ pdm init -v
Creating a pyproject.toml for PDM...
Please enter the Python interpreter to use:
0. /usr/bin/python3 (3.8.2)
1. /usr/bin/python2 (2.7.17)
Please select: [0]: 0
Using Python interpreter: /usr/bin/python3 (3.8.2)
Project name [test]:
Project version [0.0.0]:
License(SPDX name) [MIT]:
Author name [Aloxaf]:
Author email [aloxafx@gmail.com]:
Python requires('*' to allow any) [>=3.8]: >=3.6
Changes are written to pyproject.toml.
❯ pdm add python-telegram-bot -v
Adding packages to default dependencies: python-telegram-bot
⠹ Resolved: decorator 4.4.2See /tmp/pdm-lock-_mj6r4jp.log for detailed debug log.
Traceback (most recent call last):
  File "/home/aloxaf/.local/bin/pdm", line 8, in <module>
    sys.exit(main())
  File "/home/aloxaf/.local/pipx/venvs/pdm/lib/python3.8/site-packages/pdm/core.py", line 68, in __call__
    return self.main(*args, **kwargs)
  File "/home/aloxaf/.local/pipx/venvs/pdm/lib/python3.8/site-packages/pdm/core.py", line 100, in main
    raise err.with_traceback(traceback)
  File "/home/aloxaf/.local/pipx/venvs/pdm/lib/python3.8/site-packages/pdm/core.py", line 96, in main
    f(options.project, options)
  File "/home/aloxaf/.local/pipx/venvs/pdm/lib/python3.8/site-packages/pdm/cli/commands/add.py", line 35, in handle
    actions.do_add(
  File "/home/aloxaf/.local/pipx/venvs/pdm/lib/python3.8/site-packages/pdm/cli/actions.py", line 136, in do_add
    resolved = do_lock(project, strategy, tracked_names, all_dependencies)
  File "/home/aloxaf/.local/pipx/venvs/pdm/lib/python3.8/site-packages/pdm/cli/actions.py", line 55, in do_lock
    mapping, dependencies, summaries = resolve(
  File "/home/aloxaf/.local/pipx/venvs/pdm/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 "/home/aloxaf/.local/pipx/venvs/pdm/lib/python3.8/site-packages/pdm/resolver/resolvers.py", line 297, in resolve
    resolution.resolve(requirements, max_rounds=max_rounds)
  File "/home/aloxaf/.local/pipx/venvs/pdm/lib/python3.8/site-packages/pdm/resolver/resolvers.py", line 248, in resolve
    self._pin_criteria()
  File "/home/aloxaf/.local/pipx/venvs/pdm/lib/python3.8/site-packages/pdm/resolver/resolvers.py", line 215, in _pin_criteria
    dependencies = self._p.get_dependencies(candidate)
  File "/home/aloxaf/.local/pipx/venvs/pdm/lib/python3.8/site-packages/pdm/resolver/providers.py", line 127, in get_dependencies
    dependencies = super().get_dependencies(candidate)
  File "/home/aloxaf/.local/pipx/venvs/pdm/lib/python3.8/site-packages/pdm/resolver/providers.py", line 48, in get_dependencies
    deps, requires_python, summary = self.repository.get_dependencies(candidate)
  File "/home/aloxaf/.local/pipx/venvs/pdm/lib/python3.8/site-packages/pdm/models/repositories.py", line 61, in get_dependencies
    requirements, requires_python, summary = getter(candidate)
  File "/home/aloxaf/.local/pipx/venvs/pdm/lib/python3.8/site-packages/pdm/models/repositories.py", line 27, in wrapper
    result = func(self, candidate)
  File "/home/aloxaf/.local/pipx/venvs/pdm/lib/python3.8/site-packages/pdm/models/repositories.py", line 130, in _get_dependencies_from_metadata
    deps = candidate.get_dependencies_from_metadata()
  File "/home/aloxaf/.local/pipx/venvs/pdm/lib/python3.8/site-packages/pdm/models/candidates.py", line 183, in get_dependencies_from_metadata
    metadata = self.get_metadata()
  File "/home/aloxaf/.local/pipx/venvs/pdm/lib/python3.8/site-packages/pdm/models/candidates.py", line 138, in get_metadata
    built = self.environment.build(ireq, self.hashes, allow_all_wheels)
  File "/home/aloxaf/.local/pipx/venvs/pdm/lib/python3.8/site-packages/pdm/models/environment.py", line 315, in build
    return builder.build(**kwargs)
  File "/home/aloxaf/.local/pipx/venvs/pdm/lib/python3.8/site-packages/pdm/builders/wheel.py", line 37, in build
    return self._build_other(build_dir, **kwargs)
  File "/home/aloxaf/.local/pipx/venvs/pdm/lib/python3.8/site-packages/pdm/builders/wheel.py", line 56, in _build_other
    raise WheelBuildError(str(self.ireq))
pdm.exceptions.WheelBuildError: future>=0.16.0 from https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/45/0b/38b06fd9b92dc2b68d58b75f900e97884c45bedd2ff83203d933cf5851c9/future-0.18.2.tar.gz#sha256=b1bead90b70cf6ec3f0710ae53a525360fa360d306a86583adc6bf83a4db537d
❯ cat /tmp/pdm-lock-_mj6r4jp.log
========Start resolving requirements========
        python-telegram-bot
Package constraints:
        python-telegram-bot     <= __default__
Found candidate python-telegram-bot 12.4.2
========Ending round 0========
New pins:
        python-telegram-bot     12.4.2
Package constraints:
        certifi <= python-telegram-bot
Found candidate certifi 2019.11.28
Package constraints:
        cryptography    <= python-telegram-bot
Found candidate cryptography 2.8
Package constraints:
        decorator>=4.4.0        <= python-telegram-bot
Found candidate decorator 4.4.2
Command errored out with exit status 1:
 command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pdm-buildtkdqao3m/future/setup.py'"'"'; __file__='"'"'/tmp/pdm-buildtkdqao3m/future/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-w_2dfs7s
     cwd: /tmp/pdm-buildtkdqao3m/future/
Complete output (6 lines):
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help

error: invalid command 'bdist_wheel'
----------------------------------------
Failed building wheel for future

Actual behavior

Raise a WheelBuildError

Expected behavior

Add it without any error.

Environment Information

pdm version:

# Paste the output of `pdm info && pdm info --env` below:
❯ pdm info && pdm info --env
Python Interpreter: /usr/bin/python3 (3.8.2)
Project Root:       /tmp/test
{
  "implementation_name": "cpython",
  "implementation_version": "3.8.2",
  "os_name": "posix",
  "platform_machine": "x86_64",
  "platform_release": "5.5.11-zen1-1-zen",
  "platform_system": "Linux",
  "platform_version": "#1 ZEN SMP PREEMPT Sun, 22 Mar 2020 16:33:18 +0000",
  "python_full_version": "3.8.2",
  "platform_python_implementaiton": "CPython",
  "python_version": "3.8",
  "sys_platform": "linux"
}

Activity

Aloxaf

Aloxaf commented on Mar 27, 2020

@Aloxaf
ContributorAuthor

As #89 (comment) says, I need to install wheel into the python I picked.

Aloxaf

Aloxaf commented on Mar 27, 2020

@Aloxaf
ContributorAuthor

! Maybe I shouldn't install pdm with pipx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    🐛 bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Can't add package: WheelBuildError · Issue #90 · pdm-project/pdm