How do I get a list of locally installed Python modules?
help(‘modules’) in a Python shell/prompt.
help(‘modules’) in a Python shell/prompt.
pg_config is in postgresql-devel (libpq-dev in Debian/Ubuntu, libpq-devel on Centos/Fedora/Cygwin/Babun.)
This works for everyone: pip install -r /path/to/requirements.txt Explanation: -r, –requirement < filename > Install from the given requirements file. This option can be used multiple times.
TLDR. On any modern Mac python3 -m ensurepip then pip3 –version to check. pip’s documentation lists the supported mechanisms to install it: https://pip.pypa.io/en/stable/installation/#supported-methods It is generally recommended to avoid installing pip on the OS-provided python commands, and to install Python via the official installers or using something like Homebrew or pyenv. Python 3.4+ will have … Read more
TL;DR: pip install -Iv (i.e. pip install -Iv MySQL_python==1.2.2) What these options mean: -I stands for –ignore-installed which will ignore the installed packages, overwriting them. -v is for verbose. You can combine for even more verbosity (i.e. -vv) up to 3 times (e.g. -Ivvv). For more information, see pip install –help First, I see two … Read more
There isn’t a built-in flag yet, but you can use: pip list –outdated –format=freeze | grep -v ‘^\-e’ | cut -d = -f 1 | xargs -n1 pip install -U For older versions of pip: pip freeze –local | grep -v ‘^\-e’ | cut -d = -f 1 | xargs -n1 pip install -U The … Read more
Python 2.7.9+ and 3.4+ Good news! Python 3.4 (released March 2014) and Python 2.7.9 (released December 2014) ship with Pip. This is the best feature of any Python release. It makes the community’s wealth of libraries accessible to everyone. Newbies are no longer excluded from using community libraries by the prohibitive difficulty of setup. In … Read more