0

I developed a script in Python which I was planning to send to multiple servers as a utility, so I decided the best way to do it is compile it as a executable file so everything I have to send is a single file, for that I'm using Cython with these commands:

#!/bin/bash

cp scan.py scan.pyx
cython scan.pyx --embed
gcc -Os -I /usr/include/python3.7m/ -o scan scan.c -lpython3.7m -lpthread -lm -lutil -ldl

That script (scan.py) uses certain dependencies (installed with pip3), such as python-nmap and colorama. When I tested sending the executable I was greeted with an error that says it does not find such python modules, which I thought cython embedded in the file, but apparently it doesn't. Is it possible to compile it with those modules?

MauJFernandez
  • 346
  • 1
  • 4
  • 17
  • 1
    In your case there are more than two modules, but that doesn't change much. The usefull answer in the duplicate is this one: https://stackoverflow.com/a/59389683/5769463 ""don't do this" is probably the best solution for the vast majority of people." – ead Jun 19 '20 at 14:10
  • Well, that's a shame, thanks! – MauJFernandez Jun 19 '20 at 20:33

0 Answers0