conda安装python-v返回回溯

5ssjco0h  于 2021-08-25  发布在  Java
关注(0)|答案(2)|浏览(423)

我刚把anaconda安装到我的电脑上,但是当我运行 python -v ,一堆看起来像stacktrace的导入站被吐到我的终端上。你知道哪里出了问题,我该怎么解决吗?

~ % python -v
import _frozen_importlib # frozen
import _imp # builtin
import '_thread' # <class '_frozen_importlib.BuiltinImporter'>
import '_warnings' # <class '_frozen_importlib.BuiltinImporter'>
import '_weakref' # <class '_frozen_importlib.BuiltinImporter'>
import '_frozen_importlib_external' # <class '_frozen_importlib.FrozenImporter'>
import '_io' # <class '_frozen_importlib.BuiltinImporter'>
import 'marshal' # <class '_frozen_importlib.BuiltinImporter'>
import 'posix' # <class '_frozen_importlib.BuiltinImporter'>
import _thread # previously loaded ('_thread')
import '_thread' # <class '_frozen_importlib.BuiltinImporter'>
import _weakref # previously loaded ('_weakref')
import '_weakref' # <class '_frozen_importlib.BuiltinImporter'>

# installing zipimport hook

import 'time' # <class '_frozen_importlib.BuiltinImporter'>
import 'zipimport' # <class '_frozen_importlib.FrozenImporter'>

# installed zipimport hook

# /opt/anaconda3/lib/python3.8/encodings/__pycache__/__init__.cpython-38.pyc matches /opt/anaconda3/lib/python3.8/encodings/__init__.py

# code object from '/opt/anaconda3/lib/python3.8/encodings/__pycache__/__init__.cpython-38.pyc'

# /opt/anaconda3/lib/python3.8/__pycache__/codecs.cpython-38.pyc matches /opt/anaconda3/lib/python3.8/codecs.py

# code object from '/opt/anaconda3/lib/python3.8/__pycache__/codecs.cpython-38.pyc'

import '_codecs' # <class '_frozen_importlib.BuiltinImporter'>
import 'codecs' # <_frozen_importlib_external.SourceFileLoader object at 0x7fbbed6d8490>

# /opt/anaconda3/lib/python3.8/encodings/__pycache__/aliases.cpython-38.pyc matches /opt/anaconda3/lib/python3.8/encodings/aliases.py

# code object from '/opt/anaconda3/lib/python3.8/encodings/__pycache__/aliases.cpython-38.pyc'

import 'encodings.aliases' # <_frozen_importlib_external.SourceFileLoader object at 0x7fbbef168a60>
import 'encodings' # <_frozen_importlib_external.SourceFileLoader object at 0x7fbbed6d8280>

# /opt/anaconda3/lib/python3.8/encodings/__pycache__/utf_8.cpython-38.pyc matches /opt/anaconda3/lib/python3.8/encodings/utf_8.py

# code object from '/opt/anaconda3/lib/python3.8/encodings/__pycache__/utf_8.cpython-38.pyc'

import 'encodings.utf_8' # <_frozen_importlib_external.SourceFileLoader object at 0x7fbbed6d82e0>
import '_signal' # <class '_frozen_importlib.BuiltinImporter'>

# /opt/anaconda3/lib/python3.8/encodings/__pycache__/latin_1.cpython-38.pyc matches /opt/anaconda3/lib/python3.8/encodings/latin_1.py

# code object from '/opt/anaconda3/lib/python3.8/encodings/__pycache__/latin_1.cpython-38.pyc'

import 'encodings.latin_1' # <_frozen_importlib_external.SourceFileLoader object at 0x7fbbef168b50>

# /opt/anaconda3/lib/python3.8/__pycache__/io.cpython-38.pyc matches /opt/anaconda3/lib/python3.8/io.py

# code object from '/opt/anaconda3/lib/python3.8/__pycache__/io.cpython-38.pyc'

# /opt/anaconda3/lib/python3.8/__pycache__/abc.cpython-38.pyc matches /opt/anaconda3/lib/python3.8/abc.py

# code object from '/opt/anaconda3/lib/python3.8/__pycache__/abc.cpython-38.pyc'

import '_abc' # <class '_frozen_importlib.BuiltinImporter'>
import 'abc' # <_frozen_importlib_external.SourceFileLoader object at 0x7fbbef168fd0>
import 'io' # <_frozen_importlib_external.SourceFileLoader object at 0x7fbbef168d00>

# /opt/anaconda3/lib/python3.8/__pycache__/site.cpython-38.pyc matches /opt/anaconda3/lib/python3.8/site.py

# code object from '/opt/anaconda3/lib/python3.8/__pycache__/site.cpython-38.pyc'

# /opt/anaconda3/lib/python3.8/__pycache__/os.cpython-38.pyc matches /opt/anaconda3/lib/python3.8/os.py

# code object from '/opt/anaconda3/lib/python3.8/__pycache__/os.cpython-38.pyc'

# /opt/anaconda3/lib/python3.8/__pycache__/stat.cpython-38.pyc matches /opt/anaconda3/lib/python3.8/stat.py

# code object from '/opt/anaconda3/lib/python3.8/__pycache__/stat.cpython-38.pyc'

import '_stat' # <class '_frozen_importlib.BuiltinImporter'>
import 'stat' # <_frozen_importlib_external.SourceFileLoader object at 0x7fbbef1fd940>

# /opt/anaconda3/lib/python3.8/__pycache__/_collections_abc.cpython-38.pyc matches /opt/anaconda3/lib/python3.8/_collections_abc.py

# code object from '/opt/anaconda3/lib/python3.8/__pycache__/_collections_abc.cpython-38.pyc'

import '_collections_abc' # <_frozen_importlib_external.SourceFileLoader object at 0x7fbbef1fd9d0>

# /opt/anaconda3/lib/python3.8/__pycache__/posixpath.cpython-38.pyc matches /opt/anaconda3/lib/python3.8/posixpath.py

# code object from '/opt/anaconda3/lib/python3.8/__pycache__/posixpath.cpython-38.pyc'

# /opt/anaconda3/lib/python3.8/__pycache__/genericpath.cpython-38.pyc matches /opt/anaconda3/lib/python3.8/genericpath.py

# code object from '/opt/anaconda3/lib/python3.8/__pycache__/genericpath.cpython-38.pyc'

import 'genericpath' # <_frozen_importlib_external.SourceFileLoader object at 0x7fbbef220310>
import 'posixpath' # <_frozen_importlib_external.SourceFileLoader object at 0x7fbbef1fda60>
import 'os' # <_frozen_importlib_external.SourceFileLoader object at 0x7fbbef183fa0>

# /opt/anaconda3/lib/python3.8/__pycache__/_sitebuiltins.cpython-38.pyc matches /opt/anaconda3/lib/python3.8/_sitebuiltins.py

# code object from '/opt/anaconda3/lib/python3.8/__pycache__/_sitebuiltins.cpython-38.pyc'

import '_sitebuiltins' # <_frozen_importlib_external.SourceFileLoader object at 0x7fbbef194940>

# /opt/anaconda3/lib/python3.8/__pycache__/_bootlocale.cpython-38.pyc matches /opt/anaconda3/lib/python3.8/_bootlocale.py

# code object from '/opt/anaconda3/lib/python3.8/__pycache__/_bootlocale.cpython-38.pyc'

import '_locale' # <class '_frozen_importlib.BuiltinImporter'>
import '_bootlocale' # <_frozen_importlib_external.SourceFileLoader object at 0x7fbbef220730>

# /opt/anaconda3/lib/python3.8/__pycache__/types.cpython-38.pyc matches /opt/anaconda3/lib/python3.8/types.py

# code object from '/opt/anaconda3/lib/python3.8/__pycache__/types.cpython-38.pyc'

import 'types' # <_frozen_importlib_external.SourceFileLoader object at 0x7fbbef220a00>

# /opt/anaconda3/lib/python3.8/importlib/__pycache__/__init__.cpython-38.pyc matches /opt/anaconda3/lib/python3.8/importlib/__init__.py

# code object from '/opt/anaconda3/lib/python3.8/importlib/__pycache__/__init__.cpython-38.pyc'

# /opt/anaconda3/lib/python3.8/__pycache__/warnings.cpython-38.pyc matches /opt/anaconda3/lib/python3.8/warnings.py

# code object from '/opt/anaconda3/lib/python3.8/__pycache__/warnings.cpython-38.pyc'

import 'warnings' # <_frozen_importlib_external.SourceFileLoader object at 0x7fbbef2735b0>
import 'importlib' # <_frozen_importlib_external.SourceFileLoader object at 0x7fbbef273220>

# /opt/anaconda3/lib/python3.8/importlib/__pycache__/util.cpython-38.pyc matches /opt/anaconda3/lib/python3.8/importlib/util.py

# code object from '/opt/anaconda3/lib/python3.8/importlib/__pycache__/util.cpython-38.pyc'

# /opt/anaconda3/lib/python3.8/importlib/__pycache__/abc.cpython-38.pyc matches /opt/anaconda3/lib/python3.8/importlib/abc.py

# code object from '/opt/anaconda3/lib/python3.8/importlib/__pycache__/abc.cpython-38.pyc'

# /opt/anaconda3/lib/python3.8/importlib/__pycache__/machinery.cpython-38.pyc matches /opt/anaconda3/lib/python3.8/importlib/machinery.py

# code object from '/opt/anaconda3/lib/python3.8/importlib/__pycache__/machinery.cpython-38.pyc'

import 'importlib.machinery' # <_frozen_importlib_external.SourceFileLoader object at 0x7fbbef285df0>
import 'importlib.abc' # <_frozen_importlib_external.SourceFileLoader object at 0x7fbbef285190>

# /opt/anaconda3/lib/python3.8/__pycache__/contextlib.cpython-38.pyc matches /opt/anaconda3/lib/python3.8/contextlib.py

# code object from '/opt/anaconda3/lib/python3.8/__pycache__/contextlib.cpython-38.pyc'

# /opt/anaconda3/lib/python3.8/collections/__pycache__/__init__.cpython-38.pyc matches /opt/anaconda3/lib/python3.8/collections/__init__.py

# code object from '/opt/anaconda3/lib/python3.8/collections/__pycache__/__init__.cpython-38.pyc'

# /opt/anaconda3/lib/python3.8/__pycache__/operator.cpython-38.pyc matches /opt/anaconda3/lib/python3.8/operator.py

# code object from '/opt/anaconda3/lib/python3.8/__pycache__/operator.cpython-38.pyc'

import '_operator' # <class '_frozen_importlib.BuiltinImporter'>
import 'operator' # <_frozen_importlib_external.SourceFileLoader object at 0x7fbbef2ba340>

# /opt/anaconda3/lib/python3.8/__pycache__/keyword.cpython-38.pyc matches /opt/anaconda3/lib/python3.8/keyword.py

# code object from '/opt/anaconda3/lib/python3.8/__pycache__/keyword.cpython-38.pyc'

import 'keyword' # <_frozen_importlib_external.SourceFileLoader object at 0x7fbbef2ba430>

# /opt/anaconda3/lib/python3.8/__pycache__/heapq.cpython-38.pyc matches /opt/anaconda3/lib/python3.8/heapq.py

# code object from '/opt/anaconda3/lib/python3.8/__pycache__/heapq.cpython-38.pyc'

# extension module '_heapq' loaded from '/opt/anaconda3/lib/python3.8/lib-dynload/_heapq.cpython-38-darwin.so'

# extension module '_heapq' executed from '/opt/anaconda3/lib/python3.8/lib-dynload/_heapq.cpython-38-darwin.so'

import '_heapq' # <_frozen_importlib_external.ExtensionFileLoader object at 0x7fbbef2bad60>
import 'heapq' # <_frozen_importlib_external.SourceFileLoader object at 0x7fbbef2ba5b0>
import 'itertools' # <class '_frozen_importlib.BuiltinImporter'>

# /opt/anaconda3/lib/python3.8/__pycache__/reprlib.cpython-38.pyc matches /opt/anaconda3/lib/python3.8/reprlib.py

# code object from '/opt/anaconda3/lib/python3.8/__pycache__/reprlib.cpython-38.pyc'

import 'reprlib' # <_frozen_importlib_external.SourceFileLoader object at 0x7fbbef2ba940>
import '_collections' # <class '_frozen_importlib.BuiltinImporter'>
import 'collections' # <_frozen_importlib_external.SourceFileLoader object at 0x7fbbef29d520>

# /opt/anaconda3/lib/python3.8/__pycache__/functools.cpython-38.pyc matches /opt/anaconda3/lib/python3.8/functools.py

# code object from '/opt/anaconda3/lib/python3.8/__pycache__/functools.cpython-38.pyc'

import '_functools' # <class '_frozen_importlib.BuiltinImporter'>
import 'functools' # <_frozen_importlib_external.SourceFileLoader object at 0x7fbbef29d6d0>
import 'contextlib' # <_frozen_importlib_external.SourceFileLoader object at 0x7fbbef2857f0>
import 'importlib.util' # <_frozen_importlib_external.SourceFileLoader object at 0x7fbbef273400>

# possible namespace for /opt/anaconda3/lib/python3.8/site-packages/mpl_toolkits

# destroy sphinxcontrib

# destroy sphinxcontrib

# destroy sphinxcontrib

# destroy sphinxcontrib

# destroy sphinxcontrib

# destroy sphinxcontrib

# destroy zope

# zipimport: found 7 names in '/opt/anaconda3/lib/python3.8/site-packages/locket-0.2.1-py3.8.egg'

import 'site' # <_frozen_importlib_external.SourceFileLoader object at 0x7fbbef183970>
Python 3.8.8 (default, Apr 13 2021, 12:59:45)
[Clang 10.0.0 ] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.

# extension module 'readline' loaded from '/opt/anaconda3/lib/python3.8/lib-dynload/readline.cpython-38-darwin.so'

# extension module 'readline' executed from '/opt/anaconda3/lib/python3.8/lib-dynload/readline.cpython-38-darwin.so'

import 'readline' # <_frozen_importlib_external.ExtensionFileLoader object at 0x7fbbef2c7ee0>
import 'atexit' # <class '_frozen_importlib.BuiltinImporter'>

# /opt/anaconda3/lib/python3.8/__pycache__/rlcompleter.cpython-38.pyc matches /opt/anaconda3/lib/python3.8/rlcompleter.py

# code object from '/opt/anaconda3/lib/python3.8/__pycache__/rlcompleter.cpython-38.pyc'

import 'rlcompleter' # <_frozen_importlib_external.SourceFileLoader object at 0x7fbbef29d880>
c0vxltue

c0vxltue1#

如果你跑 python --help 你会看到:

-v     : verbose (trace import statements); also PYTHONVERBOSE=x
         can be supplied multiple times to increase verbosity

您可能正在寻找:

-V     : print the Python version number and exit (also --version)

注意大写字母 V 大小写 v

ao218c7q

ao218c7q2#

我猜您正在尝试检查安装是否成功并检查python版本。您可以运行其中一个命令

python --version

python -V

您可以在此处查看文档:https://conda.io/projects/conda/en/latest/user-guide/getting-started.html#

相关问题