jackmckew / pyinstaller-action-linux Goto Github PK
View Code? Open in Web Editor NEWGithub Action for building executables with Pyinstaller for Linux
License: MIT License
Github Action for building executables with Pyinstaller for Linux
License: MIT License
My code contains PyQt5, I've successfully build it but when I tried to launch the executable file through terminal, this error showed up:
Traceback (most recent call last): File "main.py", line 1, in <module> ModuleNotFoundError: No module named 'PyQt5.sip' [8402] Failed to execute script main
Here is an example to reproduce the bug
Reproduce the functionality from: JackMcKew/pyinstaller-action-windows#15
Describe the bug
When this action attempts to install packages that require a later version of Python, pip fails, stopping the whole action.
To Reproduce
Steps to reproduce the behavior:
requirements.txt
file, include a package that does not run on Python versions prior to 3.8 (e.g. nextcord
).Expected behavior
The action completes successfully.
Error message
ERROR: Could not find a version that satisfies the requirement nextcord==2.0.0a3 (from versions: none)
ERROR: No matching distribution found for nextcord==2.0.0a3
Additional context
If there was a way to change which version of Python gets used, this would resolve the issue, as some projects only support the more recent versions of Python (e.g. my project expects 3.9 to be present).
I cannot get kivy to compile, it works fine for the windows version of this, but not for linux. I get
ERROR: Could not build wheels for Kivy, which is required to install pyproject.toml-based projects
which is probably caused by GL/gl.h: No such file or directory
. Google seems to think I need to install libgl1-mesa-dev
but I could not get it too install on my side. A flag like the tkinter one probably work if you don't want it to install for everyone who may not need it, but kivy is also big enough to justify dedicating its own flag.
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.
I think I found a bug
Causes by the *.spec
loader?
Maybe it relates to JackMcKew/pyinstaller-action-windows#19?
Version compatibility? build_main.py#l752?
I'm a starter programmer so I don't know what causes it...
I've set up a mini python project w/ everything under the root directory & the standard Python application workflow + pyinstaller-action-linux.
Then I got the following error while running the step Package Application:
Run JackMcKew/pyinstaller-action-linux@main
with:
path: .
pypi_url: https://pypi.python.org/
pypi_index_url: https://pypi.python.org/simple
env:
pythonLocation: /opt/hostedtoolcache/Python/3.8.5/x64
/usr/bin/docker run --name cbfc173e8ff88d40fdaedd3eb49ee07891_c6a113 --label 8118cb --workdir /github/workspace --rm -e pythonLocation -e INPUT_PATH -e INPUT_PYPI_URL -e INPUT_PYPI_INDEX_URL -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/volksschule/volksschule":"/github/workspace" 8118cb:fc173e8ff88d40fdaedd3eb49ee07891 "." "https://pypi.python.org/" "https://pypi.python.org/simple"
/entrypoint.sh: line 41: pip: command not found
I've tried both release 0.1.0 & main. Both had the same error.
Describe the bug
Base docker image is trying to pull packages from ancient and defunct Ubuntu repository.
Ign http://archive.ubuntu.com precise Release.gpg
Ign http://archive.ubuntu.com precise-updates Release.gpg
Ign http://archive.ubuntu.com precise-security Release.gpg
Ign http://archive.ubuntu.com precise Release
Ign http://archive.ubuntu.com precise-updates Release
Ign http://archive.ubuntu.com precise-security Release
Err http://archive.ubuntu.com precise/main Sources
404 Not Found [IP: 91.189.88.142 80]
Err http://archive.ubuntu.com precise/restricted Sources
404 Not Found [IP: 91.189.88.142 80]
Err http://archive.ubuntu.com precise/universe Sources
404 Not Found [IP: 91.189.88.142 80]
Err http://archive.ubuntu.com precise/main amd64 Packages
404 Not Found [IP: 91.189.88.142 80]
Err http://archive.ubuntu.com precise/restricted amd64 Packages
404 Not Found [IP: 91.189.88.142 80]
Err http://archive.ubuntu.com precise/universe amd64 Packages
404 Not Found [IP: 91.189.88.142 80]
Err http://archive.ubuntu.com precise/main i386 Packages
404 Not Found [IP: 91.189.88.142 80]
Err http://archive.ubuntu.com precise/restricted i386 Packages
404 Not Found [IP: 91.189.88.142 80]
Err http://archive.ubuntu.com precise/universe i386 Packages
404 Not Found [IP: 91.189.88.142 80]
Err http://archive.ubuntu.com precise-updates/main Sources
404 Not Found [IP: 91.189.88.142 80]
Err http://archive.ubuntu.com precise-updates/restricted Sources
404 Not Found [IP: 91.189.88.142 80]
Err http://archive.ubuntu.com precise-updates/universe Sources
404 Not Found [IP: 91.189.88.142 80]
Err http://archive.ubuntu.com precise-updates/main amd64 Packages
404 Not Found [IP: 91.189.88.142 80]
Err http://archive.ubuntu.com precise-updates/restricted amd64 Packages
404 Not Found [IP: 91.189.88.142 80]
Err http://archive.ubuntu.com precise-updates/universe amd64 Packages
404 Not Found [IP: 91.189.88.142 80]
Err http://archive.ubuntu.com precise-updates/main i386 Packages
404 Not Found [IP: 91.189.88.142 80]
Err http://archive.ubuntu.com precise-updates/restricted i386 Packages
404 Not Found [IP: 91.189.88.142 80]
Err http://archive.ubuntu.com precise-updates/universe i386 Packages
404 Not Found [IP: 91.189.88.142 80]
Err http://archive.ubuntu.com precise-security/main Sources
404 Not Found [IP: 91.189.88.142 80]
Err http://archive.ubuntu.com precise-security/restricted Sources
404 Not Found [IP: 91.189.88.142 80]
Err http://archive.ubuntu.com precise-security/universe Sources
404 Not Found [IP: 91.189.88.142 80]
Err http://archive.ubuntu.com precise-security/main amd64 Packages
404 Not Found [IP: 91.189.88.142 80]
Err http://archive.ubuntu.com precise-security/restricted amd64 Packages
404 Not Found [IP: 91.189.88.142 80]
Err http://archive.ubuntu.com precise-security/universe amd64 Packages
404 Not Found [IP: 91.189.88.142 80]
Err http://archive.ubuntu.com precise-security/main i386 Packages
404 Not Found [IP: 91.189.88.142 80]
Err http://archive.ubuntu.com precise-security/restricted i386 Packages
404 Not Found [IP: 91.189.88.142 80]
Err http://archive.ubuntu.com precise-security/universe i386 Packages
404 Not Found [IP: 91.189.88.142 80]
To Reproduce
Steps to reproduce the behavior:
- name: Package Application
uses: JackMcKew/pyinstaller-action-linux@tkinter
with:
path: src
Describe the bug
I have a python script that uses tkinter to provide a simple file dialog and message box. When I test and build locally with pyinstaller to generate the spec file, the executable works fine. building in the github action succeeds, but the executable created doesn't work, giving the error:
Traceback (most recent call last):
File "tcg-to-deckbox.py", line 6, in <module>
File "/root/.pyenv/versions/3.7.5/lib/python3.7/site-packages/PyInstaller/loader/pyimod03_importers.py", line 623, in exec_module
File "tkinter/__init__.py", line 36, in <module>
ModuleNotFoundError: No module named '_tkinter'
To Reproduce
I ran with the following github action flow
# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
# additionally allows a manual trigger via workflow_dispatch
on:
workflow_dispatch:
types: ManualUpdate
push:
branches: [ master ]
pull_request:
branches: [ master ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: PyInstaller Linux
uses: JackMcKew/[email protected]
with:
path: src
- uses: actions/upload-artifact@v2
with:
name: tcg-to-deckbox
path: src/dist/linux
successful.log
failure_logs_17.zip
As you'll note from the attached logs, the one where the executable functions has the line 3120 INFO: Loading module hook 'hook-_tkinter.py' from '/home/rspremulli/.local/lib/python3.6/site-packages/PyInstaller/hooks'...
while the github action doesn't. Is there some issue why it won't load the tkinter module?
Do I use "." as the source code path or...?
I know it's not great practice, but I'm not redoing my file structure; it's bound to break something.
Describe the bug
I use pyinstaller-action-windows which builds WxPython based package successfully,
However I'm running into issues building for Linux.
I can build it locally on Ubuntu 20.04 but not with pyinstaller-action-linux on Github.
You can see the error here.
Building wheels for collected packages: wxPython, PyInstaller, pillow, MarkupSafe
Building wheel for wxPython (setup.py): started
Building wheel for wxPython (setup.py): finished with status 'error'
error: subprocess-exited-with-error
Running setup.py clean for wxPython
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [139 lines of output]
/root/.pyenv/versions/3.7.5/lib/python3.7/site-packages/setuptools/dist.py:760: UserWarning: Usage of dash-separated 'license-file' will not be supported in future versions. Please use the underscore name 'license_file' instead
% (opt, underscore_opt)
/root/.pyenv/versions/3.7.5/lib/python3.7/site-packages/setuptools/dist.py:303: DistDeprecationWarning: use_2to3 is ignored.
warnings.warn(f"{attr} is ignored.", DistDeprecationWarning)
running bdist_wheel
running build
WARNING: Building this way assumes that all generated files have been
generated already. If that is not the case then use build.py directly
to generate the source and perform the build stage. You can use
--skip-build with the bdist_* or install commands to avoid this
message and the wxWidgets and Phoenix build steps in the future
To Reproduce
Steps to reproduce the behavior:
If this is not a bug and I'm doing something wrong, I appreciate any guidance that helps me resolve this issue.
PS: Another question, is it possible to build of MacOS as well
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.