Jump to content
Forums in Read-Only Mode - Please use Reddit ×
  • 0

Ego ImportError


NikosAlexandris

Question

I am upgrading my system, after some time, and I have:

root@carbon nik # eix -I app-admin/ego
[?] app-admin/ego
     Available versions:  2.4.2^m **2.5.0.2^m **2.5.0.4 **9999^m {zsh-completion PYTHON_SINGLE_TARGET="python3_4 python3_5 python3_6 python3_7" PYTHON_TARGETS="python3_4 python3_5 python3_6 python3_7"}
     Installed versions:  2.6.3(08:56:07 PM 11/01/2018)(-zsh-completion PYTHON_SINGLE_TARGET="python3_6 -python3_4 -python3_5 -python3_7" PYTHON_TARGETS="python3_6 -python3_4 -python3_5 -python3_7")
     Homepage:            http://www.funtoo.org/Package:Ego
     Description:         Funtoo's configuration tool: ego, epro, edoc.

 

When I try to query it returns:

root@carbon nik # ego query v ego
ERROR: Ego encountered an unexpected error: ImportError
ERROR: Full traceback written to /tmp/ego-traceback-14901.txt.

The file /tmp/ego-traceback-14901.txt contains:

No module named 'appi'Traceback (most recent call last):
  File "/usr/bin/ego", line 120, in <module>
    EgoModule.run_ego_module(action, econfig, args, VERSION)
  File "/usr/share/ego/python/ego/module.py", line 100, in run_ego_module
    mod = loader.load_module()
  File "<frozen importlib._bootstrap>", line 539, in _check_name_wrapper
  File "<frozen importlib._bootstrap>", line 1614, in load_module
  File "<frozen importlib._bootstrap>", line 596, in _load_module_shim
  File "<frozen importlib._bootstrap>", line 1220, in load
  File "<frozen importlib._bootstrap>", line 1200, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1129, in _exec
  File "<frozen importlib._bootstrap>", line 1471, in exec_module
  File "<frozen importlib._bootstrap>", line 321, in _call_with_frames_removed
  File "/usr/share/ego/modules/query.ego", line 8, in <module>
    import appi
ImportError: No module named 'appi'

How do I work around this?
 

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

OK, I 've set to python3.6 via

root@carbon nik # eselect python list
Available Python interpreters, in order of preference:
  [1]   python3.4
  [2]   python2.7
  [3]   python3.6 (fallback)
  [4]   python3.5 (fallback)
root@carbon nik # eselect python set 3
root@carbon nik # eselect python show
python3.6

and it worked.  Thank you for the hints!

Link to comment
Share on other sites

  • 0
funtoo /home/rj # equery b appi
 * Searching for appi ... 
dev-python/appi-0.2.1 (/usr/lib64/python3.6/site-packages/appi)

funtoo /home/rj # equery f dev-python/appi
 * Searching for appi in dev-python ...
 * Contents of dev-python/appi-0.2.1:
/usr
/usr/lib64
/usr/lib64/python3.6
/usr/lib64/python3.6/site-packages
/usr/lib64/python3.6/site-packages/appi
/usr/lib64/python3.6/site-packages/appi-0.2.0-py3.6.egg-info
/usr/lib64/python3.6/site-packages/appi-0.2.0-py3.6.egg-info/PKG-INFO
/usr/lib64/python3.6/site-packages/appi-0.2.0-py3.6.egg-info/SOURCES.txt
/usr/lib64/python3.6/site-packages/appi-0.2.0-py3.6.egg-info/dependency_links.txt
/usr/lib64/python3.6/site-packages/appi-0.2.0-py3.6.egg-info/top_level.txt
/usr/lib64/python3.6/site-packages/appi/__init__.py
/usr/lib64/python3.6/site-packages/appi/__pycache__
/usr/lib64/python3.6/site-packages/appi/__pycache__/__init__.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/appi/__pycache__/__init__.cpython-36.opt-2.pyc
/usr/lib64/python3.6/site-packages/appi/__pycache__/__init__.cpython-36.pyc
/usr/lib64/python3.6/site-packages/appi/__pycache__/atom.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/appi/__pycache__/atom.cpython-36.opt-2.pyc
/usr/lib64/python3.6/site-packages/appi/__pycache__/atom.cpython-36.pyc
/usr/lib64/python3.6/site-packages/appi/__pycache__/ebuild.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/appi/__pycache__/ebuild.cpython-36.opt-2.pyc
/usr/lib64/python3.6/site-packages/appi/__pycache__/ebuild.cpython-36.pyc
/usr/lib64/python3.6/site-packages/appi/__pycache__/exception.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/appi/__pycache__/exception.cpython-36.opt-2.pyc
/usr/lib64/python3.6/site-packages/appi/__pycache__/exception.cpython-36.pyc
/usr/lib64/python3.6/site-packages/appi/__pycache__/util.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/appi/__pycache__/util.cpython-36.opt-2.pyc
/usr/lib64/python3.6/site-packages/appi/__pycache__/util.cpython-36.pyc
/usr/lib64/python3.6/site-packages/appi/__pycache__/version.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/appi/__pycache__/version.cpython-36.opt-2.pyc
/usr/lib64/python3.6/site-packages/appi/__pycache__/version.cpython-36.pyc
/usr/lib64/python3.6/site-packages/appi/atom.py
/usr/lib64/python3.6/site-packages/appi/base
/usr/lib64/python3.6/site-packages/appi/base/__init__.py
/usr/lib64/python3.6/site-packages/appi/base/__pycache__
/usr/lib64/python3.6/site-packages/appi/base/__pycache__/__init__.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/appi/base/__pycache__/__init__.cpython-36.opt-2.pyc
/usr/lib64/python3.6/site-packages/appi/base/__pycache__/__init__.cpython-36.pyc
/usr/lib64/python3.6/site-packages/appi/base/__pycache__/constant.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/appi/base/__pycache__/constant.cpython-36.opt-2.pyc
/usr/lib64/python3.6/site-packages/appi/base/__pycache__/constant.cpython-36.pyc
/usr/lib64/python3.6/site-packages/appi/base/__pycache__/exception.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/appi/base/__pycache__/exception.cpython-36.opt-2.pyc
/usr/lib64/python3.6/site-packages/appi/base/__pycache__/exception.cpython-36.pyc
/usr/lib64/python3.6/site-packages/appi/base/__pycache__/mixin.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/appi/base/__pycache__/mixin.cpython-36.opt-2.pyc
/usr/lib64/python3.6/site-packages/appi/base/__pycache__/mixin.cpython-36.pyc
/usr/lib64/python3.6/site-packages/appi/base/constant.py
/usr/lib64/python3.6/site-packages/appi/base/exception.py
/usr/lib64/python3.6/site-packages/appi/base/mixin.py
/usr/lib64/python3.6/site-packages/appi/base/util
/usr/lib64/python3.6/site-packages/appi/base/util/__init__.py
/usr/lib64/python3.6/site-packages/appi/base/util/__pycache__
/usr/lib64/python3.6/site-packages/appi/base/util/__pycache__/__init__.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/appi/base/util/__pycache__/__init__.cpython-36.opt-2.pyc
/usr/lib64/python3.6/site-packages/appi/base/util/__pycache__/__init__.cpython-36.pyc
/usr/lib64/python3.6/site-packages/appi/base/util/__pycache__/decorator.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/appi/base/util/__pycache__/decorator.cpython-36.opt-2.pyc
/usr/lib64/python3.6/site-packages/appi/base/util/__pycache__/decorator.cpython-36.pyc
/usr/lib64/python3.6/site-packages/appi/base/util/decorator.py
/usr/lib64/python3.6/site-packages/appi/conf
/usr/lib64/python3.6/site-packages/appi/conf/__init__.py
/usr/lib64/python3.6/site-packages/appi/conf/__pycache__
/usr/lib64/python3.6/site-packages/appi/conf/__pycache__/__init__.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/appi/conf/__pycache__/__init__.cpython-36.opt-2.pyc
/usr/lib64/python3.6/site-packages/appi/conf/__pycache__/__init__.cpython-36.pyc
/usr/lib64/python3.6/site-packages/appi/conf/__pycache__/base.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/appi/conf/__pycache__/base.cpython-36.opt-2.pyc
/usr/lib64/python3.6/site-packages/appi/conf/__pycache__/base.cpython-36.pyc
/usr/lib64/python3.6/site-packages/appi/conf/__pycache__/profile.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/appi/conf/__pycache__/profile.cpython-36.opt-2.pyc
/usr/lib64/python3.6/site-packages/appi/conf/__pycache__/profile.cpython-36.pyc
/usr/lib64/python3.6/site-packages/appi/conf/__pycache__/repository.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/appi/conf/__pycache__/repository.cpython-36.opt-2.pyc
/usr/lib64/python3.6/site-packages/appi/conf/__pycache__/repository.cpython-36.pyc
/usr/lib64/python3.6/site-packages/appi/conf/base.py
/usr/lib64/python3.6/site-packages/appi/conf/profile.py
/usr/lib64/python3.6/site-packages/appi/conf/repository.py
/usr/lib64/python3.6/site-packages/appi/ebuild.py
/usr/lib64/python3.6/site-packages/appi/exception.py
/usr/lib64/python3.6/site-packages/appi/util.py
/usr/lib64/python3.6/site-packages/appi/version.py
/usr/share
/usr/share/doc
/usr/share/doc/appi-0.2.1
/usr/share/doc/appi-0.2.1/README.rst.bz2

[I] dev-python/appi [1]
     Available versions:  (~)0.1.7(0/0.1) **0.1.9999(0/0.1) (~)0.2.1(0/0.2) **0.2.9999(0/0.2) {PYTHON_TARGETS="python3_4 python3_5 python3_6 python3_7"}
     Installed versions:  0.2.1(0/0.2)(01:37:40 AM 08/31/2018)(PYTHON_TARGETS="python3_6 -python3_4 -python3_5 -python3_7")
     Homepage:            https://gitlab.com/apinsard/appi/
     Description:         Another Portage Python Interface

[1] "python-modules-kit" /var/git/meta-repo/kits/python-modules-kit

[I] app-admin/ego
     Available versions:  2.4.2^m **2.5.0.2^m **2.5.0.4 2.6.0-r2 2.6.1 2.6.2 2.6.3 **9999^m {zsh-completion PYTHON_SINGLE_TARGET="python3_4 python3_5 python3_6 python3_7" PYTHON_TARGETS="python3_4 python3_5 python3_6 python3_7"}
     Installed versions:  2.6.3(11:15:19 AM 10/30/2018)(-zsh-completion PYTHON_SINGLE_TARGET="python3_6 -python3_4 -python3_5 -python3_7" PYTHON_TARGETS="python3_6 -python3_4 -python3_5 -python3_7")
     Homepage:            http://www.funtoo.org/Package:Ego
     Description:         Funtoo's configuration tool: ego, epro, edoc.

 

Link to comment
Share on other sites

  • 0

It was installed when I tried today. See:

root@carbon nik # genlop -lu |grep appi
     Thu Aug 17 07:56:47 2017 >>> dev-python/appi-0.1.1
     Thu Nov  2 10:47:49 2017 <<< dev-python/appi-0.1.1
     Thu Nov  2 10:47:52 2017 >>> dev-python/appi-0.1.5
     Fri Jun  1 22:14:30 2018 <<< dev-python/appi-0.1.5
     Fri Jun  1 22:14:32 2018 >>> dev-python/appi-0.2.1
     Thu Nov  1 20:56:03 2018 <<< dev-python/appi-0.2.1
     Thu Nov  1 20:56:05 2018 >>> dev-python/appi-0.2.1

I will retry.

Link to comment
Share on other sites

  • 0

Verify appi is installed in your PYTHONPATH

PYTHONPATH is the path python searchs for modules.

Run this command to output your PYTHONPATH:

rj@funtoo ~ $ python -c "import sys; print('\n'.join(sys.path))"

My system output:

rj@funtoo ~ $ python -c "import sys; print('\n'.join(sys.path))"

/usr/lib64/python36.zip
/usr/lib64/python3.6
/usr/lib64/python3.6/lib-dynload
/usr/lib64/python3.6/site-packages

Run this command to show the install path for appi:

 

funtoo /home/rj # equery f dev-python/appi

 

If appi installs to a location not in PYTHONPATH, python can't find appi

 

Link to comment
Share on other sites

  • 0
34 minutes ago, cardinal said:

My system output:


rj@funtoo ~ $ python -c "import sys; print('\n'.join(sys.path))"

/usr/lib64/python36.zip
/usr/lib64/python3.6
/usr/lib64/python3.6/lib-dynload
/usr/lib64/python3.6/site-packages

 

May I ask what your system's

eselect python show

is set to? I guess python3.6.

Edited by NikosAlexandris
Link to comment
Share on other sites

×
×
  • Create New...