I suggest using pip in place of easy_install. With pip, you can list all installed packages and their versions with
In most linux systems, you can pipe this to
grepto find the row for the particular package you’re interested in:
$ pip freeze | grep lxml
For an individual module, you can try the
__version__attribute, however there are modules without it:
$ python -c "import requests; print(requests.__version__)"
$ python -c "import lxml; print(lxml.__version__)"
Traceback (most recent call last):
File "<string>", line 1, in <module>
AttributeError: 'module' object has no attribute '__version__'
Lastly, as the commands in your question are prefixed with
sudo, it appears you’re installing to the global python environment. Strongly advise to take look into python virtual environment managers, for example virtualenvwrapper
Latest posts by admin (see all)
- Install and Running Supervisord in virtualenv python 2.7 - January 24, 2019
- Urgent fix: Briefly unavailable for scheduled maintenance. Check back in a minute. - January 22, 2019
- Change WordPress post date format to time ago - January 21, 2019
Also published on Medium.