JackMcKew / pyinstaller-action-linux

Github Action for building executables with Pyinstaller for Linux
MIT License
28 stars 21 forks source link

ModuleNotFoundError: No module named 'requests' #6

Closed pranjal-joshi closed 3 years ago

pranjal-joshi commented 3 years ago

Hello,

This Github action successfully compiles the script and generates binary file but running the binary file throws following error: ModuleNotFoundError: No module named 'requests'

Here is my requirements.txt:

...
requests # Installed as dependency for yfinance, cachecontrol
...

Here is my .spec file: https://github.com/pranjal-joshi/Screeni-py/blob/pre-main/src/screenipy.spec

Observation: Also I've observed that size of compiled binaries is very small (approx 6MB). However, the size of compiled binary on my local machine is around 31MB which is working fine without any error.

JackMcKew commented 3 years ago

pyinstaller-action-linux looks within the src directory for the requirements.txt file, while yours seems to be in the root, hope this helps :)

JackMcKew commented 3 years ago

I note that a PR was made for the requirements file path to be configurable for the windows equivalent: https://github.com/JackMcKew/pyinstaller-action-windows/pull/15 but I haven't got around to bringing it to this action

pranjal-joshi commented 3 years ago

pyinstaller-action-linux looks within the src directory for the requirements.txt file, while yours seems to be in the root, hope this helps :)

Ok. This helps. But, I have a new problem. I need to set up a dependency named TA-lib. For that, I need to run the following commands in the shell before executing pyinstaller.

$ tar -xzf ta-lib-0.4.0-src.tar.gz
$ cd ta-lib/
$ ./configure --prefix=/usr
$ make
$ sudo make install

So, How can I do it with your GitHub action?

pranjal-joshi commented 3 years ago

pyinstaller-action-linux looks within the src directory for the requirements.txt file, while yours seems to be in the root, hope this helps :)

Ok. This helps. But, I have a new problem. I need to set up a dependency named TA-lib. For that, I need to run the following commands in the shell before executing pyinstaller.

$ tar -xzf ta-lib-0.4.0-src.tar.gz
$ cd ta-lib/
$ ./configure --prefix=/usr
$ make
$ sudo make install

So, How can I do it with your GitHub action?

Hello, Thanks for the great action! But I have shifted to my custom workflow as my dependency setup is a bit weird to setup with this action.

Though, it would be great if you add an argument through which we can run commands to setup dependencies for windows, ubuntu and mac.

You may close this issue. Thanks.