2

I have created a Python-based GUI application which has certain dependencies such as the "request" and "psycopg2" modules among others.

I want to create a setup script that will install all such dependencies when run, so that a user can run the GUI application without having any missing package errors.

I did try looking up the distutils module, but am not able to fully understand its usage.

3 Answers 3

3

if you did

$ pip install SomeLib

to satisfy a requirement for developing your own library, you should have a setup script something like this:

#!/usr/bin/env python
from distutils.core import setup
setup(
    # ...
    install_requires=['SomeLib']
)
Sign up to request clarification or add additional context in comments.

Comments

1

You specify all dependent packages in the 'install_requires' option within your setup.py - that's it.

If this is not sufficient or good enough (for whatever reason): look into zc.buildout giving your more options installing and configuring external dependencies.

Comments

0

Check out the impstall package, a project I created to meet these same needs. It's as simple as:

import impstall
impstall.now('csv')
impstall.now('wx', pipName='wxPython')

2 Comments

Please do disclose your association with this package; this is your own project. See How to offer personal open-source libraries?
Sorry, I forgot to add that I started it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.