ad icon indicating copy to clipboard operation
ad copied to clipboard

Installation issue: setuptools>=58 breaks support for use_2to3

Open pgkirsch opened this issue 3 years ago • 1 comments

Hello!

I am doing fresh installation of GPkit, a package that has ad as a dependency and I encountered some issues during installation.

Collecting ad
  Downloading ad-1.3.2.zip (26 kB)
    ERROR: Command errored out with exit status 1:
     command: /Users/philippe.kirschen/opt/anaconda3/envs/hops/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/6q/tfsts5jx6tnd_747qkgznwfwtz9v7b/T/pip-install-viy9b_j2/ad_0486c429c0824b5da1d683d85e2776af/setup.py'"'"'; __file__='"'"'/private/var/folders/6q/tfsts5jx6tnd_747qkgznwfwtz9v7b/T/pip-install-viy9b_j2/ad_0486c429c0824b5da1d683d85e2776af/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 /private/var/folders/6q/tfsts5jx6tnd_747qkgznwfwtz9v7b/T/pip-pip-egg-info-er2yb91p
         cwd: /private/var/folders/6q/tfsts5jx6tnd_747qkgznwfwtz9v7b/T/pip-install-viy9b_j2/ad_0486c429c0824b5da1d683d85e2776af/
    Complete output (1 lines):
    error in ad setup command: use_2to3 is invalid.
    ----------------------------------------

pip then went down through the versions until it got to 1.1.2 which then gave me a NameError that is presumably no longer relevant in the current versions of ad.

Anyway as the error above suggests it seems like use of use_2to3 is the issue. A quick search suggests that setuptools>=58 breaks support for use_2to3. I checked and my freshly-installed setuptools is version 58.0.4.

I confirmed that using setuptools<58 (57.5.0 seems like the latest version) fixes the issue on my end. Just wanted to give you a heads up!

pgkirsch avatar Oct 15 '21 22:10 pgkirsch

@pgkirsch thanks for your help

lyf6 avatar Nov 15 '23 02:11 lyf6