# Python 2 removal from SLES 15 SP1

**URL:** <https://forums.suse.com/t/python-2-removal-from-sles-15-sp1/35065>\
**Category:** SUSE Linux Enterprise Server\
**Created:** [June 10, 2020, 1:02pm UTC](https://forums.suse.com/t/python-2-removal-from-sles-15-sp1/35065 "2020-06-10T13:02:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nelis](https://avatars.discourse-cdn.com/v4/letter/n/74df32/32.png) [@Nelis](https://forums.suse.com/u/Nelis)\
**Post date:** [June 10, 2020, 1:02pm UTC](https://forums.suse.com/t/python-2-removal-from-sles-15-sp1/35065/1 "2020-06-10T13:02:21Z")

</div>

Hi All,  
I think this is my first post here!  
I was curious if anyone has removed their old python2 packages after an upgrade to SLES 15 SP1 without any issues and whether it was safe to do so?  
I don’t see anything using python2 but I may be wrong. I’m thinking I’ll try remove the python-base with all dependencies on my sandbox and see if it breaks anything.  
Regards,  
Nelis  
Edit: the reason for me wanting to do this is so I don’t have to add the python2 module and update packages that are no longer being used after upgrading to 15 SP1.

---

<div class="post-metadata">

**Author:** ![malcolmlewis](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/malcolmlewis/32/11375_2.png) [@malcolmlewis](https://forums.suse.com/u/malcolmlewis)\
**Post date:** [June 10, 2020, 2:04pm UTC](https://forums.suse.com/t/python-2-removal-from-sles-15-sp1/35065/2 "2020-06-10T14:04:31Z")

</div>

Hi  
/usr/bin/python is still linked to python2.7, you probably want to ensure your python apps are using `#!/usr/bin/python3` or maybe create an update alternative to switch the python softlink untill your sure no issues, then I would leave it be (as in not remove).

---

<div class="post-metadata">

**Author:** ![Nelis](https://avatars.discourse-cdn.com/v4/letter/n/74df32/32.png) [@Nelis](https://forums.suse.com/u/Nelis)\
**Post date:** [June 10, 2020, 2:16pm UTC](https://forums.suse.com/t/python-2-removal-from-sles-15-sp1/35065/3 "2020-06-10T14:16:14Z")

</div>

I’m aware of the /usr/bin/python link thanks. From 15 SP1 release notes SUSE says it was phasing out python2 in its enterprise distribution - I’m wondering if this has now been completed? It would be nice to get this information. Looking at open files on all my upgraded systems I do not see python2 being used but that does not necessarily mean there are no standard executables around that still require it. I do not have any custom scripts that use it.  
see [https://www.suse.com/releasenotes/x86\_64/SUSE-SLES/15-SP1/#fate-327577](https://www.suse.com/releasenotes/x86_64/SUSE-SLES/15-SP1/#fate-327577)

---

<div class="post-metadata">

**Author:** ![malcolmlewis](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/malcolmlewis/32/11375_2.png) [@malcolmlewis](https://forums.suse.com/u/malcolmlewis)\
**Post date:** [June 10, 2020, 2:48pm UTC](https://forums.suse.com/t/python-2-removal-from-sles-15-sp1/35065/4 "2020-06-10T14:48:49Z")

</div>

Hi  
If you have not added in the Python2 module to the system, should be ok…  
I see a few items calling either python2 or env python in /usr/[s]bin;

```auto
fgrep -r "/usr/bin/python" *
fgrep -r "/usr/bin/env python" *

```
