Closed emaldahasi closed 5 years ago
alias python=python3
is definitely the wrong way to approach this. You should be using virtualenv
for this. Please follow the following guide for installation:
https://conpot.readthedocs.io/en/latest/installation/virtualenv.html
I tried to change the version of python using A simple safe way would be to use an alias from this link (https://askubuntu.com/questions/320996/how-to-make-python-program-command-execute-python-3 )
waleed@waleed-VirtualBox:/$ alias python=python3 waleed@waleed-VirtualBox:/$ python --version Python 3.5.2 waleed@waleed-VirtualBox:/$ python3 --version Python 3.5.2 waleed@waleed-VirtualBox:/$ python -V Python 3.5.2
then I change it to 3.6 version
waleed@waleed-VirtualBox:/$ alias python=python3.6 waleed@waleed-VirtualBox:/$ python -V Python 3.6.7
while run conpot I get this issue
waleed@waleed-VirtualBox:/$ sudo conpot Traceback (most recent call last): File "/usr/local/bin/conpot", line 4, in
import('pkg_resources').run_script('conpot==0.6.0', 'conpot')
File "/home/waleed/.local/lib/python2.7/site-packages/pkg_resources/init.py", line 666, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/home/waleed/.local/lib/python2.7/site-packages/pkg_resources/init.py", line 1453, in run_script
exec(code, namespace, namespace)
File "/usr/local/lib/python3.5/dist-packages/conpot-0.6.0-py2.7.egg/EGG-INFO/scripts/conpot", line 19, in
import gevent.monkey; gevent.monkey.patch_all()
File "/home/waleed/.local/lib/python2.7/site-packages/gevent/init.py", line 87, in
from gevent._hub_local import get_hub
File "/home/waleed/.local/lib/python2.7/site-packages/gevent/_hub_local.py", line 101, in
import_c_accel(globals(), 'gevent.__hub_local')
File "/home/waleed/.local/lib/python2.7/site-packages/gevent/_util.py", line 105, in import_c_accel
mod = importlib.import_module(cname)
File "/usr/lib/python3.5/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: /home/waleed/.local/lib/python2.7/site-packages/gevent/__hub_local.so: undefined symbol: _Py_ZeroStruct
Is this good way to change the version of python , and how could set new version as default in my project?