I'm attempting to convert a small Python-2 script to Python-3. Google
appears to think that the best approach is something called 2to3, but I
can't get it to work. I'm far from being a Python expert, but am at
least using a virtual environment:

poc@Bree:~$ cd venv
poc@Bree:~/venv$ source bin/activate
(venv) poc@Bree:~/venv$ type 2to3
2to3 is /home/poc/venv/bin/2to3
(venv) poc@Bree:~/venv$ 2to3
Traceback (most recent call last):
  File "/home/poc/venv/bin/2to3", line 5, in <module>
    from cmd_2to3.__main__ import main
  File "/home/poc/venv/lib64/python3.13/site-packages/cmd_2to3/__main__.py", 
line 2, in <module>
    from lib2to3.main import main as l2to3_main
ModuleNotFoundError: No module named 'lib2to3'
(venv) poc@Bree:~/venv$ pip install lib2to3
ERROR: Could not find a version that satisfies the requirement lib2to3 (from 
versions: none)
ERROR: No matching distribution found for lib2to3

Any thoughts? I find the online documentation on 2to3 (such as it is)
remarkably obtuse.

poc
-- 
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to