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 7439173
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:40:04+00:00 2026-05-29T10:40:04+00:00

I have two packages that install different packages with the same name. They are

  • 0

I have two packages that install different packages with the same name. They are both “packages” in that they have top-level setup.py files which specify package=['foo'] in the setup command.

If I install using distutils.core, the last to be installed overwrites the previous one (but I think wouldn’t overwrite unless the .py files all had the same names?). If I install using setuptools, the two packages get installed into different eggs.

One option would be to explicitly set sys.path before importing the package name; this seems “un-pythonic” and rather dirty.

Assuming I have these two identically named packages installed in different eggs from setuptools, how do I specify which is imported?

  • 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-05-29T10:40:05+00:00Added an answer on May 29, 2026 at 10:40 am

    Setuptools guide mentions –multi-version (-m) switch that removes package from sys.path completely. You have to use pkg_resources.require(‘package==version’) in your code as early as possible to let it fix sys.path. This advice is what easy_install always prints when one uses -m.

    But you can’t have both imported at once (unless they’re designed to do so using namespace packages).

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

Sidebar

Related Questions

I have a msi package that have option to install two different languages ,
I have an Android Library (e.g. libA) that is referenced by two packages, com.siteA.appA
I have a Django project that I need mounted at two different subdirectories of
I'd like to be able to have two protected classes in my package. That
I am evaluating datamining packages. I have find these two so far: RapidMiner Weka
Have two folders with approx. 150 java property files. In a shell script, how
I have two applications written in Java that communicate with each other using XML
I have two arrays of System.Data.DataRow objects which I want to compare. The rows
I have two different application 1. databaseSetup Application -- database.apk 2. Sales Application --
I have a library called example that I'm installing into my global site-packages directory.

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.