Python === ###### tags: `Programming Language` `QCT` `Python` `III` ## pip ### Package Location ``` pip list pip show <package> ``` ### User Installation ``` pip install --user pip <package> export PATH=$(python -m site --user-base)/bin${PATH:+:$PATH} ``` ## python 3 - [How To Install Python 3 and Set Up a Local Programming Environment on Ubuntu 16.04](https://www.digitalocean.com/community/tutorials/how-to-install-python-3-and-set-up-a-local-programming-environment-on-ubuntu-16-04) - [Python 3 Tutorial](https://www.tutorialspoint.com/python3/index.htm) - [Manipulating Sounds and Creating Music Using Deep Generative Neural Networks](https://docs.google.com/document/d/1k4fQ3HQZVMxEPHwL4wVKeoLwXscYxWNUecOeE5Mx3O4/edit) - Where are dependencies? By default, on Linux, pip installs packages to /usr/local/lib/python2.7/dist-packages ``` In python3 shell: >>> import sys >>> sys.path ['', '/usr/lib/python3.4', '/usr/lib/python3.4/plat-x86_64-linux-gnu', '/usr/lib/python3.4/lib-dynload', '/usr/local/lib/python3.4/dist-packages', '/usr/lib/python3/dist-packages'] ``` ## python 2 * [python中os.system、os.popen、subprocess.popen的区别](https://blog.csdn.net/bcfdsagbfcisbg/article/details/78134172) * ```cat json_file | python -m json.tool``` ``` python -m module-name Searches sys.path for the named module and runs the corresponding .py file as a script. ```