ImportError: cannot import name 'BPF' from 'bcc' (unknown location)
- Dominant language
- C
- Stars
- 22.7k
- Forks
- 4.1k
- Avg merge
- 10d 4h
- Merged PRs (30d)
- 3
Description
I have built bcc from source.
The directory where it was built was:
/home/pegasus_vm/Documents/eBPFShield/bcc/build
When I try to run python main.py -h
It throws the following error:
`ImportError: cannot import name 'BPF' from 'bcc' (unknown location)`
How to fix it?
I've also added bpf build to the path like this in `~/.bashrc`:
```
bcctools=/home/pegasus_vm/Documents/eBPFShield/bcc/build/tools
bccexamples=/home/pegasus_vm/Documents/eBPFShield/bcc/build/examples
export PATH=$bcctools:$bccexamples:$PATH
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing `python main.py -h` and checking how Python resolves `bcc` after the source build in `/home/pegasus_vm/Documents/eBPFShield/bcc/build`. Review the built tools, examples, and the `~/.bashrc` PATH entries to determine whether the Python binding containing `BPF` is available; done means the command imports `BPF` successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux, python
- Domain
- operating-systems, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100