查看PYTHON的安装位置以及安装第三方库的位置

1.进入PYTHON后 

import sys 

sys.path


2.则会打印出你的当前版本安装包的位置 

['', '/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.即能打印相关包路径位置

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".

你可能感兴趣的:(查看PYTHON的安装位置以及安装第三方库的位置)