查看PYTHON的安裝位置以及安裝第三方庫(kù)的位置

1.進(jìn)入PYTHON后?

import sys?

sys.path


2.則會(huì)打印出你的當(dāng)前版本安裝包的位置?

['', '/Library/Frameworks/Python.framework/Versions/3.6/lib/python36.zip', '/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6', '/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload', '/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages']

3.即能打印相關(guān)包路徑位置

Please wait a moment while I gather a list of all available modules...

__future__? ? ? ? ? abc? ? ? ? ? ? ? ? html? ? ? ? ? ? ? ? shelve

_ast? ? ? ? ? ? ? ? aifc? ? ? ? ? ? ? ? http? ? ? ? ? ? ? ? shlex

_asyncio? ? ? ? ? ? antigravity? ? ? ? idlelib? ? ? ? ? ? shutil

_bisect? ? ? ? ? ? argparse? ? ? ? ? ? imaplib? ? ? ? ? ? signal

_blake2? ? ? ? ? ? array? ? ? ? ? ? ? imghdr? ? ? ? ? ? ? site

_bootlocale? ? ? ? ast? ? ? ? ? ? ? ? imp? ? ? ? ? ? ? ? smtpd

_bz2? ? ? ? ? ? ? ? asynchat? ? ? ? ? ? importlib? ? ? ? ? smtplib

_codecs? ? ? ? ? ? asyncio? ? ? ? ? ? inspect? ? ? ? ? ? sndhdr

_codecs_cn? ? ? ? ? asyncore? ? ? ? ? ? io? ? ? ? ? ? ? ? ? socket

_codecs_hk? ? ? ? ? atexit? ? ? ? ? ? ? ipaddress? ? ? ? ? socketserver

_codecs_iso2022? ? audioop? ? ? ? ? ? itertools? ? ? ? ? sqlite3

_codecs_jp? ? ? ? ? base64? ? ? ? ? ? ? json? ? ? ? ? ? ? ? sre_compile

_codecs_kr? ? ? ? ? bdb? ? ? ? ? ? ? ? keyword? ? ? ? ? ? sre_constants

_codecs_tw? ? ? ? ? binascii? ? ? ? ? ? lib2to3? ? ? ? ? ? sre_parse

_collections? ? ? ? binhex? ? ? ? ? ? ? linecache? ? ? ? ? ssl

_collections_abc? ? bisect? ? ? ? ? ? ? locale? ? ? ? ? ? ? stat

_compat_pickle? ? ? builtins? ? ? ? ? ? logging? ? ? ? ? ? statistics

_compression? ? ? ? bz2? ? ? ? ? ? ? ? lzma? ? ? ? ? ? ? ? string

_crypt? ? ? ? ? ? ? cProfile? ? ? ? ? ? macpath? ? ? ? ? ? stringprep

_csv? ? ? ? ? ? ? ? calendar? ? ? ? ? ? macurl2path? ? ? ? struct

_ctypes? ? ? ? ? ? cgi? ? ? ? ? ? ? ? mailbox? ? ? ? ? ? subprocess

_ctypes_test? ? ? ? cgitb? ? ? ? ? ? ? mailcap? ? ? ? ? ? sunau

_curses? ? ? ? ? ? check_bmp? ? ? ? ? marshal? ? ? ? ? ? symbol

_curses_panel? ? ? chunk? ? ? ? ? ? ? math? ? ? ? ? ? ? ? symtable

_datetime? ? ? ? ? cmath? ? ? ? ? ? ? mimetypes? ? ? ? ? sys

_dbm? ? ? ? ? ? ? ? cmd? ? ? ? ? ? ? ? mmap? ? ? ? ? ? ? ? sysconfig

_decimal? ? ? ? ? ? code? ? ? ? ? ? ? ? modulefinder? ? ? ? syslog

_dummy_thread? ? ? codecs? ? ? ? ? ? ? multiprocessing? ? tabnanny

_elementtree? ? ? ? codeop? ? ? ? ? ? ? mydict_test? ? ? ? tarfile

_functools? ? ? ? ? collections? ? ? ? netrc? ? ? ? ? ? ? task_master

_hashlib? ? ? ? ? ? colorsys? ? ? ? ? ? nis? ? ? ? ? ? ? ? task_worker

_heapq? ? ? ? ? ? ? compileall? ? ? ? ? nntplib? ? ? ? ? ? telnetlib

_imp? ? ? ? ? ? ? ? concurrent? ? ? ? ? ntpath? ? ? ? ? ? ? tempfile

_io? ? ? ? ? ? ? ? configparser? ? ? ? nturl2path? ? ? ? ? termios

_json? ? ? ? ? ? ? contextlib? ? ? ? ? numbers? ? ? ? ? ? test

_locale? ? ? ? ? ? copy? ? ? ? ? ? ? ? oo? ? ? ? ? ? ? ? ? textwrap

_lsprof? ? ? ? ? ? copyreg? ? ? ? ? ? opcode? ? ? ? ? ? ? this

_lzma? ? ? ? ? ? ? crypt? ? ? ? ? ? ? operator? ? ? ? ? ? thread

_markupbase? ? ? ? csv? ? ? ? ? ? ? ? optparse? ? ? ? ? ? threading

_md5? ? ? ? ? ? ? ? ctypes? ? ? ? ? ? ? os? ? ? ? ? ? ? ? ? time

_multibytecodec? ? curses? ? ? ? ? ? ? parser? ? ? ? ? ? ? timeit

_multiprocessing? ? datetime? ? ? ? ? ? pathlib? ? ? ? ? ? tkinter

_opcode? ? ? ? ? ? dbm? ? ? ? ? ? ? ? pdb? ? ? ? ? ? ? ? token

_operator? ? ? ? ? debug? ? ? ? ? ? ? pickle? ? ? ? ? ? ? tokenize

_osx_support? ? ? ? decimal? ? ? ? ? ? pickletools? ? ? ? trace

_pickle? ? ? ? ? ? difflib? ? ? ? ? ? pip? ? ? ? ? ? ? ? traceback

_posixsubprocess? ? dis? ? ? ? ? ? ? ? pipes? ? ? ? ? ? ? tracemalloc

_pydecimal? ? ? ? ? distutils? ? ? ? ? pkg_resources? ? ? tty

_pyio? ? ? ? ? ? ? do_base64? ? ? ? ? pkgutil? ? ? ? ? ? turtle

_random? ? ? ? ? ? do_hashlib? ? ? ? ? platform? ? ? ? ? ? turtledemo

_scproxy? ? ? ? ? ? doctest? ? ? ? ? ? plistlib? ? ? ? ? ? types

_sha1? ? ? ? ? ? ? dummy_threading? ? poplib? ? ? ? ? ? ? typing

_sha256? ? ? ? ? ? easy_install? ? ? ? posix? ? ? ? ? ? ? unicodedata

_sha3? ? ? ? ? ? ? email? ? ? ? ? ? ? posixpath? ? ? ? ? unittest

_sha512? ? ? ? ? ? encodings? ? ? ? ? pprint? ? ? ? ? ? ? urllib

_signal? ? ? ? ? ? ensurepip? ? ? ? ? profile? ? ? ? ? ? use_datetime

_sitebuiltins? ? ? enum? ? ? ? ? ? ? ? pstats? ? ? ? ? ? ? use_sax

_socket? ? ? ? ? ? errno? ? ? ? ? ? ? pty? ? ? ? ? ? ? ? use_urllib

_sqlite3? ? ? ? ? ? faulthandler? ? ? ? pwd? ? ? ? ? ? ? ? uu

_sre? ? ? ? ? ? ? ? fcntl? ? ? ? ? ? ? py_compile? ? ? ? ? uuid

_ssl? ? ? ? ? ? ? ? filecmp? ? ? ? ? ? pyclbr? ? ? ? ? ? ? venv

_stat? ? ? ? ? ? ? fileinput? ? ? ? ? pydoc? ? ? ? ? ? ? warnings

_string? ? ? ? ? ? fnmatch? ? ? ? ? ? pydoc_data? ? ? ? ? wave

_strptime? ? ? ? ? formatter? ? ? ? ? pyexpat? ? ? ? ? ? weakref

_struct? ? ? ? ? ? fractions? ? ? ? ? queue? ? ? ? ? ? ? webbrowser

_symtable? ? ? ? ? ftplib? ? ? ? ? ? ? quopri? ? ? ? ? ? ? wsgiref

_sysconfigdata_m_darwin_darwin functools? ? ? ? ? random? ? ? ? ? ? ? xdrlib

_testbuffer? ? ? ? gc? ? ? ? ? ? ? ? ? re? ? ? ? ? ? ? ? ? xml

_testcapi? ? ? ? ? genericpath? ? ? ? readline? ? ? ? ? ? xmlrpc

_testimportmultiple getopt? ? ? ? ? ? ? reprlib? ? ? ? ? ? xxlimited

_testmultiphase? ? getpass? ? ? ? ? ? resource? ? ? ? ? ? xxsubtype

_thread? ? ? ? ? ? gettext? ? ? ? ? ? rlcompleter? ? ? ? zipapp

_threading_local? ? glob? ? ? ? ? ? ? ? runpy? ? ? ? ? ? ? zipfile

_tkinter? ? ? ? ? ? grp? ? ? ? ? ? ? ? sched? ? ? ? ? ? ? zipimport

_tracemalloc? ? ? ? gzip? ? ? ? ? ? ? ? secrets? ? ? ? ? ? zlib

_warnings? ? ? ? ? hashlib? ? ? ? ? ? select? ? ? ? ? ? ?

_weakref? ? ? ? ? ? heapq? ? ? ? ? ? ? selectors? ? ? ? ? ?

_weakrefset? ? ? ? hmac? ? ? ? ? ? ? ? setuptools? ? ? ? ?

Enter any module name to get more help.? Or, type "modules spam" to search

for modules whose name or summary contain the string "spam".

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容