[PyInstaller] Re: Starts at root on the Desktop

2024-10-07 Thread bwoodsend
I'm assuming that by .py files "knowing where they're located" you're 
talking about current working directories being set to the location of the 
script. .py files don't set their working directories to where they're 
located -- they just inherit a working directory from the terminal/IDE that 
launched them which can be anywhere but is probably somewhere close to the 
script. (If your code assumes that the working directory is where the 
script is then it's broken.) When an application is launched by the 
desktop, it inherits the launch daemon's working directory of root. 
PyInstaller doesn't and isn't going to interfere with how desktops launch 
applications.

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/f2c1de27-53b2-4ecd-9fc0-b58ff2ed60b8n%40googlegroups.com.


[PyInstaller] Re: can't run behind a proxy

2024-09-27 Thread bwoodsend
This has nothing to do with PyInstaller?

On Friday, September 27, 2024 at 3:08:08 PM UTC+1 f.sim...@gmail.com wrote:

>
> *Hi,trying to run this simple script:*
> import sys
> import os
> import requests
> from office365.runtime.auth.authentication_context import 
> AuthenticationContext
> from office365.sharepoint.client_context import ClientContext
>
> from office365.runtime.auth.client_credential import ClientCredential
> from office365.runtime.http.request_options import RequestOptions
>
>
> baseurl = sys.argv[1]
> basesite = sys.argv[2]
> siteurl = baseurl + basesite
>
> remotepath = sys.argv[3]
>
> file_name = sys.argv[4]
> file_content = sys.argv[5]
> client_id_site = os.getenv('client_id')
> client_secret_site = os.getenv('client_secret')
>
>
> def set_proxy(request):
> proxies = {siteurl:'http://xxx.xxx.90.15:443' }
> request.proxies = proxies
> 
>
> def disable_ssl(request):
> request.verify = False  # Disable certification verification
>
>
> def sh_upload():
>
> pasta,name = os.path.split(remotepath)
>
> ctx_auth = AuthenticationContext(siteurl) # should also be the siteurl
> ctx_auth.acquire_token_for_app(client_id_site, client_secret_site)
> ctx = ClientContext(siteurl, ctx_auth) # make sure you auth to the 
> siteurl.
>
> 
> ctx.pending_request().beforeExecute += set_proxy ##
> ctx.pending_request().beforeExecute += disable_ssl ##
>
> file = ctx.web.get_folder_by_server_relative_url(pasta).upload_file(
> file_name, file_content).execute_query()
> return file
>
> if __name__ == '__main__':
> res = sh_upload()
> print(res)
>
> *Runs fine on a network without proxy, but in the internal network behind 
> a proxy fail with this message:*
> Traceback (most recent call last):
>   File 
> "/opt/tkapp/env_airflow/lib64/python3.9/site-packages/urllib3/connection.py", 
> line 174, in _new_conn
> conn = connection.create_connection(
>   File 
> "/opt/tkapp/env_airflow/lib64/python3.9/site-packages/urllib3/util/connection.py",
>  
> line 72, in create_connection
> for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
>   File "/usr/lib64/python3.9/socket.py", line 954, in getaddrinfo
> for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
> socket.gaierror: [Errno -2] Name or service not known
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
>   File 
> "/opt/tkapp/env_airflow/lib64/python3.9/site-packages/urllib3/connectionpool.py",
>  
> line 716, in urlopen
> httplib_response = self._make_request(
>   File 
> "/opt/tkapp/env_airflow/lib64/python3.9/site-packages/urllib3/connectionpool.py",
>  
> line 404, in _make_request
> self._validate_conn(conn)
>   File 
> "/opt/tkapp/env_airflow/lib64/python3.9/site-packages/urllib3/connectionpool.py",
>  
> line 1061, in _validate_conn
> conn.connect()
>   File 
> "/opt/tkapp/env_airflow/lib64/python3.9/site-packages/urllib3/connection.py", 
> line 363, in connect
> self.sock = conn = self._new_conn()
>   File 
> "/opt/tkapp/env_airflow/lib64/python3.9/site-packages/urllib3/connection.py", 
> line 186, in _new_conn
> raise NewConnectionError(
> urllib3.exceptions.NewConnectionError:  object at 0x7fd8ee90d3d0>: Failed to establish a new connection: [Errno -2] 
> Name or service not known
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
>   File 
> "/opt/tkapp/env_airflow/lib64/python3.9/site-packages/requests/adapters.py", 
> line 667, in send
> resp = conn.urlopen(
>   File 
> "/opt/tkapp/env_airflow/lib64/python3.9/site-packages/urllib3/connectionpool.py",
>  
> line 802, in urlopen
> retries = retries.increment(
>   File 
> "/opt/tkapp/env_airflow/lib64/python3.9/site-packages/urllib3/util/retry.py", 
> line 594, in increment
> raise MaxRetryError(_pool, url, error or ResponseError(cause))
> urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='
> kyndrylde.sharepoint.com', port=443): Max retries exceeded with url: 
> /teams/PortugalPHC (Caused by 
> NewConnectionError(' 0x7fd8ee90d3d0>: Failed to establish a new connection: [Errno -2] Name or 
> service not known'))
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
>   File 
> "/home/ttauto/.local/lib/python3.9/site-packages/office365/runtime/auth/providers/acs_token_provider.py",
>  
> line 45, in get_app_only_access_token
> realm = self._get_realm_from_target_url()
>   File 
> "/home/ttauto/.local/lib/python3.9/site-packages/office365/runtime/auth/providers/acs_token_provider.py",
>  
> line 88, in _get_realm_from_target_url
> response = requests.head(url=self.url, headers={"Authorization": 
> "Bearer"})
>   File 
> "/opt/tkapp/env_airflow/lib64/python3.9/site-packages/requests/api.py", 
> line 100, in head
> return request("head", url, **kwargs)
>   File 
> "/opt/tkapp/

[PyInstaller] Re: Python app works under Visual Studio but fails as .exe

2024-09-23 Thread bwoodsend


Following the line numbers to the source code is the best you can hope for 
with custom/uninformative exceptions like this. In this case, the exception 
is raised if some stdout doesn’t match a certain pattern 
.
 
That stdout comes from dump() 

 
which calls aapt 

 
which invokes an aapt2\bin\Windows\aapt2.exe 

 
executable but using the rather evil subprocess.getoutput() 

 
which has zero error handling. Without that error handling, the the aapt() 
function doesn’t even notice if aapt2.exe is missing and blindly returns 
the string Can't recognise '...\aapt2.exe ... as an internal or external 
command, or batch script..

So tl;dr, you’ll need to make sure that aapt2.exe gets into your 
application. i.e. Add --collect-datas=aapt2 to your build command.

But I’d get away from this library if I were you. Not only does it have 
this lack of error handling but it also breaks if the path to your .apk 
file contains spaces.
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/3620ac3a-795f-4403-88c9-1b5c9f4e7f73n%40googlegroups.com.


[PyInstaller] Re: Pyinstaller + Matplotlib -> export to PDF

2024-08-26 Thread bwoodsend


Matplotlib’s array of interchangeable backends model is fairly ambiguous to 
PyInstaller — particularly if you want more than one backend. Telling 
PyInstaller which backends you want 
 
straightens it out.
# In your spec file a = Analysis( ... hooksconfig={ "matplotlib": { 
"backends": ["TkAgg", "pdf"], } }, ... ) 

That said, just adding a dumb --hiddenimport=matplotlib.backends.backend_pdf 
to the build command does the trick for me too.
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/2c8bd6a7-8453-4072-b0fa-5f32a01188a2n%40googlegroups.com.


[PyInstaller] Re: PyInstaller + Inno Setup fails on github actions

2024-08-23 Thread bwoodsend
Your project structure is somewhat defunct. Those `src/__init__.py` and 
`src/__main__.py` files imply that `src` is a package and `yaas.py` is the 
submodule `src.yaas`. That's reflected in the wheels on PyPI which are 
installing `__init__.py` et al directly into `site-packages`.

I'm guessing you really want a package called `yaas` in which case you'd 
insert a `yaas` directory (e.g. `src/yaas/__init__.py`) (personally I'd 
ditch the `src` and just use `yaas/__init__.py`) then adjust all the 
internal imports to use `from yaas import worker` instead of `import 
worker`.

Once you've made that change and dealt with all the collateral damage that 
the refactor causes, PyInstaller should stop objecting to your modules not 
being where they're supposed to be.

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/4c9f0ba1-36dd-46f7-a381-86e94721b902n%40googlegroups.com.


[PyInstaller] Re: Runtime error caused by importing numpy

2024-08-19 Thread bwoodsend


Importing numpy (albeit with 2.0.1 
)
 
on Windows with Python 3.12 is part of PyInstaller’s and numpy’s test 
suites so your environment or something you’re doing must be an outlier 
here. Is anaconda involved by any chance?
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/eb1f6e5c-0370-4ab0-a94d-98dd7398326an%40googlegroups.com.


[PyInstaller] Re: AttributeError:"super" object has no attribute "get_params"

2024-08-15 Thread bwoodsend


The attribute error comes from this placeholder class 

 
which is used if one of these sklearn imports 

 
fail. The placeholder class is a bug in LightGBM’s optional dependency 
handling but that’s only obfuscating the real issue which is figuring out 
why those sklearn imports fail in the first place. The easiest way to do 
that would be to edit your local copy of LightGBM, inserting a raise here 

 
then rebuild and post the new error message here.
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/39a53a97-f0bc-4f3f-a7b7-0346224e9182n%40googlegroups.com.


[PyInstaller] Re: PyQt6 with Pyinstaller Runtime Error

2024-08-11 Thread bwoodsend


I homed in on it because any piece of code that uses a relative path to 
locate an application resource is broken (it’s relative to your current 
working directory which could be anywhere, not the application root, but 
IDEs hide this bug by setting your current working directory to the 
location of your code) and that false assumption gets flushed out pretty 
quickly when you run PyInstaller on it. If you’re not convinced, try 
opening or cd-ing a terminal somewhere far away from your original python 
code and running python /full/path/to/your/code.py. I expect that you’ll 
get the same error.

To be clear, what I think is happening is that Qt can’t find that QML file, 
whether you correctly packaged it or not, for the reasons described above. 
Qt doesn’t raise an error (although it does print a warning) so the code 
continues on but it never managed to load any UI objects from the QML file 
so engine.rootObjects() is an empty list and that’s why you’re getting an 
IndexError on that line.
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/5db0cd9b-8abd-4fba-b99e-57aba79ba336n%40googlegroups.com.


[PyInstaller] Re: PyQt6 with Pyinstaller Runtime Error

2024-08-10 Thread bwoodsend


Your bug is the line engine.load('./UI/main.qml') (although the issue is 
masked by the fact that Qt doesn’t raise an error if it can’t load a file). 
Relative paths to locate application resources are not portable. I suggest 
you change that line to:
qml_path = './UI/main.qml' if not os.path.exists(qml_path): raise 
FileNotFoundError(qml_path) engine.load(qml_path) 

which will not fix your issue but it will give you a proper error message. 
Then read the docs 
 for 
what qml_path should really be set to.
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/ed65fe47-ecc3-4350-8f26-3b872f0e0c2an%40googlegroups.com.


[PyInstaller] Re: Dynamic list of modules in a package

2024-08-09 Thread bwoodsend


pkgutil.iter_modules() doesn’t require Python files on the file system. The 
problem is that PyInstaller doesn’t know to collect these submodules at 
all. Use --collect-submodules=conversionAlgos to fix that although you 
almost certainly will run into #6294 
 so you’ll have to 
use one of the workarounds from there.
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/594aed0c-29ae-40cf-b32f-fae7fc67f5dan%40googlegroups.com.


Re: [PyInstaller] ValueError: Unable to configure formatter 'default'

2024-08-03 Thread bwoodsend


On a semi-related note, I think we need to reword that piece of 
documentation 
.
 
The recommended approach is to wrap your own usages of sys.stderr and 
sys.stdout in *is not None* checks and to encourage offending libraries to 
do the same. The os.devnull hack is suggested only as a last resort in case 
library maintainers refuse to add their own guards. However, everyone seems 
to be misinterpreting it as the recommended fix.
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/c7418230-908c-4988-8044-0bf678b70ae4n%40googlegroups.com.


Re: [PyInstaller] ValueError: Unable to configure formatter 'default'

2024-08-02 Thread bwoodsend


But is it possible that PyInstaller could do it by default for Windows apps?

I’d be rather raise the question of why doesn’t pythonw.exe do it by 
default.

We don’t particularly like adding accommodations for broken code and, with 
Python’s current handling of windowed mode (even though almost no one 
realises that it exists), any direct access to the standard pipes without 
checking they’re not None is broken code.
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/87666575-18c8-4e6e-8865-043fa80a656cn%40googlegroups.com.


[PyInstaller] Re: How to deliver a Mac App bundle

2024-07-26 Thread bwoodsend


Does this 

 
answer you question?
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/82caf4b2-f88c-4a6c-b4c0-baf3fffca4ffn%40googlegroups.com.


[PyInstaller] Re: DLL load failed while importing _ctypes

2024-07-16 Thread bwoodsend
All bugs are features if you're using anaconda.

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/6cfa3419-eb2e-4662-8b8e-17fa831c1967n%40googlegroups.com.


[PyInstaller] Re: using own ld-linux loader in onedir mode

2024-07-16 Thread bwoodsend
Any reason why you can't just use staticx or build on an old Docker 
container to make your application portable? I doubt anyone wants to 
support this case.

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/0317b4e0-1bed-4a2d-9b69-528a67bd3596n%40googlegroups.com.


[PyInstaller] Re: Getting AssertionError in bindepend.get_python_library_path

2024-07-12 Thread bwoodsend
And how did you install Python and PyInstaller?

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/21c6bf02-ce31-427a-947c-324c6b40a36en%40googlegroups.com.


[PyInstaller] Re: Getting AssertionError in bindepend.get_python_library_path

2024-07-11 Thread bwoodsend


What Linux distribution is this and how did you install Python and 
PyInstaller?

Whilst it shouldn’t be raising assertion errors, generally whenever 
something goes wrong in get_python_library_path(), it means that your 
Python environment doesn’t provide libpython3.x.so so it’s unusable to 
PyInstaller anyway. If everything had gone smoothly, you’d probably just be 
looking at this error 

 
instead.
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/7b7e74c4-3bef-4079-a430-f2a92e735264n%40googlegroups.com.


[PyInstaller] Re: ModuleNotFoundError: no module named 'numpy'

2024-07-01 Thread bwoodsend
If you're using ChatGPT at all then I'd ask to you stay off these support 
channels. No one wants to spend their time sifting through the utter 
nonsense that AI calls code.

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/ed22fafc-3428-470f-b113-58318312e754n%40googlegroups.com.


[PyInstaller] Re: ModuleNotFoundError: no module named 'numpy'

2024-06-30 Thread bwoodsend


If I’m reading this right, you’ve got raw .py scripts in the src folder and 
presumably you’re running them as subprocesses using something akin to 
subprocess.run(["python", 
"src/IO_Analysis.py"]) or possibly something involving exec()? So you’re 
giving code to PyInstaller as data files so it has no idea that it needs to 
scan them for dependencies and you’re invoking that code using a random 
Python interpreter instead of the one PyInstaller collected so even if 
PyInstaller did know to collect numpy, you wouldn’t be able to use it 
anyway.

I suggest that you stop trying to structure your code like a C++ project. 
Move everything out of src and into the top level of your project then use 
import 
IO_Analysis; IO_Analysis.do_something() instead of whatever you're using to 
invoke the other scripts. Or better yet, learn how to properly structure 
Python projects 
.
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/60218cae-e189-405d-95c8-4f8dcef8c50cn%40googlegroups.com.


[PyInstaller] Re: ModuleNotFoundError: No module named 'numpy.f2py'

2024-06-28 Thread bwoodsend


Then add --hiddenimport=scipy._lib.array_api_compat.numpy.fft too
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/56da02a1-601b-4bd3-9da5-d5f0844f5b2cn%40googlegroups.com.


[PyInstaller] Re: ModuleNotFoundError: No module named 'numpy.f2py'

2024-06-27 Thread bwoodsend


Just add --collect-submodules=numpy.f2py to your pyinstaller command
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/c029f880-614d-42bc-bf5c-5bb9f1c0677bn%40googlegroups.com.


[PyInstaller] Re: ModuleNotFoundError: No module named 'my_module'

2024-05-23 Thread bwoodsend


Because its real name is scraper.scrap_crawlers. (And please get rid of 
that os.chdir(). It shouldn’t be there.)
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/c7206745-cf97-43e9-bba6-9704bea9e8d2n%40googlegroups.com.


[PyInstaller] Re: Error message "OSError(22, 'Invalid argument')" during build

2024-05-21 Thread bwoodsend


That retry logic is trying to accommodate for security scans that intercept 
the EXE that PyInstaller is midway through building and temporarily block 
PyInstaller’s access to it. I guess the easiest thing to try would be to 
increase the timeout (e.g. change the first 1 

 
to a 5.
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/599c82d1-9baa-459e-a374-e65b13cab933n%40googlegroups.com.


[PyInstaller] Re: Issue running the exe: No Module named '_jpype'

2024-05-19 Thread bwoodsend


I’m not seeing any issues with just an import jpype (which includes loading 
the _jpype module).
>python -VV Python 3.11.7 (tags/v3.11.7:fa7a6f2, Dec 4 2023, 19:24:49) [MSC 
v.1937 64 bit (AMD64)] >python -m venv env >.\env\Scripts\activate.bat 
(env) >pip install jpype1 pyinstaller (env) C:\tmp\jpype-test>pip freeze 
altgraph==0.17.4 JPype1==1.5.0 packaging==24.0 pefile==2023.2.7 
pyinstaller==6.6.0 pyinstaller-hooks-contrib==2024.6 pywin32-ctypes==0.2.2 
(env) >echo import jpype; print(jpype._jpype) > test.py (env) >pyinstaller 
test.py (env) >.\dist\test\test.exe  
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/3b3efe05-fc0b-439c-bd4b-b57203021c66n%40googlegroups.com.


[PyInstaller] Re: Issue running the exe: No Module named '_jpype'

2024-05-17 Thread bwoodsend


--hiddenimport=_jpype is the flag for missing modules.
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/f7b4252e-0afc-46d2-901a-89de2990e5b4n%40googlegroups.com.


[PyInstaller] Re: REgarding pyinstaller and tkinter app packaging

2024-04-04 Thread bwoodsend


I also did not have the wheel package in my pip packages. Is that required? 
It looks like a packaging format.

It prevents pip from installing .sdist packages in the broken *legacy mode* 
(a.k.a. eggs/zipped eggs). Pip has since changed that behaviour so its need 
should become less prominent with time as people stop using versions of pip 
that predate that change. In this case, all packages were already in .whl 
format so removing wheel wouldn’t have done any harm.
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/61ef21dc-e511-4d32-b9c1-569e96b10cddn%40googlegroups.com.


[PyInstaller] Re: REgarding pyinstaller and tkinter app packaging

2024-04-03 Thread bwoodsend


Is just import tkinter on its own enough to trigger the issue? I’ve tried 
it in a Void Linux (and I blindly assumed glibc rather than musl based?) 
docker container and I’m seeing no signs of trouble.
> docker run --network=host -v(pwd):/io -it 
ghcr.io/void-linux/void-linux:latest-mini-x86_64 # xbps-install -Syu xbps 
bash # bash bash-5.2# cd /io/ bash-5.2# xbps-install -y python3-xlib 
python3-six python3-tkinter binutils bash-5.2# python -m venv 
--system-site-packages env bash-5.2# . ./env/bin/activate (env) bash-5.2# 
python -m pip install -U pip wheel setuptools (env) bash-5.2# pip install 
pyinstaller (env) bash-5.2# pip freeze altgraph==0.17.4 packaging==24.0 
pyinstaller==6.5.0 pyinstaller-hooks-contrib==2024.3 python-xlib==0.33 
setuptools==69.2.0 six==1.16.0 wheel==0.43.0 (env) bash-5.2# echo 'import 
tkinter; print("I have not crashed!")' > test.py (env) bash-5.2# 
pyinstaller test.py (env) bash-5.2# ./dist/test/test I have not crashed! 
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/7e06c3ae-49b7-48d0-819e-1dc9fcc370f5n%40googlegroups.com.


[PyInstaller] Re: Unable to even run pyinstaller - pkg_resources.DistributionNotFound: The 'altgraph' distribution was not found and is required by the application

2024-04-03 Thread bwoodsend


I’m guessing you get the same error just running python -c "from 
altgraph.ObjectGraph import ObjectGraph"? Sounds more like a butchered 
altgraph install than anything to do with PyInstaller. Best I can suggest 
is to upgrade pip, wheel and setuptools then uninstall and reinstall 
altgraph.
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/5e27b74d-755a-4227-a340-9850f7d8bfcen%40googlegroups.com.


[PyInstaller] Re: REgarding pyinstaller and tkinter app packaging

2024-04-03 Thread bwoodsend
Can we get the runtime error message? And what distribution+version is this?

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/0dc4fc21-0d4b-44f3-a516-1de2b98496e6n%40googlegroups.com.


[PyInstaller] Re: Streamlit app

2024-04-02 Thread bwoodsend


sys.argv.append(‘main_st.py’)

Arhhh! See standard reply 
.
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/bb9516d7-7e2c-4bc0-a2be-edc96dcba925n%40googlegroups.com.


[PyInstaller] Re: Streamlit app

2024-03-29 Thread bwoodsend


Never try to run a Python command line entry point from a subprocess. Even 
without PyInstaller involved, there’s no guarantee that it’ll be findable. 
Lookup what the entry point does (in this case calling from 
streamlit.web.cli.main() 

 
and put that in your code instead.
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/5c7450b4-bc1b-48f8-91f5-40b018a61e0an%40googlegroups.com.


Re: [PyInstaller] Re: How to debug why share/icons folder get included

2024-03-25 Thread bwoodsend


There are some special options 

 
for excluding the bits of Gtk that you don’t want. Although I’m surprised 
that you can’t use Kivy to create the message dialogues.
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/aaf1d649-d1e9-4c99-822b-b1612cf9667fn%40googlegroups.com.


[PyInstaller] Re: How to debug why share/icons folder get included

2024-03-23 Thread bwoodsend


Hmm, it’s expected that knowing where a file came from (which you can find 
in the various build/*/*.toc files) is enough to answer that question. 
Failing that, I guess you could look at the INFO: Loading module hook 
'hook-xxx.py' from '.../PyInstaller/hooks and read those hook files to see 
if you can find anything that looks like it’s trying to add /usr/shared/* 
directories to datas.

Most likely though, it’ll be Gtk related. That requires an unpleasant 
amount of stuff to function.
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/0d33dcda-2ad5-487d-a524-b5757c9c09dan%40googlegroups.com.


Re: [PyInstaller] Set interpreter when creating executable

2024-03-07 Thread bwoodsend


If you expect to use a Python interpreter on the user’s machine then 
PyInstaller is completely the wrong tool. Assuming that Python interpreter 
is at a fixed location, you’re probably better off shipping your raw Python 
code along with a .bat file along the lines of:
cd /D "%~dp0" "C:\Program 
Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\python.exe" your-code.py 
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/9bde9ad4-1c77-49d5-ad56-2fbb2f812dfen%40googlegroups.com.


[PyInstaller] Re: Issue running the exe (Part 2)

2024-03-07 Thread bwoodsend


For ModuleNotFoundErrors use --hidden-import=photutils.geometry.core
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/d627edf7-6297-4a0a-bf1b-4a0bd7a8af53n%40googlegroups.com.


[PyInstaller] Re: Please help with the hidden imports issues with django

2024-02-28 Thread bwoodsend


Please could you tell me what am I doing wrong? 

Trying to freeze a web server for one. 🙃

You’re chasing the wrong issue here. Django contains many submodules which 
can’t be loaded unless you have some strange stuff installed on your 
machine. PyInstaller collects each submodule only if its loadable which 
leads to a 18596 WARNING: Hidden import 
"django.contrib.sessions.templatetags" not found! message for each 
submodule that isn’t. You appear to has been misled into trying to force 
PyInstaller to collect those unusable (and unneeded) submodules which has 
led to the warnings being promoted to errors and has done nothing to fix 
the real runtime issue which I’m guessing is this one?
Traceback (most recent call last): File "manage.py", line 22, in  
main() File "manage.py", line 18, in main 
execute_from_command_line(sys.argv) File 
"django/core/management/__init__.py", line 442, in 
execute_from_command_line File "django/core/management/__init__.py", line 
436, in execute File "django/core/management/base.py", line 413, in 
run_from_argv File "django/core/management/commands/runserver.py", line 74, 
in execute File "django/core/management/base.py", line 459, in execute File 
"django/core/management/commands/runserver.py", line 111, in handle File 
"django/core/management/commands/runserver.py", line 118, in run File 
"django/utils/autoreload.py", line 673, in run_with_reloader File 
"PyInstaller/hooks/rthooks/pyi_rth_django.py", line 24, in 
_restart_with_reloader File "django/utils/autoreload.py", line 272, in 
restart_with_reloader File "django/utils/autoreload.py", line 259, in 
get_child_arguments RuntimeError: Script runserver does not exist. [1326876] 
Failed to execute script 'manage' due to unhandled exception! 

That is caused by django trying to auto reload your code whenever it 
changes which makes no sense under PyInstaller since the code is frozen and 
not even visible on the file system. The fix is to pass --noreload.
python -m django startproject hellodjango cd hellodjango/ pyinstaller 
manage.py ./dist/manage/manage runserver --noreload 
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/3e5bf22c-d3ce-49e2-9374-a18ac117a876n%40googlegroups.com.


[PyInstaller] Re: Pyinstaller exe file is not working .

2024-02-21 Thread bwoodsend


Top level ModuleNotFoundErrors normally mean you’re running PyInstaller 
from the wrong Python environment. Try running your original Python code 
from a terminal using python cyllo_installer.py and then building from that 
same environment using python -m PyInstaller cyllo_installer.py. One of 
those two commands should fail — depending on which one fails will tell us 
where you’ve gone wrong.
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/e1460b66-697a-4ca5-bc18-0987880156a6n%40googlegroups.com.


Re: [PyInstaller] Re: pyinstaller issue with scikit_learn or scipy

2024-01-27 Thread bwoodsend
My bad. 3.12.0 is the bad version. See 
https://github.com/pyinstaller/pyinstaller/issues/7992

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/2c171bc0-ee25-40cd-a3b8-d135322151b6n%40googlegroups.com.


[PyInstaller] Re: no suitable image found libpython3.8.dylib

2024-01-26 Thread bwoodsend
Sounds like your Python environment isn't compatible with mavericks. 
Generally speaking, building on a new platform and expecting it to run on 
an old one is the wrong way to do things.

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/22f96a05-0206-492e-bdc0-9072be6420d0n%40googlegroups.com.


[PyInstaller] Re: pyinstaller issue with scikit_learn or scipy

2024-01-23 Thread bwoodsend
Are you using Python 3.10.0 by any chance? It's got a bug in it. You'll 
need to upgrade Python.

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/4ef1dc5a-3694-4039-bb63-e4c2effce422n%40googlegroups.com.


[PyInstaller] Re: Set python command option -OO

2024-01-20 Thread bwoodsend


You can use:
exe = EXE( pyz, a.scripts, [('O', None, 'OPTION'), ('O', None, 'OPTION')], 
... 

but, whilst it does set sys.flags.optimize to 2, it doesn’t remove either 
the assertions or docstrings since they need to happen at compile time. You 
used to be able to use python -OO -m PyInstaller your-code.py but pycparser 
(one of PyInstaller’s indirect Windows-only dependencies) doesn’t allow it 
now. That said, -OO mode is a waste of time. Since the docstrings are small 
and in a PyInstaller application get compressed, you’re looking at about 
~0.1% reduction in application size.
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/3e50cd3b-265f-4865-9023-767664bd3057n%40googlegroups.com.


[PyInstaller] Re: Will a compile work across different Windows versions?

2024-01-16 Thread bwoodsend
They're interchangeable. You only need to build on one of them.

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/caae2c02-5620-4498-a5ae-e3f3ea94ba52n%40googlegroups.com.


Re: [PyInstaller] Understanding PyInstaller

2024-01-05 Thread bwoodsend


Also worth checking the imp entry in the build/*/xref-*.html. I’m guessing 
it’s going to say *not found* which won’t tell us much but it might say 
something else.
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/3116797a-7437-4403-8114-1a8f4dae1a95n%40googlegroups.com.


Re: [PyInstaller] Understanding PyInstaller

2024-01-05 Thread bwoodsend


Python 3.11.2 (tags/v3.11.2:878ead1, Feb 7 2023, 16:38:35) [MSC v.1934 64 
bit (AMD64)] on win32

But what does the second line of PyInstaller’s build log say?

The simple fact that pyinstaller is complaining about stdlib modules is 
just odd.

To PyInstaller, there’s no way of telling what modules are standard lib or 
3rd party or your own code.

There is an import statement for that module at the top of the file. 

Then PyInstaller will know that it needs that module and can’t find it. 
That reinforces my thinking that pyinstaller is not installed into that 
Python 3.11 environment that you think it is.
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/bf9c6a84-b767-4cb1-8b39-b380029bb10fn%40googlegroups.com.


[PyInstaller] Re: Understanding PyInstaller

2024-01-04 Thread bwoodsend


Are you sure that your pyinstaller is not in a Python 3.12 environment? 
Freezing import imp works fine for me under Python 3.11.
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/bcbc5106-326d-4c96-84e9-056e5f248d82n%40googlegroups.com.


[PyInstaller] Re: Flet compiling error

2023-10-25 Thread bwoodsend
There's no point in asking us about flet if it's proprietary. We have no 
idea what's in it or what it's doing.

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/38d412f2-0295-4d37-8100-4270093c1f30n%40googlegroups.com.


Re: [PyInstaller] --add-data behavior?

2023-10-05 Thread bwoodsend


Ughh, I’ve seen that snippet of misinformation before on stackoverflow. The 
code in the *else* block is what you should be running unconditionally. If 
that can’t find your resources then you’re putting your data files in the 
wrong place inside your application and you should adjust the DEST part of 
your --add-data flags until it does work. There is also a sys._MEIPASS 
variable that also gives you the application’s path but again, I try to 
steer people away from that because 99% of the time they’d be better off 
using __file__.

That code snippet works in PyInstaller <6 (well no, it breaks under onefile 
mode, but under onedir mode it worked) because 
os.path.dirname(sys.executable) used to, by happenstance rather than 
design, equal sys._MEIPASS. PyInstaller 6.0 moved most of the application 
into this new _internal directory though so now those two are no longer 
equal.
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/30893c86-5fc6-4aab-89ab-79ade020ea67n%40googlegroups.com.


[PyInstaller] Re: PyiFrozenImporter cannot handle module

2023-09-26 Thread bwoodsend


I can’t get the issue to occur using the latest PyInstaller and 
compound_split. Line 10 of compound_split\char_split.py is import 
compound_split.char_split so running pyinstaller on a script containing 
just that line should be enough to trigger the error. Can you confirm if 
that is the case for you?
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/07699da9-323b-4867-bf63-5832cd9e8e19n%40googlegroups.com.


[PyInstaller] Re: _internal

2023-09-26 Thread bwoodsend


If 6.0.0 breaks your data file locating then your code is broken and 
PyInstaller’s change is merely shedding light on it. If you anchor resource 
paths using __file__ like the docs tell you to 
 
then it shouldn’t matter which version of PyInstaller you use.
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/41af62f5-b552-4d42-8dff-a6b8add853cen%40googlegroups.com.


Re: [PyInstaller] Re: Application creating second instance of self

2023-09-26 Thread bwoodsend


That sounds like a red herring. It’s specifically 
subprocess.run([sys.executable, 
...]) that we’re interested in — any other command should run fine under 
PyInstaller.
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/cfa78206-b7d2-4e2e-8cfc-a29916b36ce7n%40googlegroups.com.


[PyInstaller] Re: Application creating second instance of self

2023-09-24 Thread bwoodsend


I’ve read some about how sys.executable() is different when you run a 
packaged application, so I’m sure that could be playing a role, but I have 
no idea how to fix that.

A library that tries to run Python subprocesses will cause a PyInstaller 
application to keep spawning itself because sys.executable points to your 
application rather than python.exe. There’s no universal magic fix for 
this. Sometimes you can configure a library not to use subprocesses. 
Sometimes the library uses Python’s multprocessing library for which you 
can enable PyInstaller’s special handling. In nastier cases, you can put a if 
sys.argv[1:3] == [whatever arguments the subprocess always uses]: do the 
task the subprocess was intended to do at the top of your code. If you can 
strip the problem down to one specific library and a small bit of code then 
share that, I should be able to give you a more precise workaround.
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/a3f0bcd5-07e2-40c6-8705-22a935d3b154n%40googlegroups.com.


[PyInstaller] Re: pyinstaller: error: unrecognized arguments: B:/coding/py2exe/test.py

2023-09-24 Thread bwoodsend


It’s your dist/work/spec path parameters causing the problem. They need to 
be written as either '--distpath=B:\\coding\\py2exe' or two separate 
strings '--distpath', 'B:\\coding\\py2exe'. The command line equivalent of 
your current Python code is
pyinstaller --onefile --clean "--distpath B:\coding\py2exe" "--workpath 
B:\coding\py2exe\temp_build_folder" "--specpath 
B:\\coding\\py2exe\\temp_spec_folder" --noconfirm -c 
B:/coding/py2exe/test.py 

which is not valid.
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/e240dd17-1aed-4525-9742-1ad47c3d020an%40googlegroups.com.


[PyInstaller] Re: Can Pyinstaller generate a list of the files added to the .exe?

2023-09-16 Thread bwoodsend


Try looking in the various build/*/*.toc files that PyInstaller writes.
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/2c4260b8-5603-473a-9428-5acd30c3bdfdn%40googlegroups.com.


[PyInstaller] Re: Issues detecting __file__ parent apparently

2023-09-03 Thread bwoodsend


That WORDLIST_DIR 

 
won’t exist by default because PyInstaller needs to be told to collect data 
files. Adding --collect-data=eth_acount.hdaccount to your pyinstaller 
command should do it.
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/ea374bf0-789e-46d1-a8b1-aabeb1fdedd5n%40googlegroups.com.


[PyInstaller] Re: Size of .exe bigger and bigger

2023-08-23 Thread bwoodsend
You're the only one in a position to answer that question. Look inside your 
application. What files are taking up the most space? Are there any there 
that shouldn't be?

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/e09ae347-1897-46a0-b954-22e7abfec0a3n%40googlegroups.com.


[PyInstaller] Re: Problems arising from pyinstaller and cgitb

2023-08-23 Thread bwoodsend


Looks like cgitb is naive to windowed applications. Here 

 
it writes to a file-like attribute which gets set to sys.stdout 
.
 
In a windowed application, sys.stdout is None so that line will raise some 
kind of *NoneType has no attribute write* error. The reason why it worked 
on older PyInstaller versions is because PyInstaller used to set sys.stdout 
to a placebo object with no-op .write() methods but it got scrapped because 
it led to other issues. You might be able to fix it by running 
sys.excepthook.file 
= open(os.devnull, "w") imediately after calling enable() or, failing that, 
boycott the enable() function and run this line 

 
directly but adding file = open(os.devnull, "w") to the Hook() constructor.
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/8c02da7b-eab6-48fb-89fa-cf531ef81b36n%40googlegroups.com.


[PyInstaller] Re: ERROR with simple python code, requesting help

2023-08-21 Thread bwoodsend


You’re running the program in the build directory — that’s not your 
application! It’s just a temporary space PyInstaller uses to assemble 
things. Your real application is in the dist directory.
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/c55d807e-aecc-4452-adb9-57e6c76f5c10n%40googlegroups.com.


[PyInstaller] Re: - - add-data not behaving as expected

2023-08-21 Thread bwoodsend


If you want to add a directory, you don’t want wildcards. Wildcards add the 
contents of a directory but not the directory itself. Just --add-data 
program/config:config gives me the following which I’m guessing is what you 
want?
_MEI.../ ├── base_library.zip ├── config │ ├── development │ │ └── config │ 
│ ├── file1 │ │ └── file2 │ ├── file1 │ └── file2 ├── the usual generic 
stuff 
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/751a858f-9f32-439f-914d-3cd65574a32en%40googlegroups.com.


[PyInstaller] Re: Pyinstaller fails with adding matlab.ctf file into binary

2023-08-16 Thread bwoodsend


*Binaries* in PyInstaller is specific to .dylib or executable files. That 
matlab.ctf file isn’t either — it’s just a data file. Add it to datas 
instead.
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/ba7553d6-8fb2-4705-a45d-c2aebd9an%40googlegroups.com.


[PyInstaller] Re: PyInstaller 5.13.0 Restructured my MacOS app and breaks it

2023-08-16 Thread bwoodsend
Are you using unreleased PyInstaller from GitHub? If so, it looks like you 
need to recompile the bootloaders.

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/4a49f69b-c8b9-402a-a1e9-f90b756bebebn%40googlegroups.com.


[PyInstaller] Re: Windows Service start error 1053 always happens when pyinstaller create's exe

2023-08-07 Thread bwoodsend


pywin32’s construction of the service command 

 
is assuming that your application contains the python.exe entrypoint which 
isn’t possible with PyInstaller. This isn’t going to work I’m afraid.
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/c8eb0aac-582a-422a-a6c5-88a7886cf491n%40googlegroups.com.


[PyInstaller] Re: Portaudio Bundled but location is local?

2023-08-01 Thread bwoodsend


PyPI packages that depend on Homebrew are always painful. otool -L (roughly 
equivalent to Linux’s ldd) is your go-to tool for this. The original 
unfrozen copy of pyaudio‘s extension module will be linked against 
libportaudio.*.dylib from Homebrew using an absolute path:
$ otool -L 
./env/lib/python3.10/site-packages/pyaudio/_portaudio.cpython-310-darwin.so 
./env/lib/python3.10/site-packages/pyaudio/_portaudio.cpython-310-darwin.so: 
/opt/homebrew/opt/portaudio/lib/libportaudio.2.dylib (compatibility version 
3.0.0, current version 3.0.0) /usr/lib/libSystem.B.dylib (compatibility 
version 1.0.0, current version 1319.100.3) 

Now PyInstaller is supposed to to replace that path with an @rpath 
(relative to the parent executable) entry so that your application is 
relocatable. That has worked fine for me:
$ otool -L ./dist/test/pyaudio/_portaudio.cpython-310-darwin.so 
./dist/test/pyaudio/_portaudio.cpython-310-darwin.so: 
@rpath/libportaudio.2.dylib 
(compatibility version 3.0.0, current version 3.0.0) 
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 
1319.100.3) 

Are you sure you’re not just running some out of date PyInstaller that 
predates linker path rewriting?
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/34a4ae9a-be5a-4d6d-8df7-7a0e26ff6c6cn%40googlegroups.com.


[PyInstaller] Re: Pyinstaller dependency with libreadline

2023-07-20 Thread bwoodsend


No, that’s not true. PyInstaller looks at your binary dependencies (Python 
extension modules, libpython.so, anything you’ve added via --add-binary), 
runs ldd on each file to see what other libraries they depend on and then 
packages those. If PyInstaller is collecting libreadline.so.6 then one of 
the files in your application depends on libreadline.so.6 (or possibly it 
depends on libreadline.so and libreadline.so is a symlink to 
libreadline.so.6).
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/5474e356-567c-4eff-8bf8-208129c339dan%40googlegroups.com.


Re: [PyInstaller] 'PyInstaller' works, but 'pyinstaller' does not?

2023-07-07 Thread bwoodsend


It turns out that segfaulting on macOS with PyQt6==6.5.1 is a known issue. 
It was fixed in e3ad7c71c7f8acd79e73ae2ca13db18ecfc354d1 

 
but that hasn’t been released yet so for now I suggest using pip install 
pyqt6==6.5 pyqt6-qt6==6.5.
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/b2d85db2-284e-47e5-8b33-ffb5650fc1c7n%40googlegroups.com.


[PyInstaller] Re: 'PyInstaller' works, but 'pyinstaller' does not?

2023-07-06 Thread bwoodsend


The executable is called pyinstaller (all lower case). macOS (and Windows) 
use case-insensitive file systems so I’d have thought that they’d be 
interchangeable but evidently not. Irregardless, you’ve got two different 
versions of PyInstaller there. If you run which PyInstaller, that should 
tell you where this mysterious PyInstaller command is coming from. As to 
why it’s segfaulting, it’s hard to tell because it could be a genuine 
segfault or it could be nonsense like macOS’s gatekeeper getting in the 
way. You could try pyinstaller --debug=all app.py then share the output of 
the application running (please copy/paste from the terminal instead of 
screenshotting) although my hopes aren’t high.
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/e53e9739-f02c-4032-8ad1-0f1c3d65bc32n%40googlegroups.com.


[PyInstaller] Re: AttributeError: module 'PyInstaller.compat' has no attribute 'is_py312'

2023-07-05 Thread bwoodsend


Is there really not a stack trace saying where the exception originates 
from? is_py312 wasn’t added until PyInstaller v5.13. Nothing except 
PyInstaller v5.13 should be referencing it. 

P.S. We do not support Anaconda. It rearranges packages in ways that 
PyInstaller can’t track and can’t be tested
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/e0cdeb07-5024-464c-8121-fcaa07e06279n%40googlegroups.com.


[PyInstaller] Re: 'pathlib' obsolete backport of a standard library package and incompatible with PyInstaller

2023-07-02 Thread bwoodsend
Uninstall pathlib. There's an actually maintained version already in the 
standard library. The one on PyPI, as the error message says, is obsolete.

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/78f4eeed-99ad-45e7-8d73-19ba97e651bdn%40googlegroups.com.


[PyInstaller] Re: able to generate exe file but its not running properly.

2023-07-02 Thread bwoodsend
Run the application from cmd so that the terminal stays open and you can 
see the error message.

On Sunday, July 2, 2023 at 11:25:29 AM UTC+1 Parikshit Saha wrote:

> I have written an python code which is working perfectly with
> python SNC_OCTwork.py command.
> while running pyinstaller --onefile SNC_OCTwork.py command it is telling 
> to do the following modification & retry.
> 1. In your program's .spec file add this line near the top::
>  import sys ; sys.setrecursionlimit(sys.getrecursionlimit() * 5)
> 2. Build your program by running PyInstaller with the .spec file as
>argument:: pyinstaller myprog.spec
>
> After running pyinstaller SNC_OCTwork.spec with modification it ran 
> successfully and the SNC_OCTwork.exe file generated in dist folder.
> I have copied the exe file outside the dist folder in the root directory. 
> while double clicking, it is opening an cmd prompt and getting off after 
> sometime. that cmd prompt has some error but unable to see it also unable 
> to resolve it
>

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/563dfbd1-bd3b-44b6-bf04-7c0a95c9fd36n%40googlegroups.com.


[PyInstaller] Re: Segmentation fault in "hello world" PyQt6 app on Mojave M1 mac

2023-06-15 Thread bwoodsend
PyQt6 doesn't support macOS < 11.0 now. And PyInstaller doesn't support 
macOS<10.15 unless you compile it from source. If you want to support old 
macOS versions, you should build on old macOS versions so that these issues 
are easy to diagnose.

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/f1f4f105-9895-4d08-83f6-510ebf549fb8n%40googlegroups.com.


Re: [PyInstaller] Mac app bounces in system dock, closes, and then re-opens

2023-05-09 Thread bwoodsend


However, when I click on the .app icon, the icon bounces in the system 
tray, then closes, and, after about 15 seconds, re-opens.

It’s a side effect of --onefile mode combined with --windowed mode (or the 
.spec file equivalents). Because a onefile executable is an executable 
within an executable you get a bouncing icon for the outer executable which 
disappears when macOS realizes that it’s not really a GUI then the inner 
executable launches which creates a new bouncy icon. The fix is just not to 
use onefile mode which is fairly useless combined with windowed. It should 
boost your startup time too.
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/a4d4bb25-5f45-48a4-95fc-18850dbf889dn%40googlegroups.com.


[PyInstaller] Re: How to add suport for pyqtlet2?

2023-05-08 Thread bwoodsend


The javascript stuff in pyqtlet2 itself is easy enough. The command line 
option --collect-data=pyqtlet2 to PyInstaller is enough which corresponds 
to a hook which looks like:
# hook-pyqtlet2.py from PyInstaller.utils.hooks import collect_data_files 
datas = collect_data_files("pyqtlet2") 

If you wanted to make this available to everyone, you could upload it to the 
hooks repo 

 
or you can store it in pyqtlet2 

.

What’s rather more fiddly is the dependency on qtpy. Because qtpy is an 
abstraction layer across the Qt variants, it contains conditional imports 
which PyInstaller’s dependency scanner has no idea how to handle. I don’t 
think there’s any way of making that issue invisible. If you put in 
explicit imports to a specific Qt variant before any qtpy or pyqtlet2 
imports, it behaves itself. i.e. The hello world pyqtlet2 example 

 
becomes:
import sys import PyQt6.QtWebEngineWidgets # <--- This line is different 
from qtpy.QtWidgets import QApplication, QVBoxLayout, QWidget from pyqtlet2 
import L, MapWidget class MapWindow(QWidget): def __init__(self): # Setting 
up the widgets and layout super().__init__() self.mapWidget = MapWidget() 
self.layout = QVBoxLayout() self.layout.addWidget(self.mapWidget) 
self.setLayout(self.layout) # Working with the maps with pyqtlet self.map = 
L.map(self.mapWidget) self.map.setView([12.97, 77.59], 10) L.tileLayer(
'http://{s}.tile.osm.org/{z}/{x}/{y}.png').addTo(self.map) self.marker = 
L.marker([12.934056, 77.610029]) self.marker.bindPopup('Maps are a 
treasure.') self.map.addLayer(self.marker) self.show() if __name__ == 
'__main__': app = QApplication(sys.argv) widget = MapWindow() 
sys.exit(app.exec_()) 
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/7fe34eec-851e-4ec1-95f6-7ff84ef81a04n%40googlegroups.com.


[PyInstaller] Re: skimage error

2023-03-31 Thread bwoodsend
Someone's already fixing that one. 
https://github.com/pyinstaller/pyinstaller-hooks-contrib/pull/565

On Thursday, March 30, 2023 at 2:39:38 PM UTC+1 Yitzhak Weissman wrote:

> I have a script named skimage_test.py which reads:
> import skimage
> print(skimage.__version__)
> When the script is executed, it prints the skimage version number (0.20.0 
> in my case).
> I compiled this script with the script:
> import PyInstaller.__main__
> PyInstaller.__main__.run(['skimage_test.py', '--onefile'])
> The resulting executable produces an error:
> Traceback (most recent call last):
>   File "skimage_test.py", line 1, in 
>   File "", line 1027, in _find_and_load
>   File "", line 1006, in 
> _find_and_load_unlocked
>   File "", line 688, in _load_unlocked
>   File "PyInstaller\loader\pyimod02_importers.py", line 352, in exec_module
>   File "skimage\__init__.py", line 74, in 
>   File "lazy_loader\__init__.py", line 245, in attach_stub
> ValueError: Cannot load imports from non-existent stub 
> 'C:\\Users\\USER\\AppData\\Local\\Temp\\_MEI383482\\skimage\\__init__.pyi'
> Any fix?
>

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/01241d70-3abb-4a2e-a932-4ee0e320607cn%40googlegroups.com.


[PyInstaller] Re: ValueError: unmarshallable object in PyInstaller 5.4+

2023-03-27 Thread bwoodsend


That one’s a bug in PyInstaller. I’ve just raised it: 
https://github.com/pyinstaller/pyinstaller/issues/7515

If you can get six out of your dependency tree, that ought to get you 
around the problem in the meantime.
​
On Tuesday, March 21, 2023 at 8:16:26 AM UTC Joe R. wrote:

> Hello,
>
> I did try with the latest version, and got the same results.  5.4 is just 
> the first version that's failing in this way.
>
> On Monday, March 20, 2023 at 8:38:18 AM UTC-4 bwoodsend wrote:
>
>> There's been a fair bit of code churn surrounding that part of Windows 
>> DLL discovery so first dumb question would just be could you try with the 
>> latest PyInstaller? Failing that, you'll probably need to get a print 
>> statement in where that exception is being raised to see what exactly it is 
>> that it's trying to marshal. My guess would be a pathlib.Path object.
>>
>> On Monday, March 20, 2023 at 9:32:59 AM UTC Joe R. wrote:
>>
>>> Hello,
>>>
>>> I'm a current developer of PySolFC.  We've been using an AppVeyor script 
>>> to run PyInstaller to generate our Windows and Max installers, but when we 
>>> updated to PyInstaller 5.4, the script stopped working.  It ran up to the 
>>> point where it's "Looking for dynamic libraries", and then fails with a 
>>> "ValueError: unmarshallable object".
>>>
>>> Here is a copy of the most recent run of the AppVeyor script - the error 
>>> can be seen at the bottom: 
>>> https://ci.appveyor.com/project/joeraz/pysolfc/builds/46546048#L1389
>>>
>>> The AppVeyor script itself is here: 
>>> https://github.com/joeraz/PySolFC/blob/feature/python-311-installer-test-2/.appveyor.yml
>>>
>>> As a workaround, I had set up the script to use PyInstaller 5.3, but I'd 
>>> like to get the main codebase updated to use Python 3.11, which needs a 
>>> newer version.
>>>
>>> Unfortunately, I didn't write this script.  The people with the 
>>> PyInstaller know-how to resolve this issue are not currently active on the 
>>> project.  I really only know the basics myself, so I haven't had much luck 
>>> debugging this.  Would anyone here be able to assist?  Thanks.
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/5b9fd489-e386-46bb-b958-345161d7798en%40googlegroups.com.


[PyInstaller] Re: ValueError: unmarshallable object in PyInstaller 5.4+

2023-03-20 Thread bwoodsend
There's been a fair bit of code churn surrounding that part of Windows DLL 
discovery so first dumb question would just be could you try with the 
latest PyInstaller? Failing that, you'll probably need to get a print 
statement in where that exception is being raised to see what exactly it is 
that it's trying to marshal. My guess would be a pathlib.Path object.

On Monday, March 20, 2023 at 9:32:59 AM UTC Joe R. wrote:

> Hello,
>
> I'm a current developer of PySolFC.  We've been using an AppVeyor script 
> to run PyInstaller to generate our Windows and Max installers, but when we 
> updated to PyInstaller 5.4, the script stopped working.  It ran up to the 
> point where it's "Looking for dynamic libraries", and then fails with a 
> "ValueError: 
> unmarshallable object".
>
> Here is a copy of the most recent run of the AppVeyor script - the error 
> can be seen at the bottom: 
> https://ci.appveyor.com/project/joeraz/pysolfc/builds/46546048#L1389
>
> The AppVeyor script itself is here: 
> https://github.com/joeraz/PySolFC/blob/feature/python-311-installer-test-2/.appveyor.yml
>
> As a workaround, I had set up the script to use PyInstaller 5.3, but I'd 
> like to get the main codebase updated to use Python 3.11, which needs a 
> newer version.
>
> Unfortunately, I didn't write this script.  The people with the 
> PyInstaller know-how to resolve this issue are not currently active on the 
> project.  I really only know the basics myself, so I haven't had much luck 
> debugging this.  Would anyone here be able to assist?  Thanks.
>

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/94ce649a-27b4-4dc3-8cd0-daf2f60ab35fn%40googlegroups.com.


[PyInstaller] Re: virus threat during pytinstaller installation

2022-12-27 Thread bwoodsend
This is Microsoft's bug - not PyInstaller's. Report it there.

On Monday, December 26, 2022 at 3:41:39 PM UTC sayan...@gmail.com wrote:

> Hello, I have faced Torjan virus attack issue when i try to install latest 
> virsion of pyinstaller.
> please fix the virus threat issue of latest version.
>
>   Thank you,
> Sayan Mukherjee
>

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/f5e7ef78-53bd-4534-82a0-50cb4c8178f3n%40googlegroups.com.


[PyInstaller] Re: pyInstaller package creation for windows raises missing module

2022-10-11 Thread bwoodsend


It works first go for me.

git clone g...@github.com:aggerdom/screenruler.git
mv screenruler/main.py screenruler/screenruler.py
pyinstaller --windowed --onefile screenruler/screenruler.py
./dist/screenruler

​
On Tuesday, October 11, 2022 at 1:56:27 PM UTC+1 limest...@gmail.com wrote:

> Hi,
>
> I described the issue here: 
> https://stackoverflow.com/questions/74022265/pyinstaller-package-creation-for-windows-raises-missing-module
>
> PyInstaller doesn't recognize the module in a subdirectory. I've tried a 
> number of different ways to get the 'paths' recognized.
>
> Hope someone is able to offer a simple solution.
>
> Thanks.
>

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/64972bc9-dcc8-4ec7-993b-b2cdc4ff3577n%40googlegroups.com.


[PyInstaller] Re: PyInstaller error loading Python DLL when running executable on another machine

2022-06-08 Thread bwoodsend


Python 3.9 not supporting Windows 7 *is* the reason. python39.dll is linked 
against libraries which only exist on Windows >= 8.1 so it fails to load. 
If you want to support Windows 7 then you should be building on Windows 7 
so that you aren’t picking up libraries which are similarly dependent on 
newer Windows libraries.
​
On Tuesday, June 7, 2022 at 9:13:25 AM UTC+1 Daniel Keehl wrote:

> I'm trying to run a pyinstaller-built executable on another machine. The 
> error I see is *Error loading Python DLL 
> 'C:\Users\User\AppData\Local\Temp\_MEI70722\python39.dll*
>
> I built the program like this, I also added -F to make sure the executable 
> is standalone:
>
> *py -m PyInstaller script.py -F*
>
> I tried adding *--add-binary* and *--add-data* options with the path to 
> *python39.dll*, but that didn't help.
>
> The program is built on *Windows 10 x64*, the machine I'm trying to run 
> the program on is *Windows 7 x64*. Even with such a difference and the 
> fact that *Python 3.9* is not for Windows 7, I really doubt this is the 
> reason, otherwise I would expect another error.
>
> What am I doing wrong?
>

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/7ee754d7-d6e4-413f-acfc-eed0a6e2e3cen%40googlegroups.com.


Re: [PyInstaller] Codesign on Mac fails when including shapely

2022-05-29 Thread bwoodsend


I’m afraid not. And I doubt there ever will specifically be something to 
move files around and replace them with symlinks in PyInstaller since the 
real fix would be for PyInstaller not to put libraries in the MacOS folder 
to begin with. Nobody is going to wire in a workaround when they know that 
they could be fixing it instead. That fix will be harder than it sounds 
however because it will require mucking around with embedded linker paths 
so that all the various components can still find each other. 
Unfortunately, PyInstaller doesn’t have any regular macOS developers so 
macOS specific stuff tends to fall by the wayside.
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/a4b222f8-55cf-40df-8e9f-f0dee0dae364n%40googlegroups.com.


[PyInstaller] Re: Codesign on Mac fails when including shapely

2022-05-26 Thread bwoodsend


For some reason, codesign is allergic to names with . in them in the 
Contents/MacOS/ subdirectory. Normally the hacky workaround is to move 
shapely to Contents/Resources then create a symlink (using ln -s) from 
Contents/MaOS/shapely to Contents/Resources/shapely. See also the same 
issue here 

.
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/679f302d-74b0-4de8-a18f-3d486f101c78n%40googlegroups.com.


[PyInstaller] Re: Pyinstaller for Windows can't find custom module

2022-05-14 Thread bwoodsend


It’s the parent directory of your custom package that needs adding to 
sys.path (controlled via pathex). pathex=[‘C:\Users’], should do it. You’ll 
probably need to rebuild adding the —clean option (or you can just delete 
the build folder). That said, using pathex at all is a symptom of poor 
package design. Turn your code into a pip-installable Python package with a 
setup.py  and 
you’ll never have issues like this again.
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/322cde17-8eb1-41b4-8077-042b905c1019n%40googlegroups.com.


[PyInstaller] Re: trouble with built app in Macos

2022-04-02 Thread bwoodsend


I believe that the main difference between running an application from 
macOS’s terminal and via clicking on it is that clicking on it runs the 
application in a very bare environment with almost no environment variables 
so that your application can’t find the home directory or the current 
encoding/locale and any application which it is supposed to find in $PATH 
will be invisible to it. I’m afraid the best I can offer for debugging is 
to wrap your code in something like the block below then inspect 
/tmp/error-message.txt to see what the problem really is.

import traceback
try:
# Your code here.except BaseException as ex:
 with open("/tmp/error-message.txt", "w") as f:
 traceback.print_exc(file=f)
 raise

If you find that that file never gets written, it’s probably macOS’s 
gatekeeper blocking your application from running.
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/ebb529fb-701b-4156-8229-fcf2592cbd9fn%40googlegroups.com.


[PyInstaller] Re: Unable to find EGG-INFO when adding binary and data files.

2022-03-08 Thread bwoodsend


The problem is that you’ve installed mtaf in zipped egg format which was 
abandoned years ago. This happens if you build a package from source 
(usually without realising) and don’t have wheel installed. You should be 
able to fix this by installing wheel then reinstalling mtaf.

pip install wheel
pip uninstall mtaf
pip install mtaf

​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/b4b809cb-4ee2-4114-acd2-6d42032e3447n%40googlegroups.com.


Re: [PyInstaller] Re: Created .exe cannot be opened when moved to a new directory

2022-02-10 Thread bwoodsend


I’m afraid that there’s no nice switch in the spec file to toggle between 
onefile and onedir mode. Converting spec files is possible but you’d be 
better just creating a new spec file. And for the record, pyinstaller 
program.spec ignores --onefile (and almost all other flags).
​
On Tuesday, February 8, 2022 at 4:49:34 PM UTC ericfa...@gmail.com wrote:

> You need to move all of the binaries, zipfiles and datas into the EXE, 
> make sure exclude_binaries is False, and delete the COLLECT.
>
> [image: image.png]
>
>
>
> On Tue, Feb 8, 2022 at 8:26 AM Paul Fishback  wrote:
>
>> Thanks. Yes, my usual approach has been to first create the .spec file 
>> and then modify it as needed. Here's a summary of what I tried using a 
>> script, hello_world.py, which creates a simple tkinter gui with a close 
>> button. 
>>
>> 1. pyinstaller hello_world.py --one file. 
>> This works fine of course--the dist folder contains a single executable.
>>
>> 2. pyinstaller hello_world.spec
>> Now the dist folder contains a folder, hello_world, not a single 
>> executable. This isn't what I want.
>>
>> 3. pyinstaller hello_world.spec --one file.
>> Same outcome as (2)
>>
>> In my more complicated application, I'll need to modify the spec file to 
>> include numerous data files, specify hidden imports, and add an icon. So 
>> the ultimate question is how do I modify the spec file so that dist 
>> contains a single executable? In other words, what modification to the spec 
>> file accomplishes the same thing as using the command line option --onefile?
>>
>>
>>
>> On Tue, Feb 8, 2022 at 3:47 AM Eric Fahlgren  wrote:
>>
>>> On Mon, Feb 7, 2022 at 7:48 AM Paul Fishback  
>>> wrote:
>>>
 So, following the steps at 
 https://pyinstaller.readthedocs.io/en/stable/spec-files.html, I could 
 add the run time option -F,--onefile in my spec file by defining

 options=[('F' ,None,'OPTION')]

 and including this as a parameter of my EXE instance, e.g. 

 exe = EXE(pyz,
   a.scripts, 
   [],
   options,...)

>>>
>>> I believe that 'options' is for Python runtime, not for PyInstaller 
>>> command line.  You need to generate a .spec file that aggregates the 
>>> binaries into the EXE phase.   The easiest way to do that is 
>>>
>>> > pyinstaller --onefile myscript.py
>>>
>>> and then use the 'myscript.spec' as the basis for any further 
>>> modifications.  Once you have the .spec file, then feed it to pyinstaller, 
>>> instead of the script.
>>>
>>> > pyinstaller myscript.spec
>>>
>>> -- 
>>> You received this message because you are subscribed to a topic in the 
>>> Google Groups "PyInstaller" group.
>>> To unsubscribe from this topic, visit 
>>> https://groups.google.com/d/topic/pyinstaller/1D5iK9Uv2TE/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to 
>>> pyinstaller...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/pyinstaller/CAP2Qz%2BVW67vrO25M52ubqT9y5DmaEUFX1txwW5fEnAnfZEsmEg%40mail.gmail.com
>>>  
>>> 
>>> .
>>>
>> -- 
>>
> You received this message because you are subscribed to the Google Groups 
>> "PyInstaller" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to pyinstaller...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/pyinstaller/CACWiRmn_HGQPmQpg19dTvGu0dPeC3n3uFZ%2BdwAsXseJT52Nb%3Dg%40mail.gmail.com
>>  
>> 
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/68e55c58-fb7e-4381-bcfa-2a223e482c42n%40googlegroups.com.


[PyInstaller] Re: Created .exe cannot be opened when moved to a new directory

2022-02-07 Thread bwoodsend


You’ve built in onedir mode (the default) which as the name suggests 
produces a directory. The EXE file inside that directory will not function 
without the rest of the contents of that folder. You need to distribute the 
folder with the program name. Or build in --onefile mode.
​
On Sunday, February 6, 2022 at 5:01:49 PM UTC fishba...@gmail.com wrote:

> My computer is a Mac running OS 11.6.1 and I've created a Windows 10 
> virtual machine with VMware Fusion. 
>
> I've had no problems creating an .app with pyinstaller on the Mac side. I 
> can move it to a new directory and double-click to open it.
>
> One the Windows side, I can run pyinstaller.exe fine using a "bare-bones" 
> .spec file, where I've only attempted to change the icon. The .exe was 
> located in a folder (having the program name) which in turn was located in 
> dist. The original .py and .spec were located in  C:\Users\MyName\Desktop
>
> Unfortunately the .exe cannot be opened when I move it to a new directory 
> on my virtual machine. Double clicking it results in a fatal error message, 
>
> "Error loading Python DLL '\\vmware -host\Shared 
> Folders\Desktop\python39.dll '. LoadLibrary: The specified module could not 
> be found. 
>
> I'm pretty sure I'm missing something in terms of how a virtual machine 
> works and would appreciate insights into what I'm doing wrong. 
>
> Thanks
>
> PaulF
>

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/204e0c5d-e4a5-4fbf-9593-ec0c15e94b67n%40googlegroups.com.


[PyInstaller] Re: OSError: Unable to open file (unable to open file: name = 'weight_res1.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0)

2022-01-31 Thread bwoodsend


And presumably your Python code references this file using something like

filename = "weight_res1.h5"

which assumes that weight_res1.h5 is in your current working directory 
instead of

import os
filename = os.path.join(os.path.dirname(__file__), "weight_res1.h5")

which assumes that weight_res1.h5 is next to you application.py? In which 
case your code is broken even without PyInstaller if you don’t set your 
working directory to the directory containing your code . There’s a bit 
more on the topic here 

.
​
On Thursday, January 27, 2022 at 9:27:04 AM UTC 
siddesh.1...@pe.iitism.ac.in wrote:

> [image: Screenshot (143).png]My Python script, application.py, uses 
> weight_res1.h5 files  located in the same directory as application.py and 
> throwing this error

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/17079441-e8a6-49d0-9cb2-80bcb6e8667an%40googlegroups.com.


[PyInstaller] Re: Request: Inclusion of "Robotframework" package in the Supported Packages

2022-01-31 Thread bwoodsend


You’d be better off making a hook request here 
 
to get new packages supported.
​
On Friday, January 28, 2022 at 6:23:37 PM UTC Bruno Calado wrote:

> Hi, it would be nice if you could include Robotframework  (
> https://github.com/robotframework/robotframework) in the Supported 
> Packages.
>
> I think this will be a little problematic because Robotframework  is 
> composed with python modules and .robot and .resources files that are plain 
> text files that have imports in it.
>
> Think about it.
>
> Thanks!
>
>
>
> *This email and any files transmitted with it are confidential and 
> intended solely for the use of the individual or entity to whom they are 
> addressed. If you have received this email in error, please notify the 
> system manager. This message contains confidential information and is 
> intended only for the individual named. If you are not the named addressee, 
> you should not disseminate, distribute or copy this email. Please notify 
> the sender immediately by email if you have received this email by mistake 
> and delete this email from your system. If you are not the intended 
> recipient, you are notified that disclosing, copying, distributing or 
> taking any action in reliance on the contents of this information is 
> strictly prohibited.*
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/e3f40dba-0990-4f89-a239-07e215b13dd9n%40googlegroups.com.


[PyInstaller] Re: How to install Pyaudio with Pyinstaller?

2022-01-18 Thread bwoodsend


Updating to pyinstaller 4.8 *should* clear the issue with subprocess 
handles in windowed mode.
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/f9807aaa-042f-4488-9d67-ca9afdfbab36n%40googlegroups.com.


[PyInstaller] Re: Issue after creating .exe while using wexpect within the script

2022-01-18 Thread bwoodsend


That’s this line 
<https://github.com/raczben/wexpect/blob/8ce905938801edc6f3b4154a617f06efafb73e8f/wexpect/host.py#L375-L378>
 
telling you that the ./wexpect/wexpect.exe it was hoping to find 
<https://github.com/raczben/wexpect/blob/8ce905938801edc6f3b4154a617f06efafb73e8f/wexpect/host.py#L345-L347>
 
isn’t there. This will be where those rather odd instructions from that 
wiki page you shared come in. You’ll need to build wexpect.exe and place it 
inside your application.
​
On Tuesday, January 18, 2022 at 8:01:27 AM UTC Blake D. wrote:

> [image: original.png]
>
> ^^^This is part of my original code and I do not have the same " from .
> __init__ import spawn" as per the example sent, but I still tried to add 
> "from . import spawn" as recommended and I got this error.
>
> [image: Capture1.PNG]
> [image: Capture4.PNG]
>
> I also tried compiling the code below with swapping the "." for "wexpect" 
> and got the same error from the original code.
> [image: Capture2.png]
> [image: Capture.PNG]
> On Monday, January 10, 2022 at 3:07:29 AM UTC-6 bwoodsend wrote:
>
>> That’s a bug in wexpect. See here 
>> <https://github.com/raczben/wexpect/blob/8ce905938801edc6f3b4154a617f06efafb73e8f/wexpect/host.py#L103>
>>  
>> where they’re misusing the __init__.py as a regular module. It should be 
>> just from . import spawn. Try changing that line in your copy and if it 
>> works, I'll ask the wexpect devs to change it permanently.
>> ​
>> On Friday, January 7, 2022 at 9:06:35 AM UTC Blake D. wrote:
>>
>>>
>>> [image: Capture.PNG]
>>> This is the error message I keep receiving. I've tried to do what ' 
>>> https://github.com/raczben/wexpect/wiki/Wexpect-with-pyinstaller ' says 
>>> and I followed it exactly but I still receive the exact same error as seen 
>>> above. I also tried importing the missing module as a hidden import 
>>> (--hidden-import=...) but that did not work either. I am also very new to 
>>> python so that doesn't help me very much in troubleshooting. Any guidance 
>>> will be greatly appreciated!
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/aa98ebae-320b-460d-aa19-5ac5139e802fn%40googlegroups.com.


[PyInstaller] Re: Issue after creating .exe while using wexpect within the script

2022-01-10 Thread bwoodsend


That’s a bug in wexpect. See here 

 
where they’re misusing the __init__.py as a regular module. It should be 
just from . import spawn. Try changing that line in your copy and if it 
works, I'll ask the wexpect devs to change it permanently.
​
On Friday, January 7, 2022 at 9:06:35 AM UTC Blake D. wrote:

>
> [image: Capture.PNG]
> This is the error message I keep receiving. I've tried to do what ' 
> https://github.com/raczben/wexpect/wiki/Wexpect-with-pyinstaller ' says 
> and I followed it exactly but I still receive the exact same error as seen 
> above. I also tried importing the missing module as a hidden import 
> (--hidden-import=...) but that did not work either. I am also very new to 
> python so that doesn't help me very much in troubleshooting. Any guidance 
> will be greatly appreciated!
>

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/0d70f9ce-6617-4624-bb5d-5b3c8788066dn%40googlegroups.com.


[PyInstaller] Re: Troubles with Geopandas

2021-12-30 Thread bwoodsend


For plain PyInstaller, you just need to add --collect-data=geopandas to 
your build command. I’ve no idea if auto-py-to-exe has an equivalent 
setting.
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/cc5c635f-17a0-4291-80a7-215a29ff65d2n%40googlegroups.com.


[PyInstaller] Re: pyinstaller

2021-12-29 Thread bwoodsend


Hmm, that’s a new one. What architecture does Python think it’s running 
(output of platform.machine() in Python)? What architecture are you really 
on (output of uname -m from terminal)? Does removing the icon the icon make 
any difference? What’s the output of:

lipo -archs /Users/user/PycharmProjects/acceptanceDb/dist/main

​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/0ac1b988-032a-4f20-9b68-ac27f9d46acdn%40googlegroups.com.


[PyInstaller] Re: Pyinstaller can't find target architecture when building bootloader

2021-11-05 Thread bwoodsend
That one is a bug in PyInstaller 4.6. It's fixed in 4.6.1 but we haven't 
released it yet. If you install 4.5 instead then you should be fine.

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/d17e698e-9054-496a-be4b-4e549eb1d7acn%40googlegroups.com.


[PyInstaller] Re: Pyinstaller can't find target architecture when building bootloader

2021-11-02 Thread bwoodsend


You’re on arm7l which pip and PyPI don’t support so that’s why PyInstaller 
can’t ship precompiled bootloaders for you. Most Pi users can install 
packages from pywheels 
which contains a specially compiled copy of most common packages (see their 
home 
page  for setting it up) but first, what is the 
output of ldd --version on your Pi? If it says glibc then go ahead and use 
piwheels. If it’s musl then this is going to be harder…
​
On Monday, November 1, 2021 at 1:30:35 PM UTC chengch...@gmail.com wrote:

> Let me explain what I did first. As most people do, I first used pip to 
> install pyinstaller.
> *pip3 install pyinstaller*
> Everything seemed fine. It exited with "finished successfully" message. I 
> then tested it with a simply python code. It went all the way to the end 
> and then showed the following message.
> [image: it8GE.jpg]
> Having no clue at all, I decided to uninstall pyinstaller and download the 
> source to build on the machine. After building bootloader, it exited with 
> "finished successfully" as well but with another warning message.
> [image: scF4c.jpg]
>
> I ignored it and continued to install pyinstaller. It also ended with 
> successful message. When I tested it, the same "not include a pre-compiled 
> bootloader" error showed.
> Here is what I get from /proc/cpuinfo. It's NanoPi Neo with 4 cores.
> [image: 5cCfJ.jpg]
> I'm using the latest image from FriendlyARM, which was released on June 
> this year.
> [image: AeWii.jpg]
> BTW, here is what I get from python3.
> *platform.machine() ==> armv7l*
> *platform.system() ==> Linux*
>

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/3a2e46f7-ceb3-4a97-b551-7f003cd5eb98n%40googlegroups.com.


[PyInstaller] Re: import error no module named _bootlocale

2021-10-26 Thread bwoodsend
PyInstaller doesn't yet support Python 3.10. We're releasing PyInstaller 
4.6 either today or tomorrow which will support it. You can either wait and 
then update PyInstaller or downgrade Python to 3.9.

On Tuesday, October 26, 2021 at 2:19:22 PM UTC+1 solomon...@gmail.com wrote:

>   Good day,
>
> I encountered an error trying to convert my .py file into exe but at the 
> end of the process i keep getting "import error* no module named 
> _bootlocale", *I have re-installed my PYINSTALLER and PY_TO_EXE 
> countless times but the error still persists.
>
> I need help solving this problem. Thanks in advance for your help. Regards
>

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/1cd17103-5a23-4537-bf2b-3973606be5f0n%40googlegroups.com.


[PyInstaller] Re: How to specify dependency versions?

2021-09-27 Thread bwoodsend


I think I may have misunderstood what pyinstaller does. It does not 
download Python modules from any repository given some package name, but it 
packages only the modules that are present *in the current environment*, is 
that right?

This is correct. PyInstaller has virtually no awareness of package managers 
of any kind. It doesn’t even know which modules are standard library, which 
are 3rd party and which are part of your code. It just looks for import 
statements, finds the modules being imported in the current environment, 
then scans those for imports, and so on.

(Still I feel pyinstaller would have to do less work if it just blindly 
packaged what was in the poetry lockfile, rather than trying to 
auto-discover the needed modules and then maybe needing additional hints.)

I totally agree. Virtually any developer not only knows their own project’s 
dependencies but has them written down somewhere in a handy machine 
readable format so there is no reason at all to try and auto-detect 
dependencies then reinvent each packages metadata to collect each 
distribution’s data and binary files which are undetectable to the import 
scanning mechanism. I’ve had some vague plans about writing a replacement 
to the a = Analysis(...) part of the .spec file but have never had the time.
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/4f054808-bcc9-47fc-90eb-2de5e63882c3n%40googlegroups.com.


[PyInstaller] Re: FIX MY ERROR (UPX IS NOT AVAILABLE)

2021-09-01 Thread bwoodsend


UPX being unavailable is not an error. It just means that you don’t have 
UPX installed so PyInstaller can’t use its UPX compression feature 
.
 
It still works fine without UPX.
​
On Wednesday, September 1, 2021 at 9:58:48 AM UTC+1 CN wrote:

> Provide the content of your .spec file
>
> On Tuesday, August 31, 2021 at 1:48:28 AM UTC-7 abhina...@gmail.com wrote:
>
>> FIX MY UPX IS NOT AVAILABLE PROBLEM.
>> WHEN I INSTALLER PYINSTALLER ITS INSTALLED CORRECTLY BUT WHEN I 
>> CONVERTING THE PY FILE TO EXE THAT SHOWED ME THIS (UPX IS NOT AVAILABLE)
>> PLEASE TELL ME HOW CAN I FIX THIS.
>>
>> THIS IS THE SCREENSHOT OF MY ERROR.[image: Screenshot (16)_LI.jpg]
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/2419c426-3d3d-4d1f-927b-7085bbd25d5an%40googlegroups.com.


[PyInstaller] Re: Pyinstaller error in yocto image

2021-08-30 Thread bwoodsend


As is says in the docs 
 
PyInstaller requires ldd and objcopy which are typically provided by the 
binutils package. It looks like you’re using Raspian which uses apt as its 
package manager so you should run sudo apt-get update && sudo apt-get 
install binutils. Otherwise google around for your Linux distribution’s 
equivalent.
​
On Monday, August 30, 2021 at 8:52:07 AM UTC+1 yasmineb...@gmail.com wrote:

> Hello everyone, 
> Well after a lot of struggle, I installed pyinstaller in my yocto image, 
> but while executing the command, I got an error which I couldn't solve 
> actually, 
>
> Thank you
> [image: Screenshot from 2021-08-29 11-47-02.png]
>

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/f155d0dc-0bad-4d15-8ec4-5051872c78a7n%40googlegroups.com.


[PyInstaller] Re: Fatal Error: Failed to Execute Script (name)

2021-07-03 Thread bwoodsend


--noconsole means no debugging output so with that option you will likely 
never know what the problem is because it can’t tell you. Either turn 
--noconsole off and see what Python error message it comes out with in the 
console it opens or wrap your Python code in a try: [your code] except 
BaseException as ex: [write exception to some log file].
​
On Friday, July 2, 2021 at 11:11:28 AM UTC+1 dajan...@gmail.com wrote:

> Hey everyone,
>
> I'm using pyinstaller version 3.6 to create an exe from a python 2.7 
> script. I have a scheduled task that runs this exe every 10 minutes 
> indefinitely. It executes just fine 95% of the time, but i'll randomly get 
> an error message box popping up saying "Fatal Error: Failed to Execute 
> Script (name_of_my_exe). 
>
> I've pretty much given up trying to figure out why it's failing. All I 
> want to do now is just hide that pop up box from showing up. Does anyone 
> know how to do this? 
>
> The command I'm using to create it is:
> pyinstaller --onefile name.py --noconsole
>
> Pretty desperate right now, any help is greatly appreciated.
>

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/982dc88b-7267-4415-b1ea-6e720cec1d1bn%40googlegroups.com.


Re: [PyInstaller] subprocess not working after onefile pyinstaller even with stdout/stdin defined

2021-06-23 Thread bwoodsend


subprocess.Popen([sys.executable, “-u”, “testsubprocess.py”],

A frozen application does not ship a Python interpreter. Instead 
sys.executable points to your EXE file which is equivalent to python 
testsubprocess.py so what you’re effectively running is 
subprocess.Popen(["python", 
"testsubprocess.py", "-u", "testsubprocess.py"], which will result in an 
infinite loop of subprocesses with every process invoking another child 
process. As Steve says, use the multiprocessing module and make sure you 
use the freeze_support() 

 
function.

And for the reference, the issue with having to assign all 3 stdin, stdout, 
stderr is only applicable to --windowed mode and simply results in an 
exception of you don’t do it.
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/2b3b1dd0-b8eb-4a85-81e0-7affe7c88fden%40googlegroups.com.


[PyInstaller] Re: no package metadata was found for t61codec centos

2021-06-22 Thread bwoodsend


Add --copy-metadata=t61codec to your build command.
​
On Tuesday, June 22, 2021 at 1:37:44 PM UTC+1 annalupa...@gmail.com wrote:

> Compiled the files via the command pyinstaller --onefile test2.py I get an 
> error when I try to open the file. She is in the screenshot
> [image: err.png]
>

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/4d0b9df2-5d12-4732-810f-254be2b27fd9n%40googlegroups.com.


  1   2   3   >