Giter Club home page Giter Club logo

Comments (16)

Benature avatar Benature commented on July 24, 2024

I've tried python3.8 and pip3.8, but encountered another error (with a very long log)

from p4-utils.

edgar-costa avatar edgar-costa commented on July 24, 2024

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.

AmazingBJ avatar AmazingBJ commented on July 24, 2024

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.

Benature avatar Benature commented on July 24, 2024

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.

AmazingBJ avatar AmazingBJ commented on July 24, 2024

you can run "protoc --version"

from p4-utils.

Benature avatar Benature commented on July 24, 2024

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.

AmazingBJ avatar AmazingBJ commented on July 24, 2024

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.

Benature avatar Benature commented on July 24, 2024

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.

AmazingBJ avatar AmazingBJ commented on July 24, 2024

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.

Benature avatar Benature commented on July 24, 2024

@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 avatar AmazingBJ commented on July 24, 2024

@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'

sry,I have no idea about this.Perhaps you can checkout other branch.

from p4-utils.

Benature avatar Benature commented on July 24, 2024

@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 avatar AmazingBJ commented on July 24, 2024

@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.

okay

from p4-utils.

Benature avatar Benature commented on July 24, 2024

@edgar-costa Hi, with branch simple-frr, the log file is empty, though config turn it on

"enable_log": true,

from p4-utils.

Vic0428 avatar Vic0428 commented on July 24, 2024

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.

YXY-1998 avatar YXY-1998 commented on July 24, 2024

似乎一种解决方法是像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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.