leon@leon-Vostro-430:/usr/local/software/python$ python3
Python 3.4.3 (default, Nov 12 2018, 22:20:49)
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import learn_message
>>> learn_message.__file__
'/usr/local/lib/python3.4/dist-packages/learn_message/__init__.py'
>>>
leon@leon-Vostro-430:/usr/local/software/python$ cd /usr/local/lib/python3.4/dist-packages/
leon@leon-Vostro-430:/usr/local/lib/python3.4/dist-packages$ ll
总用量 60
drwxrwsr-x 13 root staff 4096 10月 9 11:42 ./
drwxrwsr-x 3 root staff 4096 7月 23 2014 ../
-rw-r--r-- 1 root staff 126 4月 23 11:32 easy_install.py
drwxr-sr-x 3 root staff 4096 10月 9 11:42 learn_message/
-rw-r--r-- 1 root staff 252 10月 9 11:42 learn_message-1.0.egg-info
drwxr-sr-x 4 root staff 4096 4月 23 11:34 paho/
drwxr-sr-x 2 root staff 4096 4月 23 11:34 paho_mqtt-1.4.0.dist-info/
drwxr-sr-x 5 root staff 4096 4月 23 11:32 pip/
drwxr-sr-x 2 root staff 4096 4月 23 11:32 pip-19.0.3.dist-info/
drwxr-sr-x 5 root staff 4096 4月 23 11:32 pkg_resources/
drwxr-sr-x 2 root staff 4096 4月 23 11:32 __pycache__/
drwxr-sr-x 6 root staff 4096 4月 23 11:32 setuptools/
drwxr-sr-x 2 root staff 4096 4月 23 11:32 setuptools-41.0.1.dist-info/
drwxr-sr-x 4 root staff 4096 4月 23 11:32 wheel/
drwxr-sr-x 2 root staff 4096 4月 23 11:32 wheel-0.33.1.dist-info/
leon@leon-Vostro-430:/usr/local/lib/python3.4/dist-packages$
leon@leon-Vostro-430:/usr/local/lib/python3.4/dist-packages$ sudo rm -rf learn_message*
[sudo] password for leon:
leon@leon-Vostro-430:/usr/local/lib/python3.4/dist-packages$ ll
总用量 52
drwxrwsr-x 12 root staff 4096 10月 9 13:20 ./
drwxrwsr-x 3 root staff 4096 7月 23 2014 ../
-rw-r--r-- 1 root staff 126 4月 23 11:32 easy_install.py
drwxr-sr-x 4 root staff 4096 4月 23 11:34 paho/
drwxr-sr-x 2 root staff 4096 4月 23 11:34 paho_mqtt-1.4.0.dist-info/
drwxr-sr-x 5 root staff 4096 4月 23 11:32 pip/
drwxr-sr-x 2 root staff 4096 4月 23 11:32 pip-19.0.3.dist-info/
drwxr-sr-x 5 root staff 4096 4月 23 11:32 pkg_resources/
drwxr-sr-x 2 root staff 4096 4月 23 11:32 __pycache__/
drwxr-sr-x 6 root staff 4096 4月 23 11:32 setuptools/
drwxr-sr-x 2 root staff 4096 4月 23 11:32 setuptools-41.0.1.dist-info/
drwxr-sr-x 4 root staff 4096 4月 23 11:32 wheel/
drwxr-sr-x 2 root staff 4096 4月 23 11:32 wheel-0.33.1.dist-info/
leon@leon-Vostro-430:/usr/local/lib/python3.4/dist-packages$
leon@leon-Vostro-430:/usr/local/lib/python3.4/dist-packages$ python3
Python 3.4.3 (default, Nov 12 2018, 22:20:49)
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import learn_message
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'learn_message'
>>>