Bottle module for Glances web start

2,316 views
Skip to first unread message

dude212

unread,
Oct 23, 2017, 5:34:47 PM10/23/17
to Glances Users
I installed the Bottle module for python 2.7 on my Mac. Glances runs fine in standalone mode, but every time i try starting it in web mode I get:

Bottle module not found. Glances cannot start in web server mode



Am I missing something?

Nicolargo

unread,
Oct 24, 2017, 4:35:20 PM10/24/17
to Glances Users
Are you sure that Bottle is installed ?
Please check it :

    # python
    >>> import bottle
    >>> bottle.__version__
    '0.12.9'

dude212

unread,
Oct 24, 2017, 6:24:13 PM10/24/17
to Glances Users
hmmm this is returned

>>> import bottle
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named bottle


But if I do 

pip install bottle

I get: Requirement already satisfied: bottle in /Library/Python/2.7/site-packages

Nicolargo

unread,
Oct 25, 2017, 3:45:49 AM10/25/17
to Glances Users
Strange...

Perhaps Bottle is installed for Python 2.x and your system is configured to use Python 3 ?

Check this:

    $ python -V
    Python 2.7.12

If the result of the previous command is Python 3.x then you should use the following command to install Bottle for Python 3:

    pip3 install bottle



dude212

unread,
Oct 26, 2017, 10:39:12 PM10/26/17
to Glances Users
Looks like 2.8.13. Hmmm


$ python -v

# installing zipimport hook

import zipimport # builtin

# installed zipimport hook

# /Applications/MAMP/Library/lib/python2.7/site.pyc matches /Applications/MAMP/Library/lib/python2.7/site.py

import site # precompiled from /Applications/MAMP/Library/lib/python2.7/site.pyc

# /Applications/MAMP/Library/lib/python2.7/os.pyc matches /Applications/MAMP/Library/lib/python2.7/os.py

import os # precompiled from /Applications/MAMP/Library/lib/python2.7/os.pyc

import errno # builtin

import posix # builtin

# /Applications/MAMP/Library/lib/python2.7/posixpath.pyc matches /Applications/MAMP/Library/lib/python2.7/posixpath.py

import posixpath # precompiled from /Applications/MAMP/Library/lib/python2.7/posixpath.pyc

# /Applications/MAMP/Library/lib/python2.7/stat.pyc matches /Applications/MAMP/Library/lib/python2.7/stat.py

import stat # precompiled from /Applications/MAMP/Library/lib/python2.7/stat.pyc

# /Applications/MAMP/Library/lib/python2.7/genericpath.pyc matches /Applications/MAMP/Library/lib/python2.7/genericpath.py

import genericpath # precompiled from /Applications/MAMP/Library/lib/python2.7/genericpath.pyc

# /Applications/MAMP/Library/lib/python2.7/warnings.pyc matches /Applications/MAMP/Library/lib/python2.7/warnings.py

import warnings # precompiled from /Applications/MAMP/Library/lib/python2.7/warnings.pyc

# /Applications/MAMP/Library/lib/python2.7/linecache.pyc matches /Applications/MAMP/Library/lib/python2.7/linecache.py

import linecache # precompiled from /Applications/MAMP/Library/lib/python2.7/linecache.pyc

# /Applications/MAMP/Library/lib/python2.7/types.pyc matches /Applications/MAMP/Library/lib/python2.7/types.py

import types # precompiled from /Applications/MAMP/Library/lib/python2.7/types.pyc

# /Applications/MAMP/Library/lib/python2.7/UserDict.pyc matches /Applications/MAMP/Library/lib/python2.7/UserDict.py

import UserDict # precompiled from /Applications/MAMP/Library/lib/python2.7/UserDict.pyc

# /Applications/MAMP/Library/lib/python2.7/_abcoll.pyc matches /Applications/MAMP/Library/lib/python2.7/_abcoll.py

import _abcoll # precompiled from /Applications/MAMP/Library/lib/python2.7/_abcoll.pyc

# /Applications/MAMP/Library/lib/python2.7/abc.pyc matches /Applications/MAMP/Library/lib/python2.7/abc.py

import abc # precompiled from /Applications/MAMP/Library/lib/python2.7/abc.pyc

# /Applications/MAMP/Library/lib/python2.7/_weakrefset.pyc matches /Applications/MAMP/Library/lib/python2.7/_weakrefset.py

import _weakrefset # precompiled from /Applications/MAMP/Library/lib/python2.7/_weakrefset.pyc

import _weakref # builtin

# /Applications/MAMP/Library/lib/python2.7/copy_reg.pyc matches /Applications/MAMP/Library/lib/python2.7/copy_reg.py

import copy_reg # precompiled from /Applications/MAMP/Library/lib/python2.7/copy_reg.pyc

# /Applications/MAMP/Library/lib/python2.7/traceback.pyc matches /Applications/MAMP/Library/lib/python2.7/traceback.py

import traceback # precompiled from /Applications/MAMP/Library/lib/python2.7/traceback.pyc

# /Applications/MAMP/Library/lib/python2.7/sysconfig.pyc matches /Applications/MAMP/Library/lib/python2.7/sysconfig.py

import sysconfig # precompiled from /Applications/MAMP/Library/lib/python2.7/sysconfig.pyc

# /Applications/MAMP/Library/lib/python2.7/re.pyc matches /Applications/MAMP/Library/lib/python2.7/re.py

import re # precompiled from /Applications/MAMP/Library/lib/python2.7/re.pyc

# /Applications/MAMP/Library/lib/python2.7/sre_compile.pyc matches /Applications/MAMP/Library/lib/python2.7/sre_compile.py

import sre_compile # precompiled from /Applications/MAMP/Library/lib/python2.7/sre_compile.pyc

import _sre # builtin

# /Applications/MAMP/Library/lib/python2.7/sre_parse.pyc matches /Applications/MAMP/Library/lib/python2.7/sre_parse.py

import sre_parse # precompiled from /Applications/MAMP/Library/lib/python2.7/sre_parse.pyc

# /Applications/MAMP/Library/lib/python2.7/sre_constants.pyc matches /Applications/MAMP/Library/lib/python2.7/sre_constants.py

import sre_constants # precompiled from /Applications/MAMP/Library/lib/python2.7/sre_constants.pyc

dlopen("/Applications/MAMP/Library/lib/python2.7/lib-dynload/_locale.so", 2);

import _locale # dynamically loaded from /Applications/MAMP/Library/lib/python2.7/lib-dynload/_locale.so

# /Applications/MAMP/Library/lib/python2.7/_sysconfigdata.pyc matches /Applications/MAMP/Library/lib/python2.7/_sysconfigdata.py

import _sysconfigdata # precompiled from /Applications/MAMP/Library/lib/python2.7/_sysconfigdata.pyc

# /Applications/MAMP/Library/lib/python2.7/_osx_support.pyc matches /Applications/MAMP/Library/lib/python2.7/_osx_support.py

import _osx_support # precompiled from /Applications/MAMP/Library/lib/python2.7/_osx_support.pyc

# zipimport: found 111 names in /Applications/MAMP/Library/lib/python2.7/site-packages/setuptools-18.7.1-py2.7.egg

# zipimport: found 8 names in /Applications/MAMP/Library/lib/python2.7/site-packages/python_memcached-1.57-py2.7.egg

import encodings # directory /Applications/MAMP/Library/lib/python2.7/encodings

# /Applications/MAMP/Library/lib/python2.7/encodings/__init__.pyc matches /Applications/MAMP/Library/lib/python2.7/encodings/__init__.py

import encodings # precompiled from /Applications/MAMP/Library/lib/python2.7/encodings/__init__.pyc

# /Applications/MAMP/Library/lib/python2.7/codecs.pyc matches /Applications/MAMP/Library/lib/python2.7/codecs.py

import codecs # precompiled from /Applications/MAMP/Library/lib/python2.7/codecs.pyc

import _codecs # builtin

# /Applications/MAMP/Library/lib/python2.7/encodings/aliases.pyc matches /Applications/MAMP/Library/lib/python2.7/encodings/aliases.py

import encodings.aliases # precompiled from /Applications/MAMP/Library/lib/python2.7/encodings/aliases.pyc

# /Applications/MAMP/Library/lib/python2.7/encodings/utf_8.pyc matches /Applications/MAMP/Library/lib/python2.7/encodings/utf_8.py

import encodings.utf_8 # precompiled from /Applications/MAMP/Library/lib/python2.7/encodings/utf_8.pyc

Python 2.7.13 (default, Jul  3 2017, 14:22:13) 

[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.54)] on darwin

Type "help", "copyright", "credits" or "license" for more information.

dlopen("/Applications/MAMP/Library/lib/python2.7/lib-dynload/readline.so", 2);

import readline # dynamically loaded from /Applications/MAMP/Library/lib/python2.7/lib-dynload/readline.so

>>> 

dude212

unread,
Oct 31, 2017, 9:30:09 AM10/31/17
to Glances Users
Hi, so I see py is being called from my MAMP install. Can this still work in this sense?
Reply all
Reply to author
Forward
0 new messages