apache / apache/pulsar

ImportError: No module named _pulsar

Open
#14,386 3 comments 0 reactions 0 assignees View on GitHub
help wanted lifecycle/stale Stale
Dominant language
Java
Stars
15.3k
Forks
3.8k
Avg merge
1d 14h
Merged PRs (30d)
160

Description

#### Expected behavior

I'm just trying to execute the format-phone-number example in local
I'm using the Python3

I have installed the
pulsar 2.0.2
pulsar-client 2.9.1

I'm using bin/pulsar standalone (2.6.0)

I tried to localrun the pulsar function using the below command

bin/pulsar-admin functions localrun \
--broker-service-url pulsar://localhost:6650 \
--tenant public \
--namespace default \
--py /tmp/format-phone-number.zip \
--classname phoneValidation.TestEtl \
--inputs persistent://public/default/in \
--output persistent://public/default/out \
--log-topic persistent://public/default/log \
--state-storage-service-url bk://127.0.0.1:4181

after running the above command I got the following error

**File "/home/karthik/apache-pulsar-2.6.0/instances/python-instance/python_instance_main.py", line 36, in
import pulsar
File "/home/karthik/apache-pulsar-2.6.0/instances/python-instance/pulsar/__init__.py", line 102, in
import _pulsar
ImportError: No module named _pulsar**

Contributor guide

Open the contributing guide

Research direction

Start with instances/python-instance/python_instance_main.py and instances/python-instance/pulsar/__init__.py, then check how the installed pulsar and pulsar-client versions provide _pulsar for the Python 3 localrun path. Reproduce the command against the stated Pulsar 2.6.0 setup; done when the format-phone-number example starts locally without the ImportError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
distributed-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.