question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`pip install copier` fails on windows

See original GitHub issue

Describe the problem Running pip install copier with python 3.10 fails on Windows when the Microsoft C++ build tools package is not installed. I would prefer not install the heavy (7GB) c++ compiler installed just to use copier.

This seems to be caused by the iteration_utilities package lacking a python 3.10 wheel file in pypi and it doesn’t look like they are planning to generate wheel files for python 3.10 any time soon.

To Reproduce

  1. Run pip install copier on Windows with python 3.10 and without visual c++ compiler installed

Logs

Running pip install copier

PS C:\Users\wilson> pip install copier
Collecting copier
  Using cached copier-7.0.1-py3-none-any.whl (34 kB)
Collecting iteration_utilities>=0.11.0
  Using cached iteration_utilities-0.11.0.tar.gz (124 kB)
  Preparing metadata (setup.py) ... done
Collecting pygments>=2.7.1
  Downloading Pygments-2.13.0-py3-none-any.whl (1.1 MB)
     ---------------------------------------- 1.1/1.1 MB 6.3 MB/s eta 0:00:00
Requirement already satisfied: plumbum>=1.6.9 in c:\users\wilson\appdata\local\programs\python\python310\lib\site-packages (from copier) (1.8.0)
Collecting pyyaml-include>=1.2
  Downloading pyyaml_include-1.3-py3-none-any.whl (20 kB)
Collecting questionary>=1.8.1
  Downloading questionary-1.10.0-py3-none-any.whl (31 kB)
Collecting jinja2-ansible-filters>=1.3.1
  Downloading jinja2_ansible_filters-1.3.2-py3-none-any.whl (18 kB)
Requirement already satisfied: packaging>=21.0 in c:\users\wilson\appdata\local\programs\python\python310\lib\site-packages (from copier) (21.3)
Collecting jinja2>=3.1.1
  Downloading Jinja2-3.1.2-py3-none-any.whl (133 kB)
     ---------------------------------------- 133.1/133.1 kB 4.0 MB/s eta 0:00:00
Collecting pydantic>=1.10.2
  Downloading pydantic-1.10.2-cp310-cp310-win_amd64.whl (2.1 MB)
     ---------------------------------------- 2.1/2.1 MB 6.3 MB/s eta 0:00:00
Collecting dunamai>=1.7.0
  Downloading dunamai-1.15.0-py3-none-any.whl (23 kB)
Collecting pyyaml>=5.3.1
  Using cached PyYAML-6.0-cp310-cp310-win_amd64.whl (151 kB)
Requirement already satisfied: colorama>=0.4.3 in c:\users\wilson\appdata\local\programs\python\python310\lib\site-packages (from copier) (0.4.5)
Requirement already satisfied: pathspec>=0.9.0 in c:\users\wilson\appdata\local\programs\python\python310\lib\site-packages (from copier) (0.10.2)
Collecting MarkupSafe>=2.0
  Downloading MarkupSafe-2.1.1-cp310-cp310-win_amd64.whl (17 kB)
Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in c:\users\wilson\appdata\local\programs\python\python310\lib\site-packages (from packaging>=21.0->copier) (3.0.9)
Requirement already satisfied: pywin32 in c:\users\wilson\appdata\local\programs\python\python310\lib\site-packages (from plumbum>=1.6.9->copier) (305)
Requirement already satisfied: typing-extensions>=4.1.0 in c:\users\wilson\appdata\local\programs\python\python310\lib\site-packages (from pydantic>=1.10.2->copier) (4.4.0)
Collecting prompt_toolkit<4.0,>=2.0
  Downloading prompt_toolkit-3.0.33-py3-none-any.whl (383 kB)
     ---------------------------------------- 383.6/383.6 kB 5.9 MB/s eta 0:00:00
Collecting wcwidth
  Downloading wcwidth-0.2.5-py2.py3-none-any.whl (30 kB)
Building wheels for collected packages: iteration_utilities
  Building wheel for iteration_utilities (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [15 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-cpython-310
      creating build\lib.win-amd64-cpython-310\iteration_utilities
      copying src\iteration_utilities\_additional_recipes.py -> build\lib.win-amd64-cpython-310\iteration_utilities
      copying src\iteration_utilities\_classes.py -> build\lib.win-amd64-cpython-310\iteration_utilities
      copying src\iteration_utilities\_convenience.py -> build\lib.win-amd64-cpython-310\iteration_utilities
      copying src\iteration_utilities\_recipes.py -> build\lib.win-amd64-cpython-310\iteration_utilities
      copying src\iteration_utilities\_utils.py -> build\lib.win-amd64-cpython-310\iteration_utilities
      copying src\iteration_utilities\__init__.py -> build\lib.win-amd64-cpython-310\iteration_utilities
      running build_ext
      building 'iteration_utilities._iteration_utilities' extension
      error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for iteration_utilities
  Running setup.py clean for iteration_utilities
Failed to build iteration_utilities
Installing collected packages: wcwidth, pyyaml, pygments, pydantic, prompt_toolkit, MarkupSafe, iteration_utilities, questionary, pyyaml-include, jinja2, dunamai, jinja2-ansible-filters, copier
  Running setup.py install for iteration_utilities ... error
  error: subprocess-exited-with-error

  × Running setup.py install for iteration_utilities did not run successfully.
  │ exit code: 1
  ╰─> [17 lines of output]
      running install
      C:\Users\wilson\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-cpython-310
      creating build\lib.win-amd64-cpython-310\iteration_utilities
      copying src\iteration_utilities\_additional_recipes.py -> build\lib.win-amd64-cpython-310\iteration_utilities
      copying src\iteration_utilities\_classes.py -> build\lib.win-amd64-cpython-310\iteration_utilities
      copying src\iteration_utilities\_convenience.py -> build\lib.win-amd64-cpython-310\iteration_utilities
      copying src\iteration_utilities\_recipes.py -> build\lib.win-amd64-cpython-310\iteration_utilities
      copying src\iteration_utilities\_utils.py -> build\lib.win-amd64-cpython-310\iteration_utilities
      copying src\iteration_utilities\__init__.py -> build\lib.win-amd64-cpython-310\iteration_utilities
      running build_ext
      building 'iteration_utilities._iteration_utilities' extension
      error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> iteration_utilities

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

[notice] A new release of pip available: 22.2.1 -> 22.3.1
[notice] To update, run: python.exe -m pip install --upgrade pip

Likewise when running poetry install as part of the copier contribution dev guidelines


PS D:\repositories\MakerX\copier> poetry config virtualenvs.in-project true --local
PS D:\repositories\MakerX\copier> poetry install --with docs
Creating virtualenv copier in D:\repositories\MakerX\copier\.venv
Installing dependencies from lock file

Package operations: 83 installs, 1 update, 0 removals

  • Installing six (1.16.0)
  • Installing colorama (0.4.6)
  • Installing markupsafe (2.1.1)
  • Installing pyparsing (3.0.9)
  • Installing python-dateutil (2.8.2)
  • Installing pyyaml (6.0)
  • Installing zipp (3.8.1)
  • Installing attrs (22.1.0)
  • Installing click (8.1.3)
  • Installing ghp-import (2.1.0)
  • Installing jinja2 (3.1.2)
  • Installing mergedeep (1.3.4)
  • Installing markdown (3.3.5)
  • Installing packaging (21.3)
  • Installing pluggy (1.0.0)
  • Installing importlib-metadata (4.2.0)
  • Installing pyyaml-env-tag (0.1)
  • Installing py (1.11.0)
  • Installing iniconfig (1.1.1)
Connection pool is full, discarding connection: pypi.org. Connection pool size: 10
Connection pool is full, discarding connection: pypi.org. Connection pool size: 10
  • Installing tomli (2.0.1)
  • Installing watchdog (2.1.9)
  • Installing wcwidth (0.2.5)
  • Installing distlib (0.3.6)
  • Installing filelock (3.8.0)
  • Installing mkdocs (1.2.4)
  • Installing mccabe (0.7.0)
  • Installing griffe (0.22.1)
  • Installing pyflakes (2.5.0)
  • Installing pytest (7.1.3)
  • Installing pycodestyle (2.9.1)
  • Installing platformdirs (2.5.2)
  • Installing mkdocstrings (0.19.0)
  • Installing prompt-toolkit (3.0.31)
  • Updating setuptools (65.5.1 -> 65.3.0)
Connection pool is full, discarding connection: pypi.org. Connection pool size: 10
Connection pool is full, discarding connection: pypi.org. Connection pool size: 10
  • Installing argcomplete (1.12.3)
  • Installing astor (0.8.1)
  • Installing cfgv (3.3.1)
  • Installing decli (0.5.2)
  • Installing coverage (6.4.4)
  • Installing mkdocs-autorefs (0.4.1)
  • Installing mkdocstrings-python (0.7.1)
  • Installing identify (2.5.5)
  • Installing execnet (1.9.0)
  • Installing charset-normalizer (2.1.1)
  • Installing flake8 (5.0.4)
  • Installing mkdocs-material-extensions (1.0.3)
Connection pool is full, discarding connection: pypi.org. Connection pool size: 10
  • Installing mypy-extensions (0.4.3)
  • Installing nodeenv (1.7.0)
  • Installing pastel (0.2.1)
  • Installing pathspec (0.10.1)
  • Installing ptyprocess (0.7.0)
  • Installing pygments (2.13.0)
  • Installing pymdown-extensions (9.5)
  • Installing pytest-forked (1.4.0)
  • Installing pywin32 (304)
  • Installing questionary (1.10.0)
  • Installing termcolor (1.1.0)
  • Installing toml (0.10.2)
  • Installing tomlkit (0.11.4)
  • Installing typing-extensions (4.4.0)
  • Installing virtualenv (20.16.2)
  • Installing autoflake (1.6.1)
  • Installing black (22.8.0)
  • Installing flake8-bugbear (22.9.23)
  • Installing dunamai (1.14.1)
  • Installing commitizen (2.35.0)
  • Installing iteration-utilities (0.11.0)
  • Installing jinja2-ansible-filters (1.3.2)
  • Installing flake8-simplify (0.19.3)
  • Installing mkdocs-material (8.2.6)
  • Installing flake8-comprehensions (3.10.0)
  • Installing isort (5.10.1)
  • Installing flake8-debugger (4.1.2)
Connection pool is full, discarding connection: pypi.org. Connection pool size: 10
Connection pool is full, discarding connection: pypi.org. Connection pool size: 10
  • Installing mypy (0.981)
  • Installing pexpect (4.8.0)
  • Installing plumbum (1.8.0)
  • Installing poethepoet (0.16.2)
  • Installing pre-commit (2.20.0)
  • Installing pydantic (1.10.2)
  • Installing pytest-cov (4.0.0)
  • Installing pytest-xdist (2.5.0)
  • Installing pyyaml-include (1.3)
  • Installing types-backports (0.1.3)
  • Installing types-pyyaml (6.0.12)

  CalledProcessError

  Command 'D:\repositories\MakerX\copier\.venv\Scripts\python.exe -m pip install --use-pep517 --disable-pip-version-check --prefix D:\repositories\MakerX\copier\.venv --no-deps C:\Users\wilson\AppData\Local\pypoetry\Cache\artifacts\13\fe\58\dd3a5413393eab8ca2c5b884ff40af30da952dbdc4598df1d7b6cf61b0\iteration_utilities-0.11.0.tar.gz' returned non-zero exit status 1.

  at ~\AppData\Local\Programs\Python\Python310\lib\subprocess.py:524 in run
       520│             # We don't call process.wait() as .__exit__ does that for us.
       521│             raise
       522│         retcode = process.poll()
       523│         if check and retcode:
    →  524│             raise CalledProcessError(retcode, process.args,
       525│                                      output=stdout, stderr=stderr)
       526│     return CompletedProcess(process.args, retcode, stdout, stderr)
       527│
       528│

The following error occurred when trying to handle this error:


  EnvCommandError

  Command D:\repositories\MakerX\copier\.venv\Scripts\python.exe -m pip install --use-pep517 --disable-pip-version-check --prefix D:\repositories\MakerX\copier\.venv --no-deps C:\Users\wilson\AppData\Local\pypoetry\Cache\artifacts\13\fe\58\dd3a5413393eab8ca2c5b884ff40af30da952dbdc4598df1d7b6cf61b0\iteration_utilities-0.11.0.tar.gz errored with the following return code 1, and output:
  Processing c:\users\wilson\appdata\local\pypoetry\cache\artifacts\13\fe\58\dd3a5413393eab8ca2c5b884ff40af30da952dbdc4598df1d7b6cf61b0\iteration_utilities-0.11.0.tar.gz
    Installing build dependencies: started
    Installing build dependencies: finished with status 'done'
    Getting requirements to build wheel: started
    Getting requirements to build wheel: finished with status 'done'
    Preparing metadata (pyproject.toml): started
    Preparing metadata (pyproject.toml): finished with status 'done'
  Building wheels for collected packages: iteration-utilities
    Building wheel for iteration-utilities (pyproject.toml): started
    Building wheel for iteration-utilities (pyproject.toml): finished with status 'error'
    error: subprocess-exited-with-error

    Building wheel for iteration-utilities (pyproject.toml) did not run successfully.
    exit code: 1

    [15 lines of output]
    running bdist_wheel
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-cpython-310
    creating build\lib.win-amd64-cpython-310\iteration_utilities
    copying src\iteration_utilities\_additional_recipes.py -> build\lib.win-amd64-cpython-310\iteration_utilities
    copying src\iteration_utilities\_classes.py -> build\lib.win-amd64-cpython-310\iteration_utilities
    copying src\iteration_utilities\_convenience.py -> build\lib.win-amd64-cpython-310\iteration_utilities
    copying src\iteration_utilities\_recipes.py -> build\lib.win-amd64-cpython-310\iteration_utilities
    copying src\iteration_utilities\_utils.py -> build\lib.win-amd64-cpython-310\iteration_utilities
    copying src\iteration_utilities\__init__.py -> build\lib.win-amd64-cpython-310\iteration_utilities
    running build_ext
    building 'iteration_utilities._iteration_utilities' extension
    error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
    [end of output]

    note: This error originates from a subprocess, and is likely not a problem with pip.
    ERROR: Failed building wheel for iteration-utilities
  Failed to build iteration-utilities
  ERROR: Could not build wheels for iteration-utilities, which is required to install pyproject.toml-based projects


  at ~\AppData\Local\Programs\Python\Python310\lib\site-packages\poetry\utils\env.py:1476 in _run
      1472│                 output = subprocess.check_output(
      1473│                     command, stderr=subprocess.STDOUT, env=env, **kwargs
      1474│                 )
      1475│         except CalledProcessError as e:
    → 1476│             raise EnvCommandError(e, input=input_)
      1477│
      1478│         return decode(output)
      1479│
      1480│     def execute(self, bin: str, *args: str, **kwargs: Any) -> int:

The following error occurred when trying to handle this error:


  PoetryException

  Failed to install C:/Users/wilson/AppData/Local/pypoetry/Cache/artifacts/13/fe/58/dd3a5413393eab8ca2c5b884ff40af30da952dbdc4598df1d7b6cf61b0/iteration_utilities-0.11.0.tar.gz

  at ~\AppData\Local\Programs\Python\Python310\lib\site-packages\poetry\utils\pip.py:51 in pip_install
       47│
       48│     try:
       49│         return environment.run_pip(*args)
       50│     except EnvCommandError as e:
    →  51│         raise PoetryException(f"Failed to install {path.as_posix()}") from e
       52│

Warning: The file chosen for install of markdown 3.3.5 (Markdown-3.3.5-py3-none-any.whl) is yanked. Reason for being yanked: Invalid dependency specified. Fixed in 3.3.6.

Expected behavior pip install copier should install copier without error

Environment

  • OS: Windows 10
  • Copier version: 7.0.1
  • Python version: 3.10
  • Installation method: pip+pypi

Issue Analytics

  • State:closed
  • Created 9 months ago
  • Comments:11 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
wilsonwaterscommented, Dec 6, 2022

Hi @pawamoy, thanks for the suggestion. I agree that asking the iteration-utilities team to build wheels for python 3.10 would be the best solution. However the existing issue on their bugtracker has been open for 6+ months so it seems it may not get resolved. I also note the project hasn’t had any commits for 2+ years.

I thought it might be better to solve the issue by removing the dependency on iteration-utilities. Which is done in #890 .

1reaction
yajocommented, Dec 20, 2022

I don’t have a specific plan, but there are some pending things I’d like to be in the next release. Usually you can install from master, but if you need wheels or stuff like that, I can push an alpha tag.

Read more comments on GitHub >

github_iconTop Results From Across the Web

pip install copier - ModuleNotFoundError: No module named ...
Describe the problem pip install copier but ModuleNotFoundError: No module named 'copier' To Reproduce Install Poetry curl -sSL ...
Read more >
How can i resolve a pip install error on windows 10?
I'm running Windows 10 with Python 3.7 and Microsoft Visual Studio Code. I want to install some packages I've downloaded (pysimplegui and ...
Read more >
Pip Command Not Found on Windows: A Guide | Built In
A “pip: command not found” error occurs when you haven't properly installed the package installer for Python (pip) on your computer.
Read more >
How to Install Pip on Windows - ActiveState
To manually install pip on Windows, you will need a copy of get-pip.py. ... with running Python tools like pip is the “not...
Read more >
copier - PyPI
A library and CLI app for rendering project templates. Works with local paths and Git URLs. Your project can include any file and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found