From:  Bill Lovett <bill@ilovett.com>
Date:  10 Mar 2011 12:40:47 Hong Kong Time
Newsgroup:  news.mozilla.org/mozilla.drumbeat.website
Subject:  

Re: Trying to install Batucada / Virtual environment configuration difficulties

NNTP-Posting-Host:  63.245.208.166


Regarding uninstall: maybe not.

You're running Python 2.7; that's interesting. I bet it's the reason
we're having different experiences despite being on the same OS. If
you do:

$ python --version
$ sudo python --version

do you get the same output both times?

Also, where is virtualenvwraper installed? Is it under
/Library/Python/2.6/site-packages/virtualenvwrapper or perhaps
/Library/Python/2.7/site-packages/virtualenvwrapper?

It's just a guess, but I'm thinking that your user account is set up
to use Python 2.7, but when you sudo easy_installed the system default
python was used and the package files went under its include path
rather than the include path for 2.7.

If you do a man python you can ready more about this under the section
"Changing the default Python".


On Wed, Mar 09, 2011 at 02:50:16PM -0800, Taboca wrote:
> I am in Mac OS X. I already installed, via sudo, following the
> instructions here: https://github.com/paulosman/batucada
>
> Now when I execute /usr/local/bin/virtualenvwrapper.sh in a fresh
> shell then I get
>
> 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=/Library/Frameworks/
> Python.framework/Versions/2.7/bin/python and that PATH is set
> properly.
>
> Thanks for helping. Maybe pushing some specific OS cases to the doc
> would also be cool. Do I have to uninstall things now to restart the
> whole thing again?
>
> m
>
> On Mar 6, 7:03 pm, Bill Lovett  wrote:
> > I'm not positive, but it might be a permissions problem related to
> > installation via sudo. If your system's package manager provides pip
> > and virtualenvwrapper, it might be preferable to use those rather than
> > going through easy_install. If not, here's some more detail of what my
> > system (OS X) looked like after setting up virtualenv. Comparing it to
> > what you've got might narrow down the nature of the problem.
> >
> > For what it's worth, I didn't need to use sudo when I installed pip or
> > virtualenvwrapper.
> >
> > After I source /usr/local/bin/virtualenvwrapper.sh, I got this output:
> >
> > $ source /usr/local/bin/virtualenvwrapper.sh virtualenvwrapper.user_scripts creating
> > ~/.virtualenvs/initialize virtualenvwrapper.user_scripts creating
> > ~/.virtualenvs/premkvirtualenv virtualenvwrapper.user_scripts creating
> > ~/.virtualenvs/postmkvirtualenv virtualenvwrapper.user_scripts creating
> > ~/.virtualenvs/prermvirtualenv virtualenvwrapper.user_scripts creating
> > ~/.virtualenvs/postrmvirtualenv virtualenvwrapper.user_scripts creating
> > ~/.virtualenvs/predeactivate virtualenvwrapper.user_scripts creating
> > ~/.virtualenvs/postdeactivate virtualenvwrapper.user_scripts creating
> > ~/.virtualenvs/preactivate virtualenvwrapper.user_scripts creating
> > ~/.virtualenvs/postactivate virtualenvwrapper.user_scripts creating
> > ~/.virtualenvs/get_env_details
> >
> > $ ls -l .virtualenvs/
> > total 88
> > -rwxrwxr-x  1 blovett  staff   106 Mar  6 16:33 get_env_details
> > -rw-r--r--  1 blovett  staff  1433 Mar  6 16:33 hook.log
> > -rwxrwxr-x  1 blovett  staff    92 Mar  6 16:33 initialize
> > -rwxrwxr-x  1 blovett  staff    69 Mar  6 16:33 postactivate
> > -rwxrwxr-x  1 blovett  staff    71 Mar  6 16:33 postdeactivate
> > -rwxrwxr-x  1 blovett  staff    69 Mar  6 16:33 postmkvirtualenv
> > -rwxrwxr-x  1 blovett  staff    63 Mar  6 16:33 postrmvirtualenv
> > -rwxrwxr-x  1 blovett  staff    70 Mar  6 16:33 preactivate
> > -rwxrwxr-x  1 blovett  staff    72 Mar  6 16:33 predeactivate
> > -rwxrwxr-x  1 blovett  staff    94 Mar  6 16:33 premkvirtualenv
> > -rwxrwxr-x  1 blovett  staff    64 Mar  6 16:33 prermvirtualenv
> >
> > Then with $WORKON_HOME set:
> >
> > $ mkvirtualenv --no-site-packages test
> > New python executable in test/bin/python
> > Installing setuptools............done.
> > virtualenvwrapper.user_scripts creating ~/.virtualenvs/test/bin/predeactivate
> > virtualenvwrapper.user_scripts creating ~/.virtualenvs/test/bin/postdeactivate
> > virtualenvwrapper.user_scripts creating ~/.virtualenvs/test/bin/preactivate
> > virtualenvwrapper.user_scripts creating ~/.virtualenvs/test/bin/postactivate
> > virtualenvwrapper.user_scripts creating ~/.virtualenvs/test/bin/get_env_details
> >
> > Lastly, here's what the permissions look like on the virtualenvwrapper
> > source files:
> >
> > $ ls -l /Library/Python/2.6/site-packages/virtualenvwrapper
> > total 64
> > -rw-r--r--  1 blovett  admin  4798 Mar  6 16:32 hook_loader.py
> > -rw-r--r--  1 blovett  admin  3884 Mar  6 16:32 hook_loader.pyc
> > -rw-r--r--  1 blovett  admin  6234 Mar  6 16:32 user_scripts.py
> > -rw-r--r--  1 blovett  admin  9295 Mar  6 16:32 user_scripts.pyc
> >
> > Some of these paths may be different depending on your OS, but hopefully it
> > can give you some clues. If you're on Ubuntu, this forum post might be
> > helpful:
> >
> > http://ubuntuforums.org/showthread.php?t=1571347
> >
> > If you post what OS you're using, that might help narrow things down as well.
> >
> >
> >
> >
> >
> >
> >
> > On Sun, Mar 06, 2011 at 01:09:10PM -0800, tabmarcio wrote:
> > > I found a problem when trying to install batucada using the project
> > > instructions
> >
> > > What I did was:
> >
> > > 1)https://github.com/paulosman/batucada
> > > 2) Then moved to follow the documentation onhttp://www.doughellmann.com
> > > /docs/virtualenvwrapper/
> > > 3) then continued the instructions and it claimed that my
> > > username/.virtualenvs does not exist
> >
> > > I tried to mkdir this directory and does not help. Not sure if mydir
> > > was correct. Basically the commends I did:
> >
> > >   506  git clone git://github.com/paulosman/batucada.git
> > >   507  sudo easy_install virtualenv
> > >   508  sudo easy_install pip
> > >   515  sudo pip install virtualenvwrapper ( while the actual docs says
> > > pip install, so in fact I had to uninstall and install again with
> > > sudo )
> > >   528  export WORKON_HOME=$HOME/.virtualenvs
> > >   529  export PIP_VIRTUALENV_BASE=$WORKON_HOME
> > >   530  export PIP_RESPECT_VIRTUALENV=true
> > >   531  source /usr/local/bin/virtualenvwrapper.sh
> > >   539  mkvirtualenv --no-site-packages batucada
> >
> > > Error - does not exist ~marciogalli/.virtualenvs
> >
> > > After mkdir ~marciogalli/.virtualenvs
> >
> > > then
> >
> > >  mkvirtualenv --no-site-packages batucada
> >
> > > And results
> >
> > > New python executable in batucada/bin/python
> > > Installing setuptools.............done.
> > > Traceback (most recent call last):
> > >   File "", line 1, in 
> > > ImportError: No module named virtualenvwrapper.hook_loader
> >
> > > _______________________________________________
> > > drumbeat-website mailing list
> > > drumbeat-webs...@lists.mozilla.org
> > >https://lists.mozilla.org/listinfo/drumbeat-website
>
> _______________________________________________
> drumbeat-website mailing list
> drumbeat-website@lists.mozilla.org
> https://lists.mozilla.org/listinfo/drumbeat-website
>