Re: python error

Top Page
Attachments:
Message as email
+ (text/plain)
+ (text/html)
+ (text/plain)
Delete this message
Reply to this message
Author: Lisa Kachold
Date:  
To: Main PLUG discussion list
Subject: Re: python error
Whenever you edit a file from your editor, this file saves a backup.

On Fri, Mar 23, 2012 at 10:07 AM, Michael Havens <> wrote:

> I moved ~/.bashrc to ~/.bashrc-old and the error remains.
> hmmmmmm.... I just looked at my directory to verify that ~/.bashrc was
> moved and see a file called '.bashrc~'. the contents of which is what was
> in .bashrc:
>
>      more .bashrc~
>      [[ -s $HOME/.pythonbrew/etc/bashrc ]] && source $HOME/.pythonbrew
>           /etc/bashrc

>
> I wonder where that file came from!



Whenever you edit a file from your editor, this file saves a backup.

If that torques your engine, wait until you learn that the default
bash_profile and bashrc are usually in /etc/

First, What are all the files in your home directory? Make sure you are
not root....

>
>
> On Fri, Mar 23, 2012 at 5:27 AM, Lisa Kachold <>wrote:
>
>> No logout and back in and see if your error is gone.
>> On 22 Mar 2012 19:07, "Michael Havens" <> wrote:
>>
>>> now do you want me to add pythonbrew's bashrc file to mine after I make
>>> the old file??
>>>
>>> On Thu, Mar 22, 2012 at 3:47 PM, Lisa Kachold <>wrote:
>>>
>>>> Move the .bashrc to bashrc-old
>>>> On 22 Mar 2012 11:26, "Michael Havens" <> wrote:
>>>>
>>>>> Should I move its contents into ~/.basrc? NO! Put a link to
>>>>> /home/bmike1/.pythonbrew/etc/bashrc?
>>>>>
>>>>> $ more /home/bmike1/.pythonbrew/etc/bashrc
>>>>> # settings
>>>>> PATH_ROOT="$PYTHONBREW_ROOT"
>>>>> if [ -z "${PATH_ROOT}" ] ; then
>>>>>     PATH_ROOT="$HOME/.pythonbrew"
>>>>> fi
>>>>> PATH_ETC="$PATH_ROOT/etc"

>>>>>
>>>>> PATH_HOME="$PYTHONBREW_HOME"
>>>>> if [ -z "${PATH_HOME}" ] ; then
>>>>>     PATH_HOME="$HOME/.pythonbrew"
>>>>> fi
>>>>> PATH_HOME_ETC="$PATH_HOME/etc"

>>>>>
>>>>> # py file
>>>>> PY_PYTHONBREW="$PATH_ROOT/bin/pythonbrew"
>>>>>
>>>>> # functions
>>>>> __pythonbrew_set_default()
>>>>> {
>>>>>     PATH_PYTHONBREW="$PATH_ROOT/bin"
>>>>> }

>>>>>
>>>>> __pythonbrew_set_path()
>>>>> {
>>>>>     PATH_WITHOUT_PYTHONBREW=$(printf $PATH | awk -v RS=: -v ORS=:
>>>>> "/${PATH_ROOT/
>>>>> /\//\/}/ {next} {print}" | sed -e 's#:$##')
>>>>>     export PATH=$PATH_PYTHONBREW:$PATH_WITHOUT_PYTHONBREW
>>>>> }

>>>>>
>>>>> __pythonbrew_set_temp_path()
>>>>> {
>>>>>     if [[ -s "$PATH_HOME_ETC/temp" ]] ; then
>>>>>         source "$PATH_HOME_ETC/temp"
>>>>>         PATH_PYTHONBREW="$PATH_ROOT/bin:$PATH_PYTHONBREW_TEMP"
>>>>>     else
>>>>>         __pythonbrew_set_default
>>>>>     fi
>>>>>     __pythonbrew_set_path
>>>>> }

>>>>>
>>>>> __pythonbrew_set_current_path()
>>>>> {
>>>>>     if [[ -s "$PATH_HOME_ETC/current" ]] ; then
>>>>>         source "$PATH_HOME_ETC/current"
>>>>>         PATH_PYTHONBREW="$PATH_ROOT/bin:$PATH_PYTHONBREW_CURRENT"
>>>>>     else
>>>>>         __pythonbrew_set_default
>>>>>     fi
>>>>>     __pythonbrew_set_path
>>>>> }

>>>>>
>>>>> __pythonbrew_reload()
>>>>> {
>>>>>     [[ -s "$PATH_ETC/bashrc" ]] && source "$PATH_ETC/bashrc"
>>>>> }

>>>>>
>>>>> __pythonbrew_use()
>>>>> {
>>>>>     $pythonbrew "$@"
>>>>>     [[ $? == 0 ]] && __pythonbrew_set_temp_path
>>>>> }

>>>>>
>>>>> __pythonbrew_switch()
>>>>> {
>>>>>     $pythonbrew "$@"
>>>>>     [[ $? == 0 ]] && __pythonbrew_set_current_path
>>>>> }

>>>>>
>>>>> __pythonbrew_off()
>>>>> {
>>>>>     $pythonbrew "$@"
>>>>>     [[ $? == 0 ]] && __pythonbrew_set_current_path
>>>>> }

>>>>>
>>>>> __pythonbrew_update()
>>>>> {
>>>>>     $pythonbrew "$@"
>>>>>     [[ $? == 0 ]] && __pythonbrew_reload
>>>>> }

>>>>>
>>>>> __pythonbrew_venv()
>>>>> {
>>>>>     $pythonbrew "$@"
>>>>>     if [[ $? == 0 ]] ; then
>>>>>         if [[ -s "$PATH_HOME_ETC/venv.run" ]] ; then
>>>>>             source "$PATH_HOME_ETC/venv.run"
>>>>>             cat /dev/null > "$PATH_HOME_ETC/venv.run"
>>>>>         fi
>>>>>     fi
>>>>> }

>>>>>
>>>>> __pythonbrew_find_command()
>>>>> {
>>>>>     command_name=""
>>>>>     for arg in "$@" ; do
>>>>>         case $arg in
>>>>>             --*) continue;;
>>>>>             -*) continue;;
>>>>>             *)
>>>>>             command_name=$arg
>>>>>             break
>>>>>             ;;
>>>>>         esac
>>>>>     done
>>>>> }

>>>>>
>>>>> __pythonbrew_run()
>>>>> {
>>>>>     __pythonbrew_find_command "$@"
>>>>>     case $command_name in
>>>>>         use) __pythonbrew_use "$@";;
>>>>>         switch) __pythonbrew_switch "$@" ;;
>>>>>         off) __pythonbrew_off "$@" ;;
>>>>>         update) __pythonbrew_update "$@" ;;
>>>>>         venv) __pythonbrew_venv "$@" ;;
>>>>>         *) $pythonbrew "$@" ;;
>>>>>     esac
>>>>>     builtin hash -r
>>>>> }

>>>>>
>>>>> pythonbrew()
>>>>> {
>>>>>     pythonbrew=$PY_PYTHONBREW
>>>>>     __pythonbrew_run "$@"
>>>>> }

>>>>>
>>>>> pybrew()
>>>>> {
>>>>>     pythonbrew "$@"
>>>>> }

>>>>>
>>>>> sudopybrew()
>>>>> {
>>>>>     pythonbrew="sudo PYTHONBREW_ROOT=$PATH_ROOT
>>>>> PATH=$PATH_PYTHONBREW:$PATH_WITH
>>>>> OUT_PYTHONBREW $PY_PYTHONBREW"
>>>>>     __pythonbrew_run "$@"
>>>>> }

>>>>>
>>>>> # main
>>>>> __pythonbrew_set_current_path
>>>>> bmike1@Michaels-Laptop ~ $
>>>>>
>>>>>
>>>>> On Thu, Mar 22, 2012 at 4:59 AM, Lisa Kachold <
>>>>> > wrote:
>>>>>
>>>>>> What is in /home/bmike1/pythonbrew/etc/bashrc?
>>>>>>
>>>>>> On Thu, Mar 22, 2012 at 12:38 AM, Michael Havens <>wrote:
>>>>>>
>>>>>>> so should *I now *disablde pythonbrew?
>>>>>>>
>>>>>>>
>>>>>>> On Wed, Mar 21, 2012 at 2:03 PM, Michael Havens <>wrote:
>>>>>>>
>>>>>>>> > What is your complete /home/bmike1/.bashrc?
>>>>>>>>
>>>>>>>> there is one line in my .bashrc file. it is:
>>>>>>>>
>>>>>>>>
>>>>>>>> [[ -s $HOME/.pythonbrew/etc/bashrc ]] && source
>>>>>>>> $HOME/.pythonbrew/etc/bashrc
>>>>>>>>
>>>>>>>> that is all that the file has in it.
>>>>>>>>
>>>>>>>>
>>>>>>>> >>
>>>>>>>> >> This is weird; look at what happened in the shell:
>>>>>>>>
>>>>>>>> >> bmike1@Michaels-Laptop ~ $ sudo su
>>>>>>>> >> [sudo] password for bmike1:
>>>>>>>> >> Traceback (most recent call last):
>>>>>>>>
>>>>>>>> > This is the known python virtualenv error (that we tried to fix
>>>>>>>> with
>>>>>>>> > pythonbrew:
>>>>>>>> >
>>>>>>>> That isn't what was weird..... weird thing is it tried to mkdir
>>>>>>>> when I 'su bmike1'.
>>>>>>>>
>>>>>>>>
>>>>>>>>  bmike1@Michaels-Laptop ~ $  sudo su
>>>>>>>>  [sudo] password for bmike1:
>>>>>>>>  Traceback (most recent call last):
>>>>>>>>    File "<string>", line 1, in <module>
>>>>>>>>  ImportError: No module named virtualenvwrapper.hook_loader
>>>>>>>>  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=/usr
>>>>>>>>  /bin/python and that PATH is  set properly.
>>>>>>>>  Michaels-Laptop bmike1 # nano ~/.bashrc
>>>>>>>>  Michaels-Laptop bmike1 # su bmike1
>>>>>>>>   mkdir: cannot create directory `/root': Permission denied
>>>>>>>>  bmike1@Michaels-Laptop ~ $ nano ~/.bashrc

>>>>>>>>
>>>>>>>> > Did you also make sure that that
>>>>>>>> /home/bmike1/.pythonbrew/etc/venv.run
>>>>>>>> > exists and is writable?
>>>>>>>> >
>>>>>>>> > $ ls -al /home/bmike1/.pythonbrew/etc/venv.run
>>>>>>>> > $ chmod ug+ /home/bmike1/.pythonbrew/etc/venv.run
>>>>>>>> >
>>>>>>>> It is there.
>>>>>>>>
>>>>>>>> >> What do you mean?
>>>>>>>> >
>>>>>>>> >
>>>>>>>> > After each TEST or change of files, you would logout and log back
>>>>>>>> in -
>>>>>>>> > completely to see if your shell python error was fixed?
>>>>>>>> >
>>>>>>>> REally? No, that isn't something I've been doing. Thanks for
>>>>>>>> tellikng me.
>>>>>>>> ....<logout>
>>>>>>>> ....<login>
>>>>>>>> Nope still get the error.
>>>>>>>> Is it cool to login/out from tty (I don't want to lose all of the
>>>>>>>> stuff on my desktop).
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> :-)~MIKE~(-:
>>>>>>>
>>>>>>> ---------------------------------------------------
>>>>>>> PLUG-discuss mailing list -
>>>>>>> To subscribe, unsubscribe, or to change your mail settings:
>>>>>>> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> (503) 754-4452 Android
>>>>>> (623) 239-3392 Skype
>>>>>> (623) 688-3392 Google Voice
>>>>>> **
>>>>>> it-clowns.com
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------
>>>>>> PLUG-discuss mailing list -
>>>>>> To subscribe, unsubscribe, or to change your mail settings:
>>>>>> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> :-)~MIKE~(-:
>>>>>
>>>>> ---------------------------------------------------
>>>>> PLUG-discuss mailing list -
>>>>> To subscribe, unsubscribe, or to change your mail settings:
>>>>> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>>>>>
>>>>
>>>> ---------------------------------------------------
>>>> PLUG-discuss mailing list -
>>>> To subscribe, unsubscribe, or to change your mail settings:
>>>> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>>>>
>>>
>>>
>>>
>>> --
>>> :-)~MIKE~(-:
>>>
>>> ---------------------------------------------------
>>> PLUG-discuss mailing list -
>>> To subscribe, unsubscribe, or to change your mail settings:
>>> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>>>
>>
>> ---------------------------------------------------
>> PLUG-discuss mailing list -
>> To subscribe, unsubscribe, or to change your mail settings:
>> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>>
>
>
>
> --
> :-)~MIKE~(-:
>
> ---------------------------------------------------
> PLUG-discuss mailing list -
> To subscribe, unsubscribe, or to change your mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>




--
(503) 754-4452 Android
(623) 239-3392 Skype
(623) 688-3392 Google Voice
**
it-clowns.com
---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss