0

Want to delete python from my server, Using Centos 7. i have python 2.6.6 and python 3.6 in my server and i think thats the reason i am getting an error. so want to remove python 2.6. i am getting these version error so want to try removing python 2.6.6 and then running my code

File "chatbot.py", line 7, in <module>
    import sqlite3
  File "/home/pythondemo/.local/lib/python3.6/sqlite3/__init__.py", line 23, in <module>
    from sqlite3.dbapi2 import *
  File "/home/pythondemo/.local/lib/python3.6/sqlite3/dbapi2.py", line 50, in <module>
    version_info = tuple([int(x) for x in version.split(".")])
NameError: name 'version' is not defined
  • Possible duplicate of [Linux CentOS 7, how to set Python3.5.2 as default Python version?](https://stackoverflow.com/questions/45542690/linux-centos-7-how-to-set-python3-5-2-as-default-python-version) – soetaertie May 21 '18 at 10:22

1 Answers1

1

Uninstalling the system provided Python is a bad idea. There are many other packages and softwares that depend on it like "yum". It'll be better that you use python3.6 by either modifying the $PATH or creating an alias e.g. python3.6 that points to the python that you installed in /opt dir