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

During installation, error with 'typed-ast' python package #683

Closed
PaulSchulz opened this issue May 7, 2023 · 6 comments · Fixed by #759 or #684
Closed

During installation, error with 'typed-ast' python package #683

PaulSchulz opened this issue May 7, 2023 · 6 comments · Fixed by #759 or #684
Labels
bug Something isn't working tooling Set of scripts and configuration files for building the packages

Comments

@PaulSchulz
Copy link

During installation of the toltec environment I get the following error:

Requirement already satisfied: wrapt==1.12.1 in ./venv/lib/python3.11/site-packages (from -r requirements.txt (line 28)) (1.12.1)
Installing collected packages: typed-ast, regex, pyelftools, mypy-extensions, mccabe, certifi, appdirs, urllib3, toml, six, pathspec, mypy, MarkupSafe, lazy-object-proxy, isort, idna, click, chardet, websocket-client, requests, python-dateutil, Jinja2, black, astroid, pylint, docker
DEPRECATION: typed-ast is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at pypa/pip#8559
Running setup.py install for typed-ast ... error

...

  In file included from ast27/Custom/typed_ast.c:3:
  ast27/Custom/../Include/compile.h:5:10: fatal error: code.h: No such file or directory
      5 | #include "code.h"
        |          ^~~~~~~~
  compilation terminated.
  error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
  [end of output]

The process I used, on Ubuntu 23.04.

git clone https://github.com/toltec-dev/toltec
cd toltec
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

@Eeems
Copy link
Member

Eeems commented May 7, 2023

We use python 3.8.

If you are wanting to build a specific package, I'd recommend using toltecmk instead of using the code in the toltec repository. The toltec repo's build code is used for automating the building and publishing of the repository as a whole, and is intended to be run from github actions. For individual package development, toltecmk is the intended tool.

@PaulSchulz
Copy link
Author

Thank you.
Ubuntu 2023.4 is using Python 3.11.2

I wll look at tolteccmk.
(I am looking to build a c binary for Re2, and appear to need libc-2.31)

./hello: /lib/libc.so.6: version `GLIBC_2.34' not found (required by ./hello)
reMarkable: ~/ file /lib/libc.so.6
/lib/libc.so.6: symbolic link to libc-2.31.so

@Eeems
Copy link
Member

Eeems commented May 7, 2023

I'd recommend asking for help getting building to work in the community discord, or in the discussions section.

@Eeems
Copy link
Member

Eeems commented May 7, 2023

I'm leaving this issue open, but I'll be changing the title, as the issue is that typed-ast is now end of life, and our code should be updated to no longer use it: python/typed_ast#179

It looks like it's just a dependency of black, so I'm opening a PR to update black to a newer version that doesn't need typed-ast.

@Eeems Eeems added bug Something isn't working tooling Set of scripts and configuration files for building the packages labels Jun 8, 2023
@timower
Copy link

timower commented Oct 16, 2023

Not sure if this should be a new issue, but on python 3.11 I'm getting:

Collecting wrapt==1.12.1 (from -r requirements.txt (line 27))
  Downloading wrapt-1.12.1.tar.gz (27 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
INFO: pip is looking at multiple versions of astroid to determine which version is compatible with other requirements. This could take a while.
ERROR: Cannot install -r requirements.txt (line 2) and wrapt==1.12.1 because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested wrapt==1.12.1
    astroid 2.15.4 depends on wrapt<2 and >=1.14; python_version >= "3.11"

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

@Eeems
Copy link
Member

Eeems commented Oct 16, 2023

The toltec toolset requires python 3.10 currently. Toltecmk works with 3.11

This was linked to pull requests Dec 6, 2023
@Eeems Eeems closed this as completed Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tooling Set of scripts and configuration files for building the packages
Projects
None yet
3 participants