Alignak-monitoring / alignak

Monitoring tool, highly flexible and new standard oriented
https://alignak-monitoring.github.io
GNU Affero General Public License v3.0
86 stars 19 forks source link

Alignak doesn't start after `pip install` #246

Closed aftnix closed 9 years ago

aftnix commented 9 years ago
python -c 'from alignak.bin import VERSION; print(VERSION)'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/aftnix/.local/lib/python2.7/site-packages/alignak/bin/__init__.py", line 61, in <module>
    from ._deprecated_VERSION import DeprecatedAlignakBin
  File "/home/aftnix/.local/lib/python2.7/site-packages/alignak/bin/_deprecated_VERSION.py", line 9, in <module>
    from .. import __version__
ImportError: cannot import name __version__
ddurieux commented 9 years ago

A corrective version will be available soon. For the moment, add this file https://raw.githubusercontent.com/Alignak-monitoring/alignak/master/alignak/__init__.py in /home/aftnix/.local/lib/python2.7/site-packages/alignak/ folder

aftnix commented 9 years ago
alignak-arbitar

now spits out usage. But still it gives a different exception before printing usage

alignak-arbiter -h
Error processing line 2 of /home/aftnix/.local/lib/python2.7/site-packages/alignak-0.1-py2.7-nspkg.pth:

  Traceback (most recent call last):
    File "/usr/lib/python2.7/site.py", line 158, in addpackage
      exec line
    File "<string>", line 1, in <module>
  KeyError: 'alignak'

Remainder of file ignored
Seb-Solon commented 9 years ago

Which OS are you using? I'll try to reproduce that

aftnix commented 9 years ago
$ uname -ar
Linux aftnix-VirtualBox 4.2.0-16-generic #19-Ubuntu SMP Thu Oct 8 15:35:06 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=15.10
DISTRIB_CODENAME=wily
DISTRIB_DESCRIPTION="Ubuntu 15.10"
Seb-Solon commented 9 years ago

Ok i have a workaround for you because the corrective is still not there.

Remove alignak (pip uninstall alignak) and install it again but with the --egg option (pip install alignak --egg)

Explanation : Actually this prevent pip to use the --single-version-externally-managed that seems to fail with namespace files. As pip says in the setup

   Skipping installation of /usr/local/lib/python2.7/dist-packages/alignak/__init__.py (namespace package)
    Skipping installation of /usr/local/lib/python2.7/dist-packages/alignak/modules/__init__.py (namespace package)

I use a workaround from people not having this parameter to get pip not use it

Source : http://stackoverflow.com/questions/14296531/what-does-error-option-single-version-externally-managed-not-recognized-ind

ddurieux commented 9 years ago

Namespace removed, see #238