Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import error - ModuleNotFoundError: No module named 'api' #14

Open
SteveClement opened this issue Oct 10, 2021 · 1 comment
Open

Import error - ModuleNotFoundError: No module named 'api' #14

SteveClement opened this issue Oct 10, 2021 · 1 comment

Comments

@SteveClement
Copy link
Member

Trying to import bgpranking results in error. See below.

(venv) misp@misp-test:~/code/mailoney$ pip install bgpranking-web
Collecting bgpranking-web
  Using cached bgpranking-web-1.2.tar.gz (2.1 kB)
Collecting requests
  Using cached requests-2.26.0-py2.py3-none-any.whl (62 kB)
Collecting urllib3<1.27,>=1.21.1
  Using cached urllib3-1.26.7-py2.py3-none-any.whl (138 kB)
Collecting idna<4,>=2.5
  Using cached idna-3.2-py3-none-any.whl (59 kB)
Collecting certifi>=2017.4.17
  Using cached certifi-2021.10.8-py2.py3-none-any.whl (149 kB)
Requirement already satisfied: charset-normalizer~=2.0.0 in ./venv/lib/python3.8/site-packages (from requests->bgpranking-web) (2.0.6)
Using legacy 'setup.py install' for bgpranking-web, since package 'wheel' is not installed.
Installing collected packages: urllib3, idna, certifi, requests, bgpranking-web
    Running setup.py install for bgpranking-web ... done
Successfully installed bgpranking-web-1.2 certifi-2021.10.8 idna-3.2 requests-2.26.0 urllib3-1.26.7
(venv) misp@misp-test:~/code/mailoney$ ipython
Python 3.8.10 (default, Sep 28 2021, 16:10:42)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.28.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import bgpranking_web
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-1-9ea4671a6f1e> in <module>
----> 1 import bgpranking_web

~/code/mailoney/venv/lib/python3.8/site-packages/bgpranking_web/__init__.py in <module>
----> 1 from api import *

ModuleNotFoundError: No module named 'api'
@Rafiot
Copy link
Contributor

Rafiot commented Oct 10, 2021

makes sense, this package is using the old version of bgpranking, this is the one you want to use: https://github.com/D4-project/BGP-Ranking/tree/master/client => from pybgpranking import BGPRanking (and yes, it is not on pypi, for reasons, I guess, no idea why)

I need to delete bgpranking-web from pypi. as it is definitely not working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants