E
E
ERROR_4042014-07-11 20:29:06
Django
ERROR_404, 2014-07-11 20:29:06

How to deploy python3.xx + Django + Ubuntu development environment?

Installed the following set of programs:
OS: Ubuntu 14.04 LTS
Python: 3.4.0
Django: 1.6.5
Django project cannot be started.
Execution result:

[email protected]:~/dev/mydjango$ python3 manage.py runserver --noreload
Validating models...

Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python3.4/dist-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.4/dist-packages/django/core/management/__init__.py", line 392, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.4/dist-packages/django/core/management/base.py", line 242, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/usr/local/lib/python3.4/dist-packages/django/core/management/base.py", line 285, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python3.4/dist-packages/django/core/management/commands/runserver.py", line 79, in handle
    self.run(*args, **options)
  File "/usr/local/lib/python3.4/dist-packages/django/core/management/commands/runserver.py", line 90, in run
    self.inner_run(*args, **options)
  File "/usr/local/lib/python3.4/dist-packages/django/core/management/commands/runserver.py", line 101, in inner_run
    self.validate(display_num_errors=True)
  File "/usr/local/lib/python3.4/dist-packages/django/core/management/base.py", line 310, in validate
    num_errors = get_validation_errors(s, app)
  File "/usr/local/lib/python3.4/dist-packages/django/core/management/validation.py", line 34, in get_validation_errors
    for (app_name, error) in get_app_errors().items():
  File "/usr/local/lib/python3.4/dist-packages/django/db/models/loading.py", line 196, in get_app_errors
    self._populate()
  File "/usr/local/lib/python3.4/dist-packages/django/db/models/loading.py", line 78, in _populate
    self.load_app(app_name)
  File "/usr/local/lib/python3.4/dist-packages/django/db/models/loading.py", line 99, in load_app
    models = import_module('%s.models' % app_name)
  File "/usr/lib/python3.4/importlib/__init__.py", line 109, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 2231, in _gcd_import
  File "<frozen importlib._bootstrap>", line 2214, in _find_and_load
  File "<frozen importlib._bootstrap>", line 2203, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1200, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1129, in _exec
  File "<frozen importlib._bootstrap>", line 1448, in exec_module
  File "<frozen importlib._bootstrap>", line 321, in _call_with_frames_removed
  File "/home/user/dev/mydjango/mbase/models.py", line 6, in <module>
    from gtk.keysyms import blank
ImportError: No module named 'gtk'

Trying to install via pip3 PyGTK:
[email protected]:~/dev/mydjango$ sudo pip3 install PyGTK
Downloading/unpacking PyGTK
  Downloading pygtk-2.24.0.tar.bz2 (2.4MB): 2.4MB downloaded
  Running setup.py (path:/tmp/pip_build_root/PyGTK/setup.py) egg_info for package PyGTK
    ********************************************************************
    * Building PyGTK using distutils is only supported on windows. *
    * To build PyGTK in a supported way, read the INSTALL file.    *
    ********************************************************************
    Complete output from command python setup.py egg_info:
    ********************************************************************

* Building PyGTK using distutils is only supported on windows. *

* To build PyGTK in a supported way, read the INSTALL file.    *

********************************************************************

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/PyGTK
Storing debug log for failure in /home/user/.pip/pip.log

If anyone solved a similar problem, please share your experience already tired of butting ((

Answer the question

In order to leave comments, you need to log in

3 answer(s)
Y
yttrium, 2014-07-11
@yttrium

in the question it should also sound ..+gtk
jangu with gtk is bad to stir.
and I would still deploy on a virtual environment

Q
qqname, 2014-07-14
@qqname

As far as I remember, django 1.6.5 does not support python 3.4
. It is necessary either django 1.7 or python 3.3
, I deployed it according to the scheme:
virtualenv -p /usr/bin/python3.3 virtualenv
cd virtualenv
source bin/activate
pip install django

A
Andrew_Lvov, 2014-07-14
@Andrew_Lvov

Excuse me, but what does GTK do in models?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question