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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:42:24+00:00 2026-05-23T13:42:24+00:00

I need to use python on a big server where I don’t have root

  • 0

I need to use python on a big server where I don’t have root access. I want to use a newer version of numpy than the one that is installed globally on the machine. virtualenv is designed exactly for this purpose, and I create my virtual environment and activate it with the following commands:

virtualenv my_personal_python
source my_personal_python/bin/activate

I then install the new version of the library that I’m interested in using

pip install numpy==1.6.0

The problem is that when I now import numpy it still imports the outdated global version, not the one install in the virtual environment’s my_personal_python/lib/python2.6/site-packacges directory.

I am already aware of one possible solution, the –no-site-packages flag, as in:

virtualenv --no-site-packages my_personal_python

When I use this flag then the import behaves as I desire. But I don’t want to use this flag because I do not want to re-install all packages locally, I just want to override a couple of them.

(I’m using python 2.6, virtualenv 1.6.1, and the PYTHONPATH variable on my machine is not set.)

Update Even if I add the site-packages directory from the virtual environment to the beginning of the python path, numpy does not get imported from this location (although other packages are imported from this location). Maybe this problem is specific to numpy and does not occur with packages in general.

  • 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-23T13:42:25+00:00Added an answer on May 23, 2026 at 1:42 pm

    Double check a few things.

    which python

    which pip

    Now that you are sure you are running the right one, start python and:

    import sys
    print "\n".join(sys.path)
    

    Then exit python and type echo $PATH followed by echo $PYTHONPATH
    I suspect that the problem will be visible and if you cannot fix it by setting PYTHONPATH then you can likely do it with the site module.

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

Sidebar

Related Questions

I need to use Python because: I have implemented many scripts and libraries using
I want to use Numpy with Python 3.2 and it won't work; it says
I need to use a priority queue in my Python code, and: am looking
We need a mailing list package similar to Python Mailman . I'd use Mailman
For the last few days, I have been trying to use Python for some
SMALL VERSION OF THE QUESTION : I need a lib for python or program
Possible Duplicate: What IDE to use for Python? I want to get serious with
I need to use bash to insert a line into a python file. This
I need to use sed to convert all occurences of ##XXX## to ${XXX} .
I need to use an alias in the WHERE clause, but It keeps telling

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.