Comments (16)
I've tried python3.8 and pip3.8, but encountered another error (with a very long log)
from p4-utils.
Hi
Protobuffer is installed here: https://github.com/nsg-ethz/p4-utils/blob/master/install-tools/install-p4-dev.sh#L228 for our version of bmv2 and p4c, protobuf v3.6 was the recommended one, see here https://github.com/nsg-ethz/p4-utils/blob/master/install-tools/install-p4-dev.sh#L20.
from p4-utils.
I've tried python3.8 and pip3.8, but encountered another error (with a very long log)
Hi,did you solve this?
from p4-utils.
Hi, @edgar-costa
I did run the install-p4-dev.sh
, only then did I install p4-utils.
I think the error is raised because setup.py
requires 'protobuf >= 3.6.1'
. Or to make sure I finish running install-p4-dev.sh
successfully, how can I check the installed protobuf version?
from p4-utils.
you can run "protoc --version"
from p4-utils.
you can run "protoc --version"
@AmazingBJ Thank you.
user@v:~/p4-tools/protobuf$ protoc --version
libprotoc 3.6.1
So the protobuf is indeed installed with version 3.6.1, which is the same as https://github.com/nsg-ethz/p4-utils/blob/master/install-tools/install-p4-dev.sh#L20.
from p4-utils.
but i install p4-utils,still report protobuf requires Python '>=3.7' but the running Python is 3.6.9,how can i fix this.if i did not install p4-utils correctly,when i run "sudo p4run" in /p4-learning/exer...,it will report no such command
from p4-utils.
but i install p4-utils,still report protobuf requires Python '>=3.7' but the running Python is 3.6.9,how can i fix this.if i did not install p4-utils correctly,when i run "sudo p4run" in /p4-learning/exer...,it will report no such command
same
from p4-utils.
but i install p4-utils,still report protobuf requires Python '>=3.7' but the running Python is 3.6.9,how can i fix this.if i did not install p4-utils correctly,when i run "sudo p4run" in /p4-learning/exer...,it will report no such command
I success install when I checkout branch to simple-frr.I hope it will help you.
from p4-utils.
@AmazingBJ Thank you, in brach simple-frr
, I can successfully install p4-utils, and p4run
is fine
user@v:~/p4-tools/p4-utils$ p4run -h
usage: p4run [-h] [--config CONFIG] [--log-dir LOG_DIR] [--pcap-dir] [--cli]
[--verbosity] [--clean] [--clean-dir] [--empty-p4]
optional arguments:
-h, --help show this help message and exit
--config CONFIG Path to configuration
--log-dir LOG_DIR
--pcap-dir Generate pcap files for interfaces.
--cli Run mininet CLI.
--verbosity Set messages verbosity.
--clean Cleans previous log files
--clean-dir Cleans previous log files and closes
--empty-p4 Runs the topology with an empty p4 program that does
nothing
But I'm afraid the version is a bit too old, it required old version's field in p4app.json
when I run p4run
Traceback (most recent call last):
File "/usr/local/bin/p4run", line 11, in <module>
load_entry_point('p4utils', 'console_scripts', 'p4run')()
File "/home/user/p4-tools/p4-utils/p4utils/p4run.py", line 855, in main
verbosity=args.verbosity)
File "/home/user/p4-tools/p4-utils/p4utils/p4run.py", line 317, in __init__
self.switches = self.parse_switches(topology.get('switches', None))
File "/home/user/p4-tools/p4-utils/p4utils/p4run.py", line 368, in parse_switches
'p4_src': self.conf['p4_src'],
KeyError: 'p4_src'
from p4-utils.
@AmazingBJ Thank you, in brach
simple-frr
, I can successfully install p4-utils, andp4run
is fineuser@v:~/p4-tools/p4-utils$ p4run -h usage: p4run [-h] [--config CONFIG] [--log-dir LOG_DIR] [--pcap-dir] [--cli] [--verbosity] [--clean] [--clean-dir] [--empty-p4] optional arguments: -h, --help show this help message and exit --config CONFIG Path to configuration --log-dir LOG_DIR --pcap-dir Generate pcap files for interfaces. --cli Run mininet CLI. --verbosity Set messages verbosity. --clean Cleans previous log files --clean-dir Cleans previous log files and closes --empty-p4 Runs the topology with an empty p4 program that does nothing
But I'm afraid the version is a bit too old, it required old version's field in
p4app.json
when I runp4run
Traceback (most recent call last): File "/usr/local/bin/p4run", line 11, in <module> load_entry_point('p4utils', 'console_scripts', 'p4run')() File "/home/user/p4-tools/p4-utils/p4utils/p4run.py", line 855, in main verbosity=args.verbosity) File "/home/user/p4-tools/p4-utils/p4utils/p4run.py", line 317, in __init__ self.switches = self.parse_switches(topology.get('switches', None)) File "/home/user/p4-tools/p4-utils/p4utils/p4run.py", line 368, in parse_switches 'p4_src': self.conf['p4_src'], KeyError: 'p4_src'
sry,I have no idea about this.Perhaps you can checkout other branch.
from p4-utils.
@AmazingBJ Oh sorry, p4_src
is not an old field, please ignore my last comment. I will do more test later in the simple-frr
branch later.
from p4-utils.
@AmazingBJ Oh sorry,
p4_src
is not an old field, please ignore my last comment. I will do more test later in thesimple-frr
branch later.
okay
from p4-utils.
@edgar-costa Hi, with branch simple-frr
, the log file is empty, though config turn it on
"enable_log": true,
from p4-utils.
It seems one workaround is to constrain the protobuf version as protocolbuffers/protobuf#10053 suggests.
You can modify setup.py
in this way (master...Vic0428:p4-utils:master)!
from p4-utils.
似乎一种解决方法是像protobuers/protobuf#10053所建议的那样限制protobuf版本。
您可以以这种方式进行修改(主...Vic0428:p4-utils:master)!
setup.py
Hello, I tried this method and I can successfully install p4utils, but when I execute the command p4run, it still cannot be successfully executed, do you know how to solve it?
When executing p4run, the display is as follows:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 574, in _build_master
ws.require(requires)
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 892, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 783, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (protobuf 3.6.1 (/usr/local/lib/python3.6/dist-packages), Requirement.parse('protobuf<5.0.0dev,>=3.15.0'), {'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 3088, in
@_call_aside
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 3072, in _call_aside
f(*args, **kwargs)
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 3101, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 576, in _build_master
return cls._build_from_requirements(requires)
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 589, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 783, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (protobuf 3.6.1 (/usr/local/lib/python3.6/dist-packages), Requirement.parse('protobuf<5.0.0dev,>=3.15.0'), {'googleapis-common-protos'})
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.