Opened 10 years ago
Closed 5 years ago
#972 closed defect (fixed)
Upgrade system python
Reported by: | Elinvention | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | documentation | Keywords: | virtualenv, python, system update, bitesized |
Cc: | Parent Tickets: |
Description
After a system python upgrade, Mediagoblin won't be able to start any more because the local virtualenv python will still look for the old python modules (if I understood correctly). Mediagoblin will output errors like this and refuse to start:
Traceback (most recent call last): File "./bin/gmg", line 9, in <module> load_entry_point('mediagoblin==0.7.1.dev', 'console_scripts', 'gmg')() File "/var/mediagoblin/mediagoblin/gmg_commands/__init__.py", line 108, in main_cli setup_func = import_component(command_struct['setup']) File "/var/mediagoblin/mediagoblin/tools/common.py", line 34, in import_component __import__(module_name) File "/var/mediagoblin/mediagoblin/gmg_commands/shell.py", line 21, in <module> from mediagoblin.gmg_commands import util as commands_util File "/var/mediagoblin/mediagoblin/gmg_commands/util.py", line 18, in <module> from mediagoblin import app File "/var/mediagoblin/mediagoblin/app.py", line 20, in <module> from mediagoblin.routing import get_url_map File "/var/mediagoblin/mediagoblin/routing.py", line 19, in <module> from mediagoblin.tools.routing import add_route, mount, url_map File "/var/mediagoblin/mediagoblin/tools/routing.py", line 20, in <module> from werkzeug.routing import Map, Rule File "/var/mediagoblin/local/lib/python2.7/site-packages/Werkzeug-0.9.6-py2.7.egg/werkzeug/__init__.py", line 154, in <module> __import__('werkzeug.exceptions') File "/var/mediagoblin/local/lib/python2.7/site-packages/Werkzeug-0.9.6-py2.7.egg/werkzeug/exceptions.py", line 67, in <module> from werkzeug._internal import _get_environ File "/var/mediagoblin/local/lib/python2.7/site-packages/Werkzeug-0.9.6-py2.7.egg/werkzeug/_internal.py", line 15, in <module> from datetime import datetime, date ImportError: No module named datetime
To update virtualenv python you can issue:
virtualenv --system-site-packages <path/to/env>
as mediagoblin user, where <path/to/env> is the path to your mediagoblin instance.
Change History (5)
comment:1 by , 10 years ago
comment:2 by , 10 years ago
Keywords: | bitesized added |
---|
This really shouldn't be a biggy. Tagging bitesized.
comment:3 by , 10 years ago
Milestone: | 0.8.0 |
---|
comment:5 by , 5 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I've added docs on system Python updates in http://git.savannah.gnu.org/cgit/mediagoblin.git/commit/?id=7981fdaf7d7611316f592cd89f05a48d2dcffc2c.
Closing this issue now.
Just to state the obvious: We should include a note in our docs somewhere in the upgrade area about what to do, if/when you upgrade your system's python.