Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Given a module on pypi, is there a way to introspect the module and show all dependencies?

For example, I am looking for a command line snippet to list all dependencies of a python module e.g. http://pypi.python.org/pypi/django-celery given the URL. Does one exist ?

like image 890
Frankie Ribery Avatar asked Jun 24 '11 02:06

Frankie Ribery


1 Answers

I would use a combination of virtualenv and pip to do the job. The snippet would look sth like this:

virtualenv <path_to_a_new_env> --no-site-packages
<using this virtual env> && pip install <url or package name>
<using this virtual env> && pip freeze
---
<using this virtualenv> - source bin/activate on Linux scipts/activate.bat on linux

The problem is that you this would only list dependencies, but not versions if any specific are required.

like image 115
dahpgjgamgan Avatar answered Oct 13 '22 23:10

dahpgjgamgan