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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T12:19:36+00:00 2026-06-14T12:19:36+00:00

My system(ubuntu) has python 2.6.5 version (globally installed in /usr/bin/). I want to use

  • 0

My system(ubuntu) has python 2.6.5 version (globally installed in /usr/bin/).
I want to use python 2.7.3 .
For this, I tried creating a virtualenv using this answer Is it possible to install another version of Python to Virtualenv? (didnt do any simlinking from answers) . I succeeded in this and when I activated env and used ‘python manage.py shell’ it worked great .

Problem is :
We use uwsgi for running server . Till now, we are directly using the system wide python(2.6.5) . As I have installed everything newly in a virtualenv, I added the option

'-H /path/to/virtualenv' 

while running the uwsgi server.

I got the error “no module named ‘os’ ” while executing line “import os” . (Found error from error logs)

So, I added import sys; print sys.path commands before the command ‘import os’ . Then,
when it printed the path, it had something like :

 /home/name/venv/bin/python/lib/python2.6/  #(one of the items in the array sys.path)

But, when I looked at my venv folder, there is nothing like python2.6 in the ‘lib’ folder.
,My lib folder of venv contains only ‘python2.7’ .

My requirement is, uwsgi should use python 2.7(of venv) , not 2.6 (global).

Also, in my sh file, I used command ‘which python’ which showed me that it is using global version. So, I have to tell the shell file first to use python from the virtualenv, not the default global one. I tried ‘source /path/to/activate’ but said command not found.

  • 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-14T12:19:38+00:00Added an answer on June 14, 2026 at 12:19 pm
    1. Activate virtualenv,
    2. Install uwsgi: pip install uwsgi
    3. Run uwsgi from the virtualenv.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to use mexopencv on my system which has: Ubuntu 12.04.1 LTS
I use ubuntu 10.04 LTS 64bit and my system has 4 GB RAM. I
I am using Ubuntu 10.04 LTS version which has Firefox 3.6.3 version installed. I
I have this problem: System A runs Ubuntu and needs Python 2.6 for a
I´ve got a nomral user called Teacher in my Ubuntu system and it has
my system is Ubuntu 10 here is my code: #!/bin/bash pid = `ps -ef
My system is Ubuntu 11.10. I've been following this guide somewhat: http://www.ozbotz.org/opencv-installation/ I also
I have installed KVM on my Ubuntu system. Using vmbuilder , I setup a
The development machine I work on has Ubuntu Jaunty Jackalope as its operating system.
i need to run some old python programs on a ubuntu 10.04 system. it

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.