Comments (5)
I solve this by modifying googleapis-common-protos == 1.52
in p4-utils/setup.py
. The file looks like:
#!/usr/bin/env python3
"Setuptools params"
from setuptools import setup, find_packages
VERSION = '0.2'
modname = distname = 'p4utils'
def readme():
with open('README.md','r') as f:
return f.read()
setup(
name=distname,
version=VERSION,
description='P4 language and bmv2 model utilities',
author='Edgar Costa Molero',
author_email='[email protected]',
packages=find_packages(),
long_description=readme(),
entry_points={'console_scripts': ['p4run = p4utils.p4run:main']},
include_package_data = True,
classifiers=[
"License :: OSI Approved :: BSD License",
"Programming Language :: Python 3",
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Developers",
"Topic :: System :: Networking",
],
keywords='networking p4 mininet',
license='GPLv2',
install_requires=[
'googleapis-common-protos == 1.52',
'grpcio >= 1.17.2',
'ipaddr',
'ipaddress',
'networkx',
'p4runtime',
'protobuf == 3.18.3',
'psutil',
'scapy == 2.4.4',
'setuptools',
],
extras_require={}
)
And then try sudo ./install.sh
again to install p4-utils.
from p4-utils.
`root@ubuntu:/home/p4/program/idtra_v0.1# p4run Traceback (most recent call last): File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 584, in _build_master ws.require(requires) File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 901, in require needed = self.resolve(parse_requirements(requirements)) File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 792, in resolve raise VersionConflict(dist, req).with_context(dependent_req) pkg_resources.ContextualVersionConflict: (protobuf 3.18.3 (/usr/local/lib/python3.8/dist-packages), Requirement.parse('protobuf!=3.20.0,!=3.20.1,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<5.0.0dev,>=3.19.5'), {'googleapis-common-protos'})
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/local/bin/p4run", line 6, in from pkg_resources import load_entry_point File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 3254, in def _initialize_master_working_set(): File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 3237, in _call_aside f(*args, **kwargs) File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 3266, in _initialize_master_working_set working_set = WorkingSet._build_master() File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 586, in _build_master return cls._build_from_requirements(requires) File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 599, in _build_from_requirements dists = ws.resolve(reqs, Environment()) File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 792, in resolve raise VersionConflict(dist, req).with_context(dependent_req) pkg_resources.ContextualVersionConflict: (protobuf 3.18.3 (/usr/local/lib/python3.8/dist-packages), Requirement.parse('protobuf!=3.20.0,!=3.20.1,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<5.0.0dev,>=3.19.5'), {'googleapis-common-protos'})`
When I use p4run to execute my p4 program, the system gives the above error and my protoc version is 3.6.1. can I find an older version of p4-utils to use the p4run command? Will it affect my p4 environment if I use the upgrade protobuf approach?
Use ubuntu 18
from p4-utils.
hello @214774894 , I have created a new VM image with P4 Utils + SDN ~12GB here is the link to download it
User name: p4
password : p4
from p4-utils.
When I use ubuntu20, I have the same problem while my protubuf version is 3.18.3.
from p4-utils.
I solve this by modifying
googleapis-common-protos == 1.52
inp4-utils/setup.py
. The file looks like:#!/usr/bin/env python3 "Setuptools params" from setuptools import setup, find_packages VERSION = '0.2' modname = distname = 'p4utils' def readme(): with open('README.md','r') as f: return f.read() setup( name=distname, version=VERSION, description='P4 language and bmv2 model utilities', author='Edgar Costa Molero', author_email='[email protected]', packages=find_packages(), long_description=readme(), entry_points={'console_scripts': ['p4run = p4utils.p4run:main']}, include_package_data = True, classifiers=[ "License :: OSI Approved :: BSD License", "Programming Language :: Python 3", "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "Topic :: System :: Networking", ], keywords='networking p4 mininet', license='GPLv2', install_requires=[ 'googleapis-common-protos == 1.52', 'grpcio >= 1.17.2', 'ipaddr', 'ipaddress', 'networkx', 'p4runtime', 'protobuf == 3.18.3', 'psutil', 'scapy == 2.4.4', 'setuptools', ], extras_require={} )
And then try
sudo ./install.sh
again to install p4-utils.
Based on the answer I have sovled the problem,thank you. My unbuntu version is 20.04,protobuf is 3.20.3
from p4-utils.
Related Issues (20)
- Using @controller_header
- How to run multiple controllers HOT 6
- How to clone packets more than once back to back? HOT 2
- Tofino Example: no bf_swithcd for one of the switches HOT 3
- Why SimpleSwitchP4RuntimeAPI doesn't support reading and writing register? HOT 1
- Problem with the “sudo p4run --config p4app.json” command regarding ping between hosts HOT 3
- Read and write to registers HOT 6
- Installing issue HOT 6
- Username and password for pre-installed VM HOT 2
- Problem with switch_thrift_API.py file
- Graceful shutdown when stopping with Ctrl+C HOT 1
- Does P4Utils Support IPv6 ? HOT 3
- register cell size HOT 1
- p4run problem HOT 5
- virtualenv problem HOT 2
- Format for providing launch options for a P4 switch HOT 3
- FRR Router binary path /usr/local/sbin does not contain daemons
- Example cannot pingall after enough long time
- Install error libpiprotobuf.so: undefined references
- Meter rates: docs state units/second, while code uses units/microsecond
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from p4-utils.