86
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
this post was submitted on 03 Jul 2023
86 points (100.0% liked)
Python
6340 readers
11 users here now
Welcome to the Python community on the programming.dev Lemmy instance!
📅 Events
Past
November 2023
- PyCon Ireland 2023, 11-12th
- PyData Tel Aviv 2023 14th
October 2023
- PyConES Canarias 2023, 6-8th
- DjangoCon US 2023, 16-20th (!django 💬)
July 2023
- PyDelhi Meetup, 2nd
- PyCon Israel, 4-5th
- DFW Pythoneers, 6th
- Django Girls Abraka, 6-7th
- SciPy 2023 10-16th, Austin
- IndyPy, 11th
- Leipzig Python User Group, 11th
- Austin Python, 12th
- EuroPython 2023, 17-23rd
- Austin Python: Evening of Coding, 18th
- PyHEP.dev 2023 - "Python in HEP" Developer's Workshop, 25th
August 2023
- PyLadies Dublin, 15th
- EuroSciPy 2023, 14-18th
September 2023
- PyData Amsterdam, 14-16th
- PyCon UK, 22nd - 25th
🐍 Python project:
- Python
- Documentation
- News & Blog
- Python Planet blog aggregator
💓 Python Community:
- #python IRC for general questions
- #python-dev IRC for CPython developers
- PySlackers Slack channel
- Python Discord server
- Python Weekly newsletters
- Mailing lists
- Forum
✨ Python Ecosystem:
🌌 Fediverse
Communities
- #python on Mastodon
- c/django on programming.dev
- c/pythorhead on lemmy.dbzer0.com
Projects
- Pythörhead: a Python library for interacting with Lemmy
- Plemmy: a Python package for accessing the Lemmy API
- pylemmy pylemmy enables simple access to Lemmy's API with Python
- mastodon.py, a Python wrapper for the Mastodon API
Feeds
founded 1 year ago
MODERATORS
undefined> TypeError: unsupported operand type(s) for |
the
|
syntax to indicate multiple types was introduced in Python 3.10. It looks like you are using a an older Python version.That was it exactly. Thank you.
This was a journey, so I'm documenting it here for anyone who might run into a similar situation.
I'm using a Chromebook with Linux enabled.
To confirm my version of Python I ran
python --version
:OK! Getting somewhere. So I have to check what distribution of Linux is installed with
grep '^PRETTY_NAME' /etc/os-release
Alright. Google says if I want to upgrade Python on Debian 11 I have to compile it from source. Yikes! But, wait, there's a PPA - Yay! But the PPA is for Ubuntu - Boo.
There isn't an active community for ChromeOS on Lemmy yet, but that other website has directions for replacing Debian with Ubuntu.
I'm lazy so I'm not doing that. I'm just going to spin up a temporary Ubuntu container that I can delete later, so my directions are much simpler:
Ctr-Alt-T to enter crosh, the ChromeOS developer shell.
Success! I had to escape some special characters in my passwords, but that's easily Google-able.
I'll be keeping the container around for a little while to do some periodic syncs. Then I'll remove it using crosh.
You could even have tried with the python3:latest container :)
TIL!
I've only used
pyenv
on Ubuntu machines, but I expect it would work just as well in Debian-based systems.pyenv
is really useful if you need multiple versions installed simultaneously and it handles installation for you.https://github.com/pyenv/pyenv