Python 2 to 3 conversion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
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@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux