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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T01:32:13+00:00 2026-06-02T01:32:13+00:00

On arch linux, after install virtualenvwrapper system-wide, via sudo pip2 install virtualenvwrapper and adding

  • 0

On arch linux, after install virtualenvwrapper system-wide, via sudo pip2 install virtualenvwrapper and adding this in my user’s .bash_profile,

 export WORKON_HOME=/home/myuser/.virtualenvs
 export PROJECT_HOME=/home/myuser/work
 source /usr/bin/virtualenvwrapper.sh

An error shows up whenever I launch a new shell window:-

which: no python in (/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/bin/core_perl)
-bash: : command not found
virtualenvwrapper.sh: There was a problem running the initialization hooks. If Python could not import the module virtualenvwrapper.hook_loader, check that virtualenv has been installed for VIRTUALENVWRAPPER_PYTHON= and that PATH is set properly.

This can be traced to line 50 in the virtualenvwrapper.sh script:-

 47 # Locate the global Python where virtualenvwrapper is installed. 
 48 if [ "$VIRTUALENVWRAPPER_PYTHON" = "" ] 
 49 then 
 50     VIRTUALENVWRAPPER_PYTHON="$(\which python)" 
 51 fi 

And is a result of the conflict with arch linux’s convention of using python2 for python 2.7 installation.

If I modify line 50 to which python2, everything works perfectly and I will not see the error message whenever I launch a new shell.

What is the appropriate way of resolving this problem? Do I write an explicit check that the current OS is arch linux and introduce an if-else condition to use which python2 in virtualenvwrapper.sh and send the patch to the virtualenvwrapper author? Or is there something I can do with my configuration in my arch linux machine?

  • 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-02T01:32:15+00:00Added an answer on June 2, 2026 at 1:32 am

    To answer this arch-specific python quirk (the convention of using python2), I specifically create a soft link like this:-

    ln -s /usr/bin/python2 /usr/local/bin/python
    

    Since /usr/local/bin precedes /usr/bin in the bash system PATH environment variable, when I type python, or when the virtualenvwrapper.sh script refers to which python in line 50, we will no longer run into the above mentioned virtualenvwrapper conflict and everything works as expected.

    The disadvantage of doing this is that it might mess up the “python 3” (being considered as the default python command) conventions arch linux is designed for. So care has to be taken that I do not use python 3 related libraries or package installations relating to python 3 in my target box.

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

Sidebar

Related Questions

I'm using Arch Linux (Rolling Release Distro) and after the system upgrade I'm not
Recently I've migrated to Arch Linux, after ~4 years being loyal to Ubuntu. Everything
I want to install VMware tools on Arch Linux, but when I click to
I hope someone can help me with this :) I am running Arch Linux
I just installed Xampp on my Arch Linux system. What i want to do
I'm using Python 3.2.1 in Arch Linux x86_64. This one is really driving me
Apache HTTP Server 2.2.21 with VirtualHosts under SuExec PHP 5.3.8 via fcgid Arch Linux
I am using Arch linux and I need to create virtual serial port on
On my Arch Linux, Eclipse with Google Window Builder/SWT application, I am getting Exception
I can't init lua correctly under Arch Linux. Lua - latest version. Here 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.