Open frankgerhardt opened 3 years ago
I think the issue is elsewhere. Python 3.8 and 3.9 are supported.
Only 3.7 is mentioned in the README:
Ptpython is an advanced Python REPL. It should work on all Python versions from 2.6 up to 3.7 and work cross platform (Linux, BSD, OS X and Windows).
This stems from manually installing uuid
using pip (or conda), as there's still a package on Pypi dating back from 2007. Which will then naturally lead to syntax errors or similar issues. Instead remove that package using pip/conda and it will instead use the uuid
module that's part of Python's standard library.
In pypi,
However, it support python 3.9 by pip install git+https://github.com/prompt-toolkit/ptpython
, not pip install ptpython
On my macos 11.4 machine it installs natively with pip in 3.9:
~ % python3.9 -m pip install ptpython
Collecting ptpython
Downloading ptpython-3.0.20-py2.py3-none-any.whl (61 kB)
|████████████████████████████████| 61 kB 409 kB/s
Requirement already satisfied: prompt-toolkit<3.1.0,>=3.0.18 in /opt/homebrew/lib/python3.9/site-packages (from ptpython) (3.0.18)
Requirement already satisfied: appdirs in /opt/homebrew/lib/python3.9/site-packages (from ptpython) (1.4.4)
Requirement already satisfied: pygments in /opt/homebrew/lib/python3.9/site-packages (from ptpython) (2.8.1)
Requirement already satisfied: jedi>=0.16.0 in /opt/homebrew/lib/python3.9/site-packages (from ptpython) (0.18.0)
Requirement already satisfied: parso<0.9.0,>=0.8.0 in /opt/homebrew/lib/python3.9/site-packages (from jedi>=0.16.0->ptpython) (0.8.2)
Requirement already satisfied: wcwidth in /opt/homebrew/lib/python3.9/site-packages (from prompt-toolkit<3.1.0,>=3.0.18->ptpython) (0.2.5)
Installing collected packages: ptpython
Successfully installed ptpython-3.0.20
WARNING: You are using pip version 21.1.1; however, version 21.2.4 is available.
You should consider upgrading via the '/opt/homebrew/opt/python@3.9/bin/python3.9 -m pip install --upgrade pip' command.
Like I mentioned above OP's issue is that he installed uuid
from pip for some reason, which will cause errors when imported by other libraries.
Again the README is out of date, it says 3.9 but the CI is running on 3.11
pip install error on Python 3.8: