Comments (6)
I think that might be a Python version issue - the list[int]
generic syntax, which the error complains about, should be available since Python 3.9; which version are you using?
from agda-unimath.
I'm using ubuntu in case this is relevant.
When I type
python --version
it tells me the command is not found. When I type
python3 --version
it returns Python 3.8.10. I've just now managed to install python3.9 so
python3.9 --version
returns Python 3.9.16 (but the python3 version is unchanged).
I believe I may be using a package called "python-is-python3". I forget exactly why. The make pre-commit error message looks the same as before.
from agda-unimath.
I personally don't have experience with how Ubuntu handles Python updates, so take the following with a grain of salt.
If running python
says that the command is not found, then that's perfectly fine - a Python script should specify whether it's using python3
or python2
, and having the python
command as a shorthand for one of them is more of a user-facing convenience. That's actually what the python-is-python3
package does - it creates a link so that running just python
is the same as running python3
(and since python
isn't found on your system, you don't have python-is-python3
installed).
Since you installed the python3.9
package, you now have two python installations on your system - the default Python 3.8 (accessible via python3
), and the new Python 3.9 (accessible via python3.9
). If you want to make Python 3.9 the default (thus a script beginning with #!/usr/bin/env python3
, such as our pre-commit hooks, would run that instead of 3.8), then you can use Ubuntu's update-alternatives
tool.
However, as I'm reading more into this, it seems that people usually caution against messing with the default python3
version, since pretty much all system components have a dependency on it, and who knows what changing the version would break.
I think the better solution would be for our pre-commit hooks to support Python 3.8, since that's the default for Ubuntu 20.04 LTS, which will be supported until mid-2024 (with "Extended Security Maintanance" period reaching into 2030). I'll look into it.
from agda-unimath.
Thanks! I'll wait for further instructions.
from agda-unimath.
Ok, so it seems like pre-commit actually uses its own python, not the system-wide version, which is good. But unfortunately I can't reproduce your issue, my hooks run just fine.
On my system, there's this directory ~/.cache/pre-commit/repoabbobbu8/py_env-python3.10/
. Could you check if you have something similar? I'm not sure if the repoabbobbu8
part is deterministic, and there might be multiple such folders under ~/.cache/pre-commit
, but could you look around and find one with a py_env-python-3.X
subdirectory?
from agda-unimath.
Well, the Python version selection story is a little more disappointing than I thought, so I went and changed the offending piece of code to be compatible with Python 3.8; this PR should fix the issue: #634.
from agda-unimath.
Related Issues (20)
- Level universe HOT 1
- The module index generator doesn't support modules with unicode characters in their names HOT 14
- Record user statistics for the webpage HOT 2
- Record performance statistics for type-checking
- Argument order for coherence triangles
- Small refactorings for elementary number theory HOT 21
- Allow manually running perf testing on pull requests
- Inconsistent font sizes in code blocks
- Formalized results from the literature HOT 3
- Necessary truncations on formalizing cardinal arithmetic
- Autoformatting for Python files HOT 3
- Idea: use coherently invertible maps as default notion of equivalence HOT 1
- Bibliography HOT 1
- Retracts of sequential diagrams HOT 1
- Sync up nomenclature between towers and cotowers HOT 3
- Add `is-sequential-colimit`
- Discuss replacing `-whisk-` with `-whisker-` HOT 2
- Competing conventions for operations on propositions HOT 5
- Investigate memory usage when typechecking the whole library HOT 2
- Resolve duplicate definitions
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from agda-unimath.