Closed Benature closed 1 year ago
I've tried python3.8 and pip3.8, but encountered another error (with a very long log)
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.
I've tried python3.8 and pip3.8, but encountered another error (with a very long log)
Hi,did you solve this?
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?
you can run "protoc --version"
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.
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
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
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.
@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'
@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.
@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.
@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
@edgar-costa Hi, with branch simple-frr
, the log file is empty, though config turn it on
"enable_log": true,
It seems one workaround is to constrain the protobuf version as https://github.com/protocolbuffers/protobuf/issues/10053 suggests.
You can modify setup.py
in this way (https://github.com/nsg-ethz/p4-utils/compare/master...Vic0428:p4-utils:master)!
似乎一种解决方法是像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
I want to install p4-utils in my own ubuntu18.04, but
The p4-utils folder is copied from provided VM, the git log is commit
3e5a3600736831ec717f4637a4eb75c3b3b19755
.I tried in VM but it success, the python version and pip version is the same. I wonder how the
protobuf
is installed in VM?