0

I am trying to install Tacker via Devstack. I am following this installation guide. I use same local.conf as in the guide. However, after running ./stack.sh, I see this error:

Requirement already satisfied: pyperclip===1.7.0 in /usr/local/lib/python3.6/dist-packages (from -c /opt/stack/requirements/upper-constraints.txt (line 453))
Requirement already satisfied: wcwidth===0.1.7 in /usr/local/lib/python3.6/dist-packages (from -c /opt/stack/requirements/upper-constraints.txt (line 694))
Requirement already satisfied: zipp===0.6.0 in /usr/local/lib/python3.6/dist-packages (from -c /opt/stack/requirements/upper-constraints.txt (line 716))
Requirement already satisfied: pycparser===2.19 in /usr/local/lib/python3.6/dist-packages (from -c /opt/stack/requirements/upper-constraints.txt (line 438))
Requirement already satisfied: more-itertools===7.2.0 in /usr/local/lib/python3.6/dist-packages (from -c /opt/stack/requirements/upper-constraints.txt (line 311))
Installing collected packages: Django, horizon, tacker-horizon
  Found existing installation: Django 2.2.7
    Uninstalling Django-2.2.7:
      Successfully uninstalled Django-2.2.7
  Found existing installation: horizon 17.0.1.dev8
    Can't uninstall 'horizon'. No files were found to uninstall.
  Running setup.py develop for horizon
  Found existing installation: tacker-horizon 0.15.1.dev2
    Can't uninstall 'tacker-horizon'. No files were found to uninstall.
  Running setup.py develop for tacker-horizon
Successfully installed Django-2.0.13 horizon tacker-horizon
You are using pip version 9.0.3, however version 19.3.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Traceback (most recent call last):
  File "/opt/stack/tacker-horizon/manage.py", line 18, in 
    from django.core.management import execute_from_command_line
ImportError: No module named django.core.management
Error on exit
nova-compute: no process found
neutron-dhcp-agent: no process found
neutron-l3-agent: no process found
neutron-metadata-agent: no process found
neutron-openvswitch-agent: no process found
stack@ubuntu-nfv-1:~/devstack$ 

I make the error more bold here :

File "/opt/stack/tacker-horizon/manage.py", line 18, in from django.core.management import execute_from_command_line ImportError: No module named django.core.management Error on exit

I see the warning before says consider upgrading via the 'pip install --upgrade pip' command. I did that but I still see the same error.

Anytime I try to reinstall, I first run ./unstack.sh and ./clean.sh to make sure the environment is clean for the installation.

The first lines of file /opt/stack/tacker-horizon/manage.py include the following:

#!/usr/bin/env python

import os
import sys

from django.core.management import execute_from_command_line
..

Thus, according to the story here, manage.py should be OK.

I use Ubuntu 18.04 virtual machine in VMWare ESXi.

If anyone can advise me on this issue, I will be very grateful.

2 Answers 2

1

It seem you are using you are using different python distribution. Please make sure that you are using python3, and django is also installed in the py3 distribution.

dk@dk-VirtualBox:~/$ ll /usr/bin/python
lrwxrwxrwx 1 root root 9 Apr 16  2018 /usr/bin/python -> python2.7*
dk@dk-VirtualBox:~/$ cd /usr/bin/
dk@dk-VirtualBox:/usr/bin$ sudo rm python
dk@dk-VirtualBox:/usr/bin$ sudo ln -s python3.6 python
dk@dk-VirtualBox:/usr/bin$ ll /usr/bin/python
lrwxrwxrwx 1 root root 9 Jan  3 18:40 /usr/bin/python -> python3.6*
1
  • Thank you for your suggestion. Your solution looks similar to the one I found though I didn't try it. Thank you very much for your help. Jan 9, 2020 at 20:59
0

This is how I resolved the issue. According to an answer in this question, I ran "from django.core.management import execute_from_command_line" in python command line and I saw same error. But when I run same thing in python3 command line, no error is given. Thus, it is apparent that python3 does have Django in its site-packages folder but python doesn't. Therefore, I changed the shebang line "#!/usr/bin/env python" in /opt/stack/tacker-horizon/manage.py to "#!/usr/bin/env python3". Then, I after running ./unstack.sh, I ran again ./stack.sh. The installation is successful now.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .