- This topic has 1 reply, 2 voices, and was last updated Oct 18-10:37 am by Xecure.
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
Forum for users of antiX Linux. Mean and Lean and Proudly anti-fascist.
Forum › Forums › New users › New Users and General Questions › Changing default python to python3
Tagged: Python
I only ever use python3 in my coding. By default, python points to python2. Is it feasible to change the link of python to python3? Will the OS still start if I do that?
I don’t really want to try this unless it is certain that my system will start up. I don’t really want to go through wiping out the OS and reinstalling. I know some scripts are based on python2 but I don’t know which ones and how they affect the system.
On the next debian release (bullseye, currently debian testing) this change has already been done. Some antiX apps have already started the migration, but its not ready yet. If you change the metapackage, it won’t break your boot, but programs like Wallpaper selector or Menu updater may be broken.
For your python script, use this at the top of your script file
#!/usr/bin/env python3
That way you are sure that everything works only on python3 environment and isn’t launched using python2
If it is too much work, you may install antiX core and upgrade to testing or directly download the sid editions and build your antiX system there (though I think this is even more work).
Maybe someone more knowledgeable can give a better solution.
antiX Live system enthusiast.
General Live Boot Parameters for antiX.
If you want to test a version of python or change the default version used you can add an alias in your .bashrc file.
To find what version is your default just type
into your terminal. To exit the python prompt use ctrl+d.
antiX default = 2.7.16
alias python=’/usr/bin/python3.7′
# my system now users 3.7 if you wish to go back to 2.7.16 just comment out the line or remove it from your .bashrc. remember to logout & in after making the change.
antix1 * 16 files = 1.4M ~ >$python
Python 3.7.3 (default, Jul 25 2020, 13:03:44)
[GCC 8.3.0] on linux
| Cookie | Duration | Description |
|---|---|---|
| cookielawinfo-checkbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |
| cookielawinfo-checkbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
| cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
| cookielawinfo-checkbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |
| cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |
| viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |