Questions tagged [setuptools]

setuptools is a set of enhancements to Python's distutils which simplify building, distribution and installation of Python packages.

setuptools is a (largely) drop-in replacement for distutils first published in 2004. Its most notable addition over the unmodified distutils tools was the ability to declare dependencies on other packages. It is currently recommended as a more regularly updated alternative to distutils that offers consistent support for more recent packaging standards across a wide range of Python versions.

The recommended pip installer runs all setup.py scripts with setuptools, even if the script itself only imports distutils.
This text is Copyright © 2001-2021 Python Software Foundation; All Rights Reserved.


Tag usage

  • Questions about setuptools-specific features should be tagged .
  • If a question is only about functionality common to both distutils and setuptools, the tag can be used in advance.
  • If it's unclear that the question author is using setuptools, the tag should be used instead.

Other related tags:

Modern alternatives to setuptools

Resources

3420 questions
2
votes
1 answer

how to automatically install dependent modules used in a python app

I just started learning Python and a bit confused about how packages are distributed and installed. I am aware of helper scripts easy_install and pip which can be used to install the dependent modules,howerver I am not clear how to do with…
user5007670
2
votes
2 answers

How to install a python module from Github with no root access?

I've read several article but I've had no luck as my situation conflicts with one or more freedoms that others have. This is my situation. I've no access to root. I'm just a user with access to python. No sudo. python 2.x.x is pre-installed pip…
user2516837
2
votes
1 answer

python setup installing outside of activated virtualenv

I have a setup code in python using setuptools, and I have the python code to install in /usr/share/mypackage (owned by root), but I'm trying to install the package as a non-privileged user. So, I create a virtual environment (with virtualenv) in a…
Eduardo Bezerra
  • 1,923
  • 1
  • 17
  • 32
2
votes
1 answer

setuptools sdist ignore data_files

According to docs https://packaging.python.org/en/latest/distributing/#data-files setuptools will honor data_files configed in setup.py. But i can't make it work. This is my setup.py: setup( name='booking_order', version=version, …
apporc
  • 870
  • 3
  • 11
  • 23
2
votes
2 answers

Install tensorflow using setuptools

I'd like to set up a setup.py script to install tensorflow, but there isn't just a simple pip install method to install it. The only way I've figured out is this extremely hacky way, is there a better, official way to do it? from setuptools…
Roman
  • 8,826
  • 10
  • 63
  • 103
2
votes
0 answers

Adding package to setuptools package list (using absolute imports) for Travis and Appveyor

I am porting a library to python 3 and keeping it compatible with python 2. I have a directory structure like this: mypackage/ lib/ engines/ __init__.py setup.py / I want the setup to recognize mypackage as a package…
goelakash
  • 2,502
  • 4
  • 40
  • 56
2
votes
0 answers

PyPi upload fails with TypeError

I am trying to upload a new package to PyPi with this command: $ python3 setup.py sdist upload The process seems to go on well until the running upload bit, at which point I get this exception: Traceback (most recent call last): File "setup.py",…
Luís de Sousa
  • 5,765
  • 11
  • 49
  • 86
2
votes
1 answer

Python setuptools Upload failed (400): Invalid URI: u'UNKNOWN'

When I try to upload a new version of my package I've got the following error: $ python setup.py sdist upload ... ... ... Submitting dist/django-super-favicon-0.6.0.tar.gz to https://pypi.python.org/pypi Upload failed (400): Invalid URI:…
Zulu
  • 8,765
  • 9
  • 49
  • 56
2
votes
0 answers

How to check for dependencies with setuptools?

I am making a package that depends on backports.lzma. So I have something like this on my setup.py: install_requires=[ "enum34", "hashlib", "backports.lzma", "termcolor", "xmltodict" ], During my package installation…
nowox
  • 25,978
  • 39
  • 143
  • 293
2
votes
1 answer

Setting basedirlist in setup.cfg and PREFIX in make to point to virtualenv

In SO question 3692928, I showed how I compiled and installed matplotlib in a virtualenv. One thing I did was suboptimal though—I manually set the basedirlist in setup.cfg and PREFIX in make.osx. setup.cfg [directories] basedirlist =…
Matthew Rankin
  • 457,139
  • 39
  • 126
  • 163
2
votes
1 answer

trouble with xgboost install (mac os)

I'm running Python 2.7 with anaconda distribution on a mac, when I try to install xgboost via pip, I see the following error: Command "python setup.py egg_info" failed with error code 1 in…
jamebone
  • 21
  • 1
  • 2
2
votes
1 answer

Force setuptools to use dependency_links to install mysqlclient

I'm using Windows, and I need to install the WHL file from here. Here's what I have in…
user2233706
  • 6,148
  • 5
  • 44
  • 86
2
votes
1 answer

Install directory for rpm made with setup.py (setuptools)

I need to deploy a python project with rpm package. I make it with setuptools library: python setup.py bdist_rpm After command rpm -i myapp.rpm performed application installs to the directory /usr/lib/python2.6/site-packages/. However, I need…
Loom
  • 9,768
  • 22
  • 60
  • 112
2
votes
1 answer

'Invalid module name' creating package with setuptools

I have a project with these contents: proj ├── proj │   ├── scriptA.py │   ├── scriptB.py │   └── __init__.py ├── LICENCE ├── README.md └── setup.py I am following this guide to package this project for PiPY. The setup.py file looks…
Luís de Sousa
  • 5,765
  • 11
  • 49
  • 86
2
votes
4 answers

Why can't I import my self-created Python package?

I just created a Python package (sources here) but I'm having trouble using it after installation. A simple import gives me an ImportError. Below I'll show exactly what I did so that you can reproduce it: $ git clone…
kramer65
  • 50,427
  • 120
  • 308
  • 488
1 2 3
99
100