Comments (5)
Hi SkysurferKon,
Thank you for taking the time to report an issue.
Can you show me an example of script causing this issue ?
Do you mean that an error is thrown as soon as you are importing the library ?
Also if you could provide the python version used and the platform (windows ?)
It is highly recommended to use PIP for installing this library.
Check your python version first to make sure you have any of this version (3.6, 3.7, 3.8, 3.9, 3.10)
Then run the following command from the dos interpreter (cmd):
C:\>pip install PygameShader
If you have a different version you will see this type of error :
C:\...AppData\Local\Programs\Python\Python35\Scripts>pip install PygameShader
Collecting PygameShader
Cache entry deserialization failed, entry ignored
Could not find a version that satisfies the requirement PygameShader (from versions: )
No matching distribution found for PygameShader
To use the Gaussian blur you would normally import the method shader_blur5x5_array24_inplace from | blur
the library such as:
In Python :
for version < 1.0.3
import PygameShader
from PygameShader import shader_blur5x5_array24_inplace
for version > 1.0.3
import PygameShader
from PygameShader import blur
OR
To load all the methods from the library
import PygameShader
from PygameShader import *
This Error : no module named gaussianblur5x5
tells me that the cython file gaussianblur5x5
is either missing
or not cynthonize (compile for your environment or python version).
If you are using PIP to install PygameShader on Python version > 3.6 you would normally never see that issue as the PIP download the package with all the code already compile for your environment (PIP will detect automatically the right version
and download it for you, version 3.6, 3.7, 3.8, 3.9, 3.10).
This issue can eventually happen if you are trying to build the library from the source code using
C:\>python setup_shader.py build_ext --inplace
The line above will try to compile the cython code from the PYX files
- misc.pyx
- gaussianBlur5x5.pyx
- shader.pyx
and compare the cython declaration with shader.pxd header file
The compilation will fail if you are missing any of this file
For info the Github version of the code does not include the PYX files. Nevertheless theses
file are included in the PIP versions
from pygameshader.
.
from pygameshader.
Thanks for writing this detailed explanation! Is PygameShader compatible with a PyInstaller "--onefile" exe file?
from pygameshader.
Hi,
If you are looking for an automatic installer, the best way to install this library is to use the well known
pip install PygameShader==1.0.4
If you are a bit more adventurous you can also download the git source code and compile the library from source
But to answer your question regarding the PyInstaller program , I would say yes, PygameShader is compatible with PyInstaller even though I never tried to use PyInstaller since this is a cython/python library that does not include any hook file but uses an external library that load with an import statement
I used PyInstaller in the past for various project including project with C & Cython & python codes and would generate an executable file. In order to create a single file you would have to tweak and configure PyInstaller to know where to find all the source code, binaries and images that needs to be attached to the executable.
from pygameshader.
Another utility that could perform the same task would be to use the great program call Inno Setup
. This will do the same and build an executable file containing all the directories and source code etc. The advantage of Inno setup
is to be able to de-install the project as you would normally do for commercial programs as an optional feature
from pygameshader.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pygameshader.