*Did all that just now:*
alan@alan:~$ sudo uninstall virtualenvwrapper
[sudo] password for alan:
sudo: uninstall: command not found
alan@alan:~$ sudo pip uninstall virtualenvwrapper
Uninstalling virtualenvwrapper:
/usr/local/bin/virtualenvwrapper.sh
/usr/local/bin/virtualenvwrapper_lazy.sh
/usr/local/lib/python2.7/dist-packages/virtualenvwrapper-3.5-nspkg.pth
/usr/local/lib/python2.7/dist-packages/virtualenvwrapper-3.5.egg-info
/usr/local/lib/python2.7/dist-packages/virtualenvwrapper/hook_loader.py
/usr/local/lib/python2.7/dist-packages/virtualenvwrapper/hook_loader.pyc
/usr/local/lib/python2.7/dist-packages/virtualenvwrapper/project.py
/usr/local/lib/python2.7/dist-packages/virtualenvwrapper/project.pyc
/usr/local/lib/python2.7/dist-packages/virtualenvwrapper/user_scripts.py
/usr/local/lib/python2.7/dist-packages/virtualenvwrapper/user_scripts.pyc
Proceed (y/n)? y
Successfully uninstalled virtualenvwrapper
alan@alan:~$ sudo pip uninstall virtualenv
Uninstalling virtualenv:
/usr/local/bin/virtualenv
/usr/local/bin/virtualenv-2.7
/usr/local/lib/python2.7/dist-packages/virtualenv-1.7.2.egg-info
/usr/local/lib/python2.7/dist-packages/virtualenv.py
/usr/local/lib/python2.7/dist-packages/virtualenv.pyc
/usr/local/lib/python2.7/dist-packages/virtualenv_support
Proceed (y/n)? y
Successfully uninstalled virtualenv
alan@alan:~$ rm /home/alan/python/virtualenvs/py273ucs2/ -Rf
alan@alan:~$ ls -l /home/alan/python/virtualenvs/
total 72
-rwxrwxr-x 1 alan alan 106 2012-07-08 11:34 get_env_details
-rw-rw-r-- 1 alan alan 1828 2012-07-10 09:31 hook.log
-rw-rw-r-- 1 alan alan 10206 2012-07-09 16:10 hook.log.1
-rwxrwxr-x 1 alan alan 92 2012-07-08 11:34 initialize
-rwxrwxr-x 1 alan alan 69 2012-07-08 11:34 postactivate
-rwxrwxr-x 1 alan alan 71 2012-07-08 11:34 postdeactivate
-rwxrwxr-x 1 alan alan 66 2012-07-08 11:34 postmkproject
-rwxrwxr-x 1 alan alan 69 2012-07-08 11:34 postmkvirtualenv
-rwxrwxr-x 1 alan alan 60 2012-07-08 11:34 postrmproject
-rwxrwxr-x 1 alan alan 63 2012-07-08 11:34 postrmvirtualenv
-rwxrwxr-x 1 alan alan 70 2012-07-08 11:34 preactivate
-rwxrwxr-x 1 alan alan 72 2012-07-08 11:34 predeactivate
-rwxrwxr-x 1 alan alan 91 2012-07-08 11:34 premkproject
-rwxrwxr-x 1 alan alan 94 2012-07-08 11:34 premkvirtualenv
-rwxrwxr-x 1 alan alan 61 2012-07-08 11:34 prermproject
-rwxrwxr-x 1 alan alan 64 2012-07-08 11:34 prermvirtualenv
alan@alan:~$ sudo pip install virtualenv
Downloading/unpacking virtualenv
Downloading virtualenv-1.7.2.tar.gz (2.2Mb): 2.2Mb downloaded
Running setup.py egg_info for package virtualenv
warning: no previously-included files matching '*' found under
directory 'docs/_templates'
warning: no previously-included files matching '*' found under
directory 'docs/_build'
Installing collected packages: virtualenv
Running setup.py install for virtualenv
warning: no previously-included files matching '*' found under
directory 'docs/_templates'
warning: no previously-included files matching '*' found under
directory 'docs/_build'
Installing virtualenv script to /usr/local/bin
Installing virtualenv-2.7 script to /usr/local/bin
Successfully installed virtualenv
Cleaning up...
alan@alan:~$ sudo pip install virtualenv
Requirement already satisfied (use --upgrade to upgrade): virtualenv in
/usr/local/lib/python2.7/dist-packages
Cleaning up...
alan@alan:~$ sudo pip install virtualenvwrapper
Downloading/unpacking virtualenvwrapper
Downloading virtualenvwrapper-3.5.tar.gz (465Kb): 465Kb downloaded
Running setup.py egg_info for package virtualenvwrapper
Requirement already satisfied (use --upgrade to upgrade): virtualenv in
/usr/local/lib/python2.7/dist-packages (from virtualenvwrapper)
Requirement already satisfied (use --upgrade to upgrade): virtualenv-clone
in /usr/local/lib/python2.7/dist-packages (from virtualenvwrapper)
Installing collected packages: virtualenvwrapper
Running setup.py install for virtualenvwrapper
changing mode of build/scripts-2.7/virtualenvwrapper.sh from 644 to 755
changing mode of build/scripts-2.7/virtualenvwrapper_lazy.sh from 644
to 755
Skipping installation of
/usr/local/lib/python2.7/dist-packages/virtualenvwrapper/__init__.py
(namespace package)
Installing
/usr/local/lib/python2.7/dist-packages/virtualenvwrapper-3.5-nspkg.pth
changing mode of /usr/local/bin/virtualenvwrapper_lazy.sh to 755
changing mode of /usr/local/bin/virtualenvwrapper.sh to 755
Successfully installed virtualenvwrapper
Cleaning up...
alan@alan:~$
*Then i added this to .bashrc*
export WORKON_HOME=/home/alan/python/virtualenvs
source /usr/local/bin/virtualenvwrapper.sh
export PIP_VIRTUALENV_BASE=$WORKON_HOME
export PIP_RESPECT_VIRTUALENV=true
*opened new shell and then:*
alan@alan:~$ mkvirtualenv --no-site-packages --python=/opt/bin/python
py273ucs2
Running virtualenv with interpreter /opt/bin/python
The --no-site-packages flag is deprecated; it is now the default behavior.
New python executable in py273ucs2/bin/python
Installing setuptools............done.
Installing pip...............done.
virtualenvwrapper.user_scripts creating
/home/alan/python/virtualenvs/py273ucs2/bin/predeactivate
virtualenvwrapper.user_scripts creating
/home/alan/python/virtualenvs/py273ucs2/bin/postdeactivate
virtualenvwrapper.user_scripts creating
/home/alan/python/virtualenvs/py273ucs2/bin/preactivate
virtualenvwrapper.user_scripts creating
/home/alan/python/virtualenvs/py273ucs2/bin/postactivate
virtualenvwrapper.user_scripts creating
/home/alan/python/virtualenvs/py273ucs2/bin/get_env_details
(py273ucs2)alan@alan:~$ python
Python 2.7.3 (default, Jul 9 2012, 13:32:29)
[GCC 4.6.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
If i restart apache and go to localhost then i still get wrong python
version (2.7.2) in view. when i activate virtualenv and start django using
./manage.py runserver, then i get correct (2.7.3) python version
And there are no visible errors anywhere. Not in apache error.log at least.
when i restart apahce i get only this in error.log:
[Tue Jul 10 13:57:00 2012] [notice] caught SIGTERM, shutting down
[Tue Jul 10 13:57:01 2012] [notice] suEXEC mechanism enabled (wrapper:
/usr/lib/apache2/suexec)
PHP Deprecated: Comments starting with '#' are deprecated in
/etc/php5/apache2/conf.d/ming.ini on line 1 in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library
'/usr/lib/php5/20090626/idn.so' - /usr/lib/php5/20090626/idn.so: cannot
open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library
'/usr/lib/php5/20090626/sqlite.so' - /usr/lib/php5/20090626/sqlite.so:
cannot open shared object file: No such file or directory in Unknown on
line 0
[Tue Jul 10 13:57:01 2012] [notice] mod_python: Creating 8 session mutexes
based on 150 max processes and 0 max threads.
[Tue Jul 10 13:57:01 2012] [notice] mod_python: using mutex_directory /tmp
[Tue Jul 10 13:57:01 2012] [warn] mod_wsgi: Compiled for Python/2.7.3.
[Tue Jul 10 13:57:01 2012] [warn] mod_wsgi: Runtime using Python/2.7.2+.
[Tue Jul 10 13:57:01 2012] [notice] Apache/2.2.20 (Ubuntu) DAV/2
PHP/5.3.6-13ubuntu3.7 with Suhosin-Patch mod_python/3.3.1 Python/2.7.2+
mod_ruby/1.2.6 Ruby/1.8.7(2011-06-30) mod_ssl/2.2.20 OpenSSL/1.0.0e
mod_wsgi/3.3 configured -- resuming normal operations
Alan
On Tuesday, July 10, 2012 1:06:35 PM UTC+3, Graham Dumpleton wrote:
>
> What is the current problem after fixing Python and mod_wsgi
> installations?
>
> Did you ensure you recreated your virtual environments using the newly
> installed Python?
>
> Send the latest errors you get.
>
> Graham
>
--
You received this message because you are subscribed to the Google Groups
"modwsgi" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/modwsgi/-/ZUbBa4SMj7MJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/modwsgi?hl=en.