SecureCRT报错ImportError: No module named itertools(解决方案无法复现)
ubuntu20.04下面使用SecureCRT報(bào)錯(cuò):
(Python3.6) appleyuchi@Desktop:~$ /usr/bin/SecureCRT
Traceback (most recent call last):
? File "SecureCRT.pyx", line 10, in init SecureCRT (SecureCRT_pyx.cpp:19702)
? File "/usr/lib/python2.7/inspect.py", line 39, in <module>
??? import tokenize
? File "/usr/lib/python2.7/tokenize.py", line 29, in <module>
??? from itertools import chain
ImportError: No module named itertools
?
弄得我一臉蒙B,老版本的ubuntu安裝SecureCRT可沒(méi)出現(xiàn)過(guò)這種問(wèn)題啊。
感覺(jué)網(wǎng)上的解決方案都比較混亂,于是自己想了個(gè)辦法,讓系統(tǒng)使用anaconda的python2.7
解決方案:
1.刪除系統(tǒng)(synaptic里面的一些python包)所有和python2.7相關(guān)的
2.ln -s /home/appleyuchi/anaconda3/envs/Python2.7 /usr/lib/python2.7
如果想要?jiǎng)h除該軟鏈接,執(zhí)行:
rm -r /usr/lib/python2.7/Python2.7
先把下面的裝上吧
ii libpython-all-dbg:amd64 2.7.17-2ubuntu4 amd64 package depending on all supported Python2 debugging packages ii libpython-all-dev:amd64 2.7.17-2ubuntu4 amd64 package depending on all supported Python2 development packages ii libpython2-dbg:amd64 2.7.17-2ubuntu4 amd64 debug build of the Python2 interpreter (version 2.7) ii libpython2-dev:amd64 2.7.17-2ubuntu4 amd64 header files and a static library for Python2 ii libpython2-stdlib:amd64 2.7.17-2ubuntu4 amd64 interactive high-level object-oriented language (Python2) ii libpython2.7:amd64 2.7.18-1~20.04.1 amd64 Shared Python runtime library (version 2.7) ii libpython2.7-dbg:amd64 2.7.18-1~20.04.1 amd64 Debug Build of the Python Interpreter (version 2.7) ii libpython2.7-dev:amd64 2.7.18-1~20.04.1 amd64 Header files and a static library for Python (v2.7) ii libpython2.7-minimal:amd64 2.7.18-1~20.04.1 amd64 Minimal subset of the Python language (version 2.7) ii libpython2.7-stdlib:amd64 2.7.18-1~20.04.1 amd64 Interactive high-level object-oriented language (standard library, version 2.7) ii libpython3-stdlib:amd64 3.8.2-0ubuntu2 amd64 interactive high-level object-oriented language (default python3 version) ii libpython3.8:amd64 3.8.5-1~20.04.2 amd64 Shared Python runtime library (version 3.8) ii libpython3.8-minimal:amd64 3.8.5-1~20.04.2 amd64 Minimal subset of the Python language (version 3.8) ii libpython3.8-stdlib:amd64 3.8.5-1~20.04.2 amd64 Interactive high-level object-oriented language (standard library, version 3.8) ii libreoffice-script-provider-python 1:6.4.6-0ubuntu0.20.04.1 all Python script support provider for LibreOffice scripting framework ii python-all 2.7.17-2ubuntu4 amd64 package depending on all supported Python2 runtime versions ii python-all-dbg 2.7.17-2ubuntu4 amd64 package depending on all supported Python2 debugging packages ii python-all-dev 2.7.17-2ubuntu4 amd64 package depending on all supported Python2 development packages ii python-apt-common 2.0.0ubuntu0.20.04.4 all Python interface to libapt-pkg (locales) ii python-dbus 1.2.16-1build1 amd64 simple interprocess messaging system (Python interface) ii python-gi 3.36.0-1 amd64 Python 2.x bindings for gobject-introspection libraries ii python-gobject 3.34.0+2.28.6-14ubuntu1 all Python 2.x bindings for GObject - transitional package ii python-gobject-2 2.28.6-14ubuntu1 amd64 deprecated static Python bindings for the GObject library ii python-pkg-resources 44.0.0-2 all Package Discovery and Resource Access using pkg_resources ii python-pyflakes 2.1.1-2 all passive checker of Python 2 programs - Python modules ii python-tk 2.7.18-1 amd64 Tkinter - Writing Tk applications with Python2 ii python2 2.7.17-2ubuntu4 amd64 interactive high-level object-oriented language (Python2 version) ii python2-dbg 2.7.17-2ubuntu4 amd64 debug build of the Python2 interpreter (version 2.7) ii python2-dev 2.7.17-2ubuntu4 amd64 header files and a static library for Python2 ii python2-minimal 2.7.17-2ubuntu4 amd64 minimal subset of the Python2 language ii python2.7 2.7.18-1~20.04.1 amd64 Interactive high-level object-oriented language (version 2.7) ii python2.7-dbg 2.7.18-1~20.04.1 amd64 Debug Build of the Python Interpreter (version 2.7) ii python2.7-dev 2.7.18-1~20.04.1 amd64 Header files and a static library for Python (v2.7) ii python2.7-doc 2.7.18-1~20.04.1 all Documentation for the high-level object-oriented language Python (v2.7) ii python2.7-examples 2.7.18-1~20.04.1 all Examples for the Python language (v2.7) ii python2.7-minimal?
總結(jié)
以上是生活随笔為你收集整理的SecureCRT报错ImportError: No module named itertools(解决方案无法复现)的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 几种常见的优化算法
- 下一篇: 如何使用cmd打开磁盘目录和文件