Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

324
Views
While running python from nodeJS, program shows python module import error

This is part of my python code which works when executing by itself.

import firebase_admin
from firebase_admin import credentials, firestore
import nltk
import docx2txt
from pdfminer.high_level import extract_text
from analysis import get_tech_result, get_management_result, get_softskill_result, feedback

nltk.download('stopwords')
nltk.download('punkt')

cred = credentials.Certificate("service_key.json")
firebase_admin.initialize_app(cred)

However, when I try to run this code via node, with this code.

const { spawn } = require('child_process');

const childPython = spawn('python', ['resume_analysis/main.py']);

childPython.stdout.on('data', (data) => {
    console.log(`stdout: ${data}`);
});

childPython.stderr.on('data', (data) => {
    console.error(`stderr: ${data}`);
});

childPython.on('close', (code) => {
    console.log(`Child process exited with code: ${code}`);
});

It shows the following error:

stderr: Traceback (most recent call last):
  File "resume_analysis/main.py", line 2, in <module>
    import firebase_admin
ImportError: No module named firebase_admin

Child process exited with code: 1

Since I am new to JavaScript, I don't have much knowledge on why it is showing me errors since the python code itself works fine.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!