# Broccoli-Python

**URL:** <https://community.zeek.org/t/broccoli-python/5112>\
**Category:** Zeek\
**Created:** [November 29, 2017, 12:12pm UTC](https://community.zeek.org/t/broccoli-python/5112 "2017-11-29T12:12:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rober\_Fernandez](https://avatars.discourse-cdn.com/v4/letter/r/eada6e/32.png) [@Rober\_Fernandez](https://community.zeek.org/u/Rober_Fernandez)\
**Post date:** [November 29, 2017, 12:12pm UTC](https://community.zeek.org/t/broccoli-python/5112/1 "2017-11-29T12:12:58Z")

</div>

When execute python -c “import broccoli” , python give me this error

Traceback (most recent call last):  
File “”, line 1, in   
File “/usr/local/lib/python3.5/dist-packages/broccoli.py”, line 6, in   
from broccoli\_intern import \*  
ImportError: No module named 'broccoli\_intern

---

<div class="post-metadata">

**Author:** ![dopheide](https://avatars.discourse-cdn.com/v4/letter/d/74df32/32.png) [@dopheide](https://community.zeek.org/u/dopheide)\
**Post date:** [November 29, 2017, 1:57pm UTC](https://community.zeek.org/t/broccoli-python/5112/2 "2017-11-29T13:57:08Z")

</div>

Follow up question for the list, I noticed Rober is using Python 3, is broccoli going to work with that?

---

<div class="post-metadata">

**Author:** ![Daniel\_Thayer](https://avatars.discourse-cdn.com/v4/letter/d/8dc957/32.png) [@Daniel\_Thayer](https://community.zeek.org/u/Daniel_Thayer)\
**Post date:** [November 29, 2017, 5:11pm UTC](https://community.zeek.org/t/broccoli-python/5112/3 "2017-11-29T17:11:23Z")

</div>

Does your system have both Python 2.x and Python 3.x installed?

When using any of the Bro python components, you must use the  
same version of Python that was used when building Bro (for example,  
if you build Bro with Python 3.5, then you must use Python 3.5 when  
running any of the Bro python components).

You could try something like this:  
&nbsp;&nbsp;&nbsp;python3 -c "import broccoli"

If that doesn't work, you could try exporting  
the PYTHONPATH environment variable like this:  
export PYTHONPATH=PREFIX/lib/broctl

Replace "PREFIX" with your Bro install prefix  
directory.

Also check that there is a file "broccoli\_intern.py"  
installed somewhere (it is normally in PREFIX/lib/broctl/).

---

<div class="post-metadata">

**Author:** ![Daniel\_Thayer](https://avatars.discourse-cdn.com/v4/letter/d/8dc957/32.png) [@Daniel\_Thayer](https://community.zeek.org/u/Daniel_Thayer)\
**Post date:** [November 29, 2017, 5:18pm UTC](https://community.zeek.org/t/broccoli-python/5112/4 "2017-11-29T17:18:45Z")

</div>

The most recent release (i.e., Bro 2.5.x) should work with Python3, but  
older releases most likely won't work with Python3.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/zeek/original/1X/f09d732bc2cc7c7cc7e35db67cf4e1d5233ce7a7.png) [@system](https://community.zeek.org/u/system)\
**Post date:** [May 6, 2022, 3:45pm UTC](https://community.zeek.org/t/broccoli-python/5112/5 "2022-05-06T15:45:26Z")

</div>


