0

Is it possible to add a library path for .whl files to sys.path via a commandline option for python executable to execute a python script file?

/path/to/python/executable/not/installed/in/system/python3 --modulespath "path/to/.whl/files/folder /path/to/my/script/file.py"

Gary
  • 2,293
  • 2
  • 25
  • 47
  • or you could pip install that `.whl` file and run it normally? – Beki May 01 '22 at 07:23
  • Probably Not. I am calling python executable from nodejs shell module and am using embedded python to run. I got stuck with this. I wanted to avoid adding `import sys; sys.append(path)` to all executable files. So avoiding pip usage and environment variables completely here. Can I put and use an envrionment variable for pip without a python installation in linux system – Gary May 01 '22 at 07:35
  • 1
    try [PYTHONPATH or PYTHONSTARTUP](https://docs.python.org/3/using/cmdline.html#envvar-PYTHONPATH) – Nullman May 01 '22 at 07:39

0 Answers0