Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8981483
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T20:20:52+00:00 2026-06-15T20:20:52+00:00

I just made a Python package with setuptool, but I face a problem, If

  • 0

I just made a Python package with setuptool, but I face a problem, If I preinstall everything from the Ubuntu repository the its working, but when I’m using PyPi the installation fails because on the PyPi contains only the source and it has to be compiled, so there are a lot of error source during installation. How can I install Ubuntu package during my package installation? My idea is the subprocess, is there a better way?

EDITED

The error message

Reading http://pypi.python.org/simple/enable/
Reading http://code.enthought.com/projects/enable
Best match: enable 4.2.0
Downloading http://www.enthought.com/repo/ets/enable-4.2.0.tar.gz
Processing enable-4.2.0.tar.gz
Writing /tmp/easy_install-wuMg8s/enable-4.2.0/setup.cfg
Running enable-4.2.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-wuMg8s/enable-4.2.0/egg-dist-tmp-LbjqHY
/usr/lib/python2.7/dist-packages/numpy/distutils/system_info.py:548: UserWarning: Specified path /usr/local/include/python2.7 is invalid.
  warnings.warn('Specified path %s is invalid.' % d)
/usr/lib/python2.7/dist-packages/numpy/distutils/system_info.py:548: UserWarning: Specified path  is invalid.
  warnings.warn('Specified path %s is invalid.' % d)
Warning: distutils distribution has been initialized, it may be too late to add a library freetype2_srcWarning: distutils distribution has been initialized, it may be too late to add a library agg24_srcWarning: distutils distribution has been initialized, it may be too late to add a library kiva_srcWarning: distutils distribution has been initialized, it may be too late to add an extension _agg/usr/lib/python2.7/dist-packages/numpy/distutils/system_info.py:548: UserWarning: Specified path /usr/X11R6/lib is invalid.
  warnings.warn('Specified path %s is invalid.' % d)
/usr/lib/python2.7/dist-packages/numpy/distutils/system_info.py:548: UserWarning: Specified path /usr/X11/lib is invalid.
  warnings.warn('Specified path %s is invalid.' % d)
/usr/lib/python2.7/dist-packages/numpy/distutils/system_info.py:548: UserWarning: Specified path /usr/X11R6/include is invalid.
  warnings.warn('Specified path %s is invalid.' % d)
/usr/lib/python2.7/dist-packages/numpy/distutils/system_info.py:548: UserWarning: Specified path /usr/X11/include is invalid.
  warnings.warn('Specified path %s is invalid.' % d)
error: X11 libraries not found.

Setup script:

from setuptools import setup

setup( 
    name = 'SomeName',
    version = '0.1',
    packages = ['src'],
    author = 'Some Author',
    maintainer = 'Some',
    maintainer_email = 'some@email.com',
    description = '',
    url = 'www.some.com',
    install_requires = ['envisage >= 4.0',
                        'pyface >= 4.0',
                        'apptools >= 4.0',
                        'chaco >= 4.0',
                        'traits >= 4.0',
                        'traitsui >= 4.0',
                        'mysql-connector-python >= 1.0',
                        'pysnmp >= 4.2',
                        'pyasn1 >= 0.1.4',
                        'M2Crypto >= 0.21.1',
                        'netifaces >= 0.7'

                        ],
 )
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T20:20:53+00:00Added an answer on June 15, 2026 at 8:20 pm

    Installing from apt repositories the binaries downloaded are already built with the required system libraries. If not, the apt manager ensures that any system libraries are also installed. Installing using setuptools (pip or easy_install) only fetch the python requirements; and not the build/system requirements.

    In your case, the error is error: X11 libraries not found. This means that the build headers for X11 are not available in your system. An easy way to get around this is to tell apt to only download and install the dependencies for your package (and not the package itself). This will ensure that when you use pip or easy_install, Python will find everything it needs.

    For example, psycopg2 is the Python library for Postgresql. To build it, you need postgresql support libraries (headers and files). These are not available from PyPi. The debian package python-psycopg2 will properly install all the external requirements. Now if I want to install psycopg2 in a virtual environment, I first need to make sure my system has all the external requirements to build the package, so I run this command:

    sudo apt-get build-dep python-pyscopg2

    This will only install the dependencies (all supporting headers) so that I can manually install it later.

    In your case, you should run apt-get build-dep python-enable, and it will fetch everything required:

    # apt-get build-dep python-enable
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    The following NEW packages will be installed:
      cdbs libblas3gf libdrm-intel1 libdrm-radeon1 libdrm2 libfreetype6-dev
      libgl1-mesa-dev libgl1-mesa-dri libgl1-mesa-glx libglu1-mesa
      libglu1-mesa-dev liblapack3gf libpaper-utils libpaper1 libpthread-stubs0
      libpthread-stubs0-dev libx11-dev libxau-dev libxcb1-dev libxdamage1
      libxdmcp-dev libxfixes3 libxslt1.1 libxxf86vm1 mesa-common-dev
      python-chardet python-docutils python-lxml python-numpy python-pygments
      python-pyrex python-roman python-setupdocs python-sphinx swig x11-common
      x11proto-core-dev x11proto-input-dev x11proto-kb-dev xtrans-dev
    0 upgraded, 40 newly installed, 0 to remove and 0 not upgraded.
    Need to get 35.5 MB of archives.
    After this operation, 97.3 MB of additional disk space will be used.
    

    Once all those libraries are installed, your pypi package will install correctly.

    PyPi is only for Python packages (and Python-specific dependencies for those packages). For any external requirements; you need to specify those in your install documentation or have them available on the system so that the install process can succeed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just made a transaction go through but not sure where there is a
I'm getting started with making few redirect with .htaccess but I just made something
I'm using TortoiseSVN. I just made quite a few changes to my working copy
Hello C++ and/or ROS Experts I just made a fresh install of Ubuntu 12.04
I'm very new to Python in general, but I made an app in Python
I am just starting to learn Python, but I have already run into some
I have made an online gallery using Python and Django. I've just started to
I made a stupid mistake (forgot semicolon, too much Python lately), but got an
I just learned python @ decorator, it's cool, but soon I found my modified
I have just made a script in Python which will connect to my MySQL

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.