openStack - Package : keyStone error requires a different python version

asked 2020-05-15 02:33:58 -0500

masoudtune gravatar image

updated 2020-05-19 16:15:15 -0500

zaneb gravatar image

i want to install openStack on ubuntu 16.04. when i enter the command ./stack.sh i get the following error
python version is 2.7.12 , i also read the openstack.org documentaion, it said in Prerequisites that use to up version 2.7.

Ignoring zipp: markers 'python_version == "2.7"' don't match your environment
Ignoring zipp: markers 'python_version == "3.6"' don't match your environment
Ignoring zipp: markers 'python_version == "3.7"' don't match your environment
Ignoring zipp: markers 'python_version == "3.8"' don't match your environment
Obtaining file:///opt/stack/keystone
ERROR: Package 'keystone' requires a different Python: 3.5.2 not in '>=3.6'
+inc/python:pip_install:1                  exit_trap
+./stack.sh:exit_trap:489                  local r=1
++./stack.sh:exit_trap:490                  jobs -p
+./stack.sh:exit_trap:490                  jobs=
+./stack.sh:exit_trap:493                  [[ -n '' ]]
+./stack.sh:exit_trap:499                  '[' -f '' ']'
+./stack.sh:exit_trap:504                  kill_spinner
+./stack.sh:kill_spinner:399               '[' '!' -z '' ']'
+./stack.sh:exit_trap:506                  [[ 1 -ne 0 ]]
+./stack.sh:exit_trap:507                  echo 'Error on exit'
Error on exit
+./stack.sh:exit_trap:509                  type -p generate-subunit
+./stack.sh:exit_trap:510                  generate-subunit 1589480494 258 fail
+./stack.sh:exit_trap:512                  [[ -z /opt/stack/logs ]]

Each time I get error, I re-enter the following commands:
./unstack.sh
./clean.sh
./stack.sh
But I get the same error again.

edit retag flag offensive close merge delete

Comments

1

Use Python 3. Python 2 is obsolete.

Also use Ubuntu 18.04.

Bernd Bausch gravatar imageBernd Bausch ( 2020-05-15 17:26:27 -0500 )edit

2 answers

Sort by ยป oldest newest most voted
1

answered 2020-05-23 10:42:35 -0500

Stephen C gravatar image

If you want use Openstack on Ubuntu 16.04 (Xenial), then Queens is that last version that is supported / is guaranteed to work.

Rocky, Stein and Train require 18.04 (Bionic). Usuri will run on 18.04 (Bionic) or 20.04 (Focal).

It appears that you are trying to install the Usuri OpenStack release on Xenial. This won't work ... without jumping through hoops:

  • Starting with Usuri, Openstack is not longer developed for / tested with python 2.7.
  • Usuri requires at least python 3.6 because 3.6 is the version of python 3 that is standard on Bionic.
  • Xenial only provides python 3.5.
  • You could possibly find a PPE that provides python 3.6 on Xenial, but there may be other dependencies that will cause problems.

Your best bet is to upgrade to Ubuntu 18.04 or (better) 20.04 before you start installing. This will give you 4 Openstack release cycles before you are forced to upgrade your OS to keep up.

edit flag offensive delete link more
1

answered 2020-05-19 16:18:59 -0500

zaneb gravatar image

OpenStack is now Python3-only (as of the Ussuri release), so if you install from devstack it will use Python 3.

In this case it's using 3.5 (not 2.7). But the minimum version supported by OpenStack is 3.6. Use a later version of Ubuntu (18.04 would be a much better choice than 16.04) to get a more recent version of Python.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2020-05-15 02:33:58 -0500

Seen: 252 times

Last updated: May 23