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

failed to executre after locally installed #4

Open
thummim opened this issue Apr 2, 2024 · 5 comments
Open

failed to executre after locally installed #4

thummim opened this issue Apr 2, 2024 · 5 comments

Comments

@thummim
Copy link

thummim commented Apr 2, 2024

I have done installation locally, but there was an error at the installation
but I get this error when I try to use it

root@pcvm:~/ovs-dpdk-telemetry-exporter# ovsDpdkTelemetryExporter  -h
Traceback (most recent call last):
  File "/usr/local/bin/ovsDpdkTelemetryExporter", line 11, in <module>
    load_entry_point('ovsDpdkTelemetryExporter==0.1', 'console_scripts', 'ovsDpdkTelemetryExporter')()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 490, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2854, in load_entry_point
    return ep.load()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2445, in load
    return self.resolve()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2451, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
ModuleNotFoundError: No module named 'ovsDpdkTelemetryExporter'

and this was the error message at the installation

running install_lib
warning: install_lib: 'build/lib' does not exist -- no Python modules to install

creating build
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying ovsDpdkTelemetryExporter.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying ovsDpdkTelemetryExporter.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying ovsDpdkTelemetryExporter.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying ovsDpdkTelemetryExporter.egg-info/entry_points.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying ovsDpdkTelemetryExporter.egg-info/not-zip-safe -> build/bdist.linux-x86_64/egg/EGG-INFO
copying ovsDpdkTelemetryExporter.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying ovsDpdkTelemetryExporter.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
creating dist
creating 'dist/ovsDpdkTelemetryExporter-0.1-py3.8.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing ovsDpdkTelemetryExporter-0.1-py3.8.egg
creating /usr/local/lib/python3.8/dist-packages/ovsDpdkTelemetryExporter-0.1-py3.8.egg
Extracting ovsDpdkTelemetryExporter-0.1-py3.8.egg to /usr/local/lib/python3.8/dist-packages
Adding ovsDpdkTelemetryExporter 0.1 to easy-install.pth file
Installing ovsDpdkTelemetryExporter script to /usr/local/bin

Installed /usr/local/lib/python3.8/dist-packages/ovsDpdkTelemetryExporter-0.1-py3.8.egg
Processing dependencies for ovsDpdkTelemetryExporter==0.1
Searching for schedule
Reading https://pypi.org/simple/schedule/
Downloading https://files.pythonhosted.org/packages/f0/1a/e5a65c08d708ee4c002f3f938ba69b2282af478755700c40f037eacc92ef/schedule-1.2.1-py2.py3-none-any.whl#sha256=14cdeb083a596aa1de6dc77639a1b2ac8bf6eaafa82b1c9279d3612823063d01
Best match: schedule 1.2.1
Processing schedule-1.2.1-py2.py3-none-any.whl
Installing schedule-1.2.1-py2.py3-none-any.whl to /usr/local/lib/python3.8/dist-packages
Adding schedule 1.2.1 to easy-install.pth file

Installed /usr/local/lib/python3.8/dist-packages/schedule-1.2.1-py3.8.egg
Searching for prometheus_client
Reading https://pypi.org/simple/prometheus_client/
Downloading https://files.pythonhosted.org/packages/c7/98/745b810d822103adca2df8decd4c0bbe839ba7ad3511af3f0d09692fc0f0/prometheus_client-0.20.0-py3-none-any.whl#sha256=cde524a85bce83ca359cc837f28b8c0db5cac7aa653a588fd7e84ba061c329e7
Best match: prometheus-client 0.20.0
Processing prometheus_client-0.20.0-py3-none-any.whl
Installing prometheus_client-0.20.0-py3-none-any.whl to /usr/local/lib/python3.8/dist-packages
Adding prometheus-client 0.20.0 to easy-install.pth file

Installed /usr/local/lib/python3.8/dist-packages/prometheus_client-0.20.0-py3.8.egg
Searching for pathos
Reading https://pypi.org/simple/pathos/
Downloading https://files.pythonhosted.org/packages/f4/7f/cea34872c000d17972dad998575d14656d7c6bcf1a08a8d66d73c1ef2cca/pathos-0.3.2-py3-none-any.whl#sha256=d669275e6eb4b3fbcd2846d7a6d1bba315fe23add0c614445ba1408d8b38bafe
Best match: pathos 0.3.2
Processing pathos-0.3.2-py3-none-any.whl
Installing pathos-0.3.2-py3-none-any.whl to /usr/local/lib/python3.8/dist-packages
Adding pathos 0.3.2 to easy-install.pth file
Installing pathos_connect script to /usr/local/bin
Installing portpicker script to /usr/local/bin

Installed /usr/local/lib/python3.8/dist-packages/pathos-0.3.2-py3.8.egg
Searching for ovs
Reading https://pypi.org/simple/ovs/
Downloading https://files.pythonhosted.org/packages/52/a2/3a8e6c21e926560599018a4a3d721f17bf4c01705a9d75365952098ce3f6/ovs-3.1.2.tar.gz#sha256=582340a803b220aa1a0ad150916f3060775198d498340b589e93f81000b007df
Best match: ovs 3.1.2
Processing ovs-3.1.2.tar.gz
Writing /tmp/easy_install-rv_hoc94/ovs-3.1.2/setup.cfg
Running ovs-3.1.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-rv_hoc94/ovs-3.1.2/egg-dist-tmp-yl672rm1
unable to execute 'x86_64-linux-gnu-gcc': No such file or directory
***************************************************************************
WARNING: The C extension could not be compiled, speedups are not enabled.
Failure information, if any, is above.
Retrying the build without the C extension.
***************************************************************************
@angelouev
Copy link
Contributor

Hello Thummim,

My guess is that your local machine has not completed the installation successfully due to a missing C interpreter. I would suggest to use the prepackaged docker images to avoid all that hassle as described in the README.md, but if local install is absolutely necessary, try installing the relevant build-essential and python 3 packages for your distribution e.g. for debian / ubuntu:

# apt update
# apt install build-essential python3 python3-pip
# python3 setup.py install

Hope this helps!

@thummim
Copy link
Author

thummim commented Apr 3, 2024

Thank you for your kind reply.
Yeah I think it is the problem of my local machine.

is it possible to you to make it support pip install?

@angelouev
Copy link
Contributor

Hello Thummim,

Possible certainly, but our initial thinking was that most people would use the exporter containerized in actual environments, or instrument the setup.py install through Ansible, Terraform etc. customized scripts. This also would ease the maintenance burden, since we would not have to deal with distribution peculiarities on different architectures, OSes, etc.

If you think that your use case depends on having a PyPI installable wheel, please close this issue and open a specific issue for that, so I can attach a PR to it. I will try to allocate some time to it, but I can't guarantee when it will be done.

Thanks!

@thummim
Copy link
Author

thummim commented Apr 5, 2024

Thank you for your answer, my goal is to install this tool throught Ansible, but I keep fail at the same part.
If it is possible to install with setup.py I have no problem with it.

the build-essential cannot be installed because of following error

sudo apt install build-essential
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 build-essential : Depends: libc6-dev but it is not going to be installed or
                            libc-dev
                   Depends: g++ (>= 4:9.2) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Could you try at new machine to install and check if it is only my local machine's problem?
I have fixed my sources.list and pypi servers and tried to install another version of lib6 or g++ but I couldn't fix it

Thank you for your kind reply!

@angelouev
Copy link
Contributor

Hello Thumim,

My guess is that you have some held packages that are broken (?). Try to debug using:

$ sudo apt-mark showhold #shows held packages
...
$ sudo apt-get update && sudo apt-get install -f #should fix broken packages
...
$ dpkg --configure -a #try configuring locally installed packages again for more debugging info
...

My guess is that the build-essential package cannot finish configuration due to an old held package on your machine. In any case, it might be a good idea to upgrade using apt-get update && apt-get dist-upgrade to be on the safe side.

Hope this works!

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