Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Workaround for running python 2 programs?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
arvamircea
Tux's lil' helper
Tux's lil' helper


Joined: 21 May 2022
Posts: 107
Location: Swadlincote

PostPosted: Thu Nov 03, 2022 12:01 pm    Post subject: [SOLVED] Workaround for running python 2 programs? Reply with quote

Hello o/

I know that Gentoo has stopped supporting python 2. However. I find myself needing to run a lot of programs that have not updated they code to python 3.
Running a program with a different version of python is fairly straight forward "python2.x yourProgram.py" however many programs require libraries that are not available for python 2 anymore. Fore example:
-the bitcoin P2Pool requires "twisted" and "python-argparse"
-a cjdns tool called "cjdnsmap" requires the "httplib2"
-etc

What is the easiest/foolproof way of running python 2 programs on gentoo that require python 2 libraries?


Last edited by arvamircea on Thu Nov 03, 2022 5:04 pm; edited 1 time in total
Back to top
View user's profile Send private message
spica
Apprentice
Apprentice


Joined: 04 Jun 2021
Posts: 287

PostPosted: Thu Nov 03, 2022 2:07 pm    Post subject: Reply with quote

In my development work I use different versions of python and I use pyenv to switch between them. It installs the requested version of python into user home directory and does not pollute the system.
Back to top
View user's profile Send private message
arvamircea
Tux's lil' helper
Tux's lil' helper


Joined: 21 May 2022
Posts: 107
Location: Swadlincote

PostPosted: Thu Nov 03, 2022 2:16 pm    Post subject: Reply with quote

Thank you spica! I will see how pyenv works and use it.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum