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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:17:31+00:00 2026-05-27T03:17:31+00:00

I have in my python workspace two Modules which need sip.pyd Module1.pyd needs sip.pyd

  • 0

I have in my python workspace two Modules which need sip.pyd
Module1.pyd needs sip.pyd (which implements v 8.0-8.1)
Module2.pyd needs sip.pyd (another file, that implements v6.0)

So I can’t just choose the newer one, it doesn’t work: I have to keep them both!

(RuntimeError: the sip module implements API v6.0 but the fbx module requires API v8.1)

How can I import a module in .pyd extension (a python dll, not editable), and specify which sip.pyd to source?

As for a workaround, I manage to do that:

  1. One sip.pyd is in my root site-packages location.
  2. If I have to import the module that need the other sip.pyd, I remove root path form sys.path, and I append the precise folder path where the other sip.pyd are.
  3. I can import my Module and restore previous sys.path.
  • 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-27T03:17:31+00:00Added an answer on May 27, 2026 at 3:17 am

    Assuming you don’t have a piece of code needing both files at once. I’d recommend the following:

    • install both files in 2 separate directories (call them e.g. sip-6.0 and sip-8.0), that you’ll place in site-packages/

    • write a sip_helper.py file with code looking like

    sip_helper.py contents:

    import sys
    import re
    from os.path import join, dirname
    def install_sip(version='6.0'):
        assert version in ('6.0', '8.0'), "unsupported version"
        keep = []
        if 'sip' in sys.modules:
           del sys.modules['sip']
        for path in sys.path:
            if not re.match('.*sip\d\.\d', path):
                keep.append(path)
        sys.path[:] = keep # remove other paths
        sys.path.append(join(dirname(__file__), 'sip-%s' % version))
    
    • put sip_helper.py in site_packages (the parent directory of the sip-6.0 and sip-8.0 directories)
    • call sip_helper.install_sip at the startup of your programs
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have Python classes, of which I need only one instance at runtime, so
I have a shell script, thus: export PYTHONPATH=/usr/local/lib/python cd /home/skip/workspace/UAM for file in *.txt
Lets say I have my workspace (on Eclipse) where I develop my Python modules
I have the following code, which has the following two problems: Traceback (most recent
I need to query a Mysql database with Python. I have virtual env installed
I'm fairly new to python. I have an error that I need to understand.
i have python web app build on top of BaseHTTPServer, which runs on specyfic
I have Python 2.6 and I want to install easy _ install module. The
If I have Python code class A(): pass class B(): pass class C(A, B):
Is it possible to have Python save the .pyc files to a separate folder

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.