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

  • Home
  • SEARCH
  • 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 9302743
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T23:19:28+00:00 2026-06-18T23:19:28+00:00

I have an installation of Python 2.7.0 in a virtualenv in /local/gerrit/python2.7 . I’d

  • 0

I have an installation of Python 2.7.0 in a virtualenv in /local/gerrit/python2.7. I’d like to upgrade this to Python 2.7.3. I’m trying to use pip for this, but somehow it seems to be confused between python2 and python3:

$ pip install --upgrade 'python>=2.7,<2.7.99'
Downloading/unpacking python>=2.7,<2.7.99 from http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tar.bz2
  Running setup.py egg_info for package python
    Traceback (most recent call last):
      File "<string>", line 16, in <module>
      File "/local/gerrit/python2.7/build/python/setup.py", line 1804
        exec(f.read(), globals(), fficonfig)
    SyntaxError: unqualified exec is not allowed in function 'configure_ctypes' it contains a nested function with free variables
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 16, in <module>

  File "/local/gerrit/python2.7/build/python/setup.py", line 1804

    exec(f.read(), globals(), fficonfig)

SyntaxError: unqualified exec is not allowed in function 'configure_ctypes' it contains a nested function with free variables

----------------------------------------
Command python setup.py egg_info failed with error code 1 in /local/gerrit/python2.7/build/python
Storing complete log in /storage4/home/gerrit/.pip/pip.log

It looks like /local/gerrit/python2.7/build/python/setup.py actually has a python3 syntax, and something got messed up. Is my diagnosis correct? How do I clean this up in a way that doesn’t require reinstalling Python and all its libraries?

  • 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-18T23:19:29+00:00Added an answer on June 18, 2026 at 11:19 pm

    You will likely need to use something like pythonz which manages multiple python installation on the same machine.

    Then when you are using things like virtualenv you will want to point them at the binary that you installed like so and you will have a working virtualenv with that specific copy of python

    virtualenv -p /path/to/python

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

Sidebar

Related Questions

I've used homebrew to install python on a new Mac Lion installation, and have
I have an existing python3 installation in Windows, but things aren't really configured right.
I have a wordpress installation I'd like to get rid off. It's been constant
This code used to work on Vista (and Windows XP) but after an upgrade
We have a common python installation for all of our systems in order to
I installed Yahoo BOSS (it's a Python installation that allows you to use their
I have managed to set up the python interpreter of my pydev installation to
I have an installation script written in Python (in Linux) that runs as root
I have installed Python 2.6.7 in $HOME/local of a machine which already has a
I have two python installation. One is installed in default location and other is

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.