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.

use_2to3 is invalid (Tempita)

See original GitHub issue

setuptools version

setuptools==58.0.4

Python version

Python 3.7

OS

alpine 3.10 and python:3.7.4-alpine3.10

Additional environment information

Running in docker image

Description

Error when install Tempita package

Collecting tempita
  Using cached Tempita-0.5.2.tar.gz (12 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/local/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-w1dwys3_/tempita_88536193c2e747c5939cf0c8202599ac/setup.py'"'"'; __file__='"'"'/tmp/pip-install-w1dwys3_/tempita_88536193c2e747c5939cf0c8202599ac/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-zh352qvj
         cwd: /tmp/pip-install-w1dwys3_/tempita_88536193c2e747c5939cf0c8202599ac/
    Complete output (1 lines):
    error in Tempita setup command: use_2to3 is invalid.

A similar error are rased when install formencode==1.3.1

Expected behavior

Success in installation

How to Reproduce

pip install formencode==1.3.1 pip install --upgrade tempita

Output

 ERROR: Command errored out with exit status 1:
     command: /usr/local/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-w1dwys3_/tempita_88536193c2e747c5939cf0c8202599ac/setup.py'"'"'; __file__='"'"'/tmp/pip-install-w1dwys3_/tempita_88536193c2e747c5939cf0c8202599ac/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-zh352qvj
         cwd: /tmp/pip-install-w1dwys3_/tempita_88536193c2e747c5939cf0c8202599ac/
    Complete output (1 lines):
    error in Tempita setup command: use_2to3 is invalid.

Code of Conduct

  • I agree to follow the PSF Code of Conduct

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
jaracocommented, Sep 17, 2021

Thanks Ian. I’ve uploaded a wheel for Tempita 0.5.2:

draft $ pip-run 'setuptools<58' wheel -- -m pip wheel --use-pep517 --no-build-isolation Tempita
Collecting setuptools<58
  Using cached setuptools-57.5.0-py3-none-any.whl (819 kB)
Collecting wheel
  Using cached wheel-0.37.0-py2.py3-none-any.whl (35 kB)
Installing collected packages: wheel, setuptools
Successfully installed setuptools-57.5.0 wheel-0.37.0
Collecting Tempita
  Using cached Tempita-0.5.2.tar.gz (12 kB)
    Preparing wheel metadata ... done
Building wheels for collected packages: Tempita
  Building wheel for Tempita (PEP 517) ... done
  Created wheel for Tempita: filename=Tempita-0.5.2-py3-none-any.whl size=12880 sha256=f4554840cb59c6b4a5df4fad27eea4e3cb47ca7089bfeefb5890ff1bb8af2117
  Stored in directory: /Users/jaraco/Library/Caches/pip/wheels/14/32/85/b64bd548315cce3f2c1c7cd655fce15fd5b22af89778bbf267
Successfully built Tempita
draft $ twine upload Tempita-0.5.2-py3-none-any.whl
Uploading distributions to https://upload.pypi.org/legacy/
Uploading Tempita-0.5.2-py3-none-any.whl
100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 16.5k/16.5k [00:01<00:00, 11.5kB/s]

View at:
https://pypi.org/project/Tempita/0.5.2/

Now any users installing with pip (and presumably poetry) will bypass setuptools builds and thus will not fail. Please confirm.

0reactions
StevenMMortimercommented, Sep 17, 2021

This comment is the only workaround that I’ve found for now: https://github.com/python-poetry/poetry/issues/4511#issue-998383431

In short, it installs a pinned version of setuptools (e.g., setuptools==57.5.0) outside of pyproject.toml and then runs poetry install.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error in anyjson setup command: use_2to3 is invalid
This is a common error which the most common solution to is to downgrade setuptools to below version 58. This was not working...
Read more >
FTBFS: error in Tempita setup command: use_2to3 is invalid.
Hi, During a rebuild of all packages in sid, your package failed to build on amd64. Relevant part (hopefully): > fakeroot debian/rules clean...
Read more >
Debian Bug report logs - #997633 python-tempita: FTBFS
Debian Bug report logs - #997633 python-tempita: FTBFS: error in Tempita setup command: use_2to3 is invalid. version graph. Package: src:python-Β ...
Read more >
Error in X setup command: use_2to3 is invalid [Solved]
The error in X setup command: use_2to3 is invalid error occurs because `setuptools` has removed support for 2to3 during builds.
Read more >
error in deap setup command: use_2to3 is invalid.) – MacPorts
comment:1 Changed 12 months ago by jmroot (Joshua Root). Until upstream fixes this, you can use the same workaround as py-tempita.
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