Re: [PyInstaller] Pygame and PyInstaller

2019-06-30 Thread Vincent Le Goff
Thank you, it was most helpful.  Unfortunately, the linked issue is 
closed and doesn't seem to have as much connection to the problem as I'd 
like (or an open issue on the PyInstaller tracker itself).  I'm 
wondering if this will be "fixed", in any way, or if we should live with 
it.  In my case, the reason why pkg_resources is needed is to load fonts 
(a .tif file if I'm not mistaken) so pygame cannot find it and 
PyInstaller probably doesn't.  But perhaps there's a way around it, to 
include the .tif file somewhere else in a data file... I'll look into that.



In any case, thank you for the answer, I have a better idea of what's 
going on.



Vincent

On 6/21/2019 2:36 AM, Raoul Snyman wrote:

Hi Vincent,

I was just browsing the PyInstaller documentation the other day
looking for something unrelated, but I came across this question in
the FAQ:

What about pkg_resources?
pkg_resources is currently not supported by PyInstaller. This means
that an application using a library which uses the the pkg_resources
API will probably not work out of the box. The only situation in which
it works is when it's being used on .egg files (see above). For
details follow issue #183.

See https://github.com/pyinstaller/pyinstaller/wiki/FAQ

It may be that PyGame is trying to load something via pkg_resources?

I'm sorry I can't be of more help, I'm not very familiar with pygame
or pkg_resources.


On Thu, Jun 20, 2019 at 8:42 AM Vincent Le Goff
 wrote:

Hello,


I'm a new user of PyInstaller and appreciate its simplicity.  I have,
however, noticed a problem when using pygame.


pygame is an interesting Python library to create games.  It handles
basic operations (like a simple 2D window, sound output, keyboard
processing and so on).  When trying to make an executable out of a game
using pygame, everything seems to work... but things break when pygame
attempts to load its fonts.  Here's the end of the traceback I receive
on calling pygame.font.Font (this is in the executable, not the original
Python script):


File "site-packages\pygame\pkgdata.py", line 50, in getResource
File "site-packages\pkg_resources\__init__.py", line 1134, in
resource_exists
File "site-packages\pkg_resources\__init__.py", line 1404, in
has_resource
File "site-packages\pkg_resources\__init__.py", line 1464, in _has
NotImplementedError: Can't perform this operation for unregistered
loader type


(I am running the pyinstaller script in a virtualenv, which might also
play a role.)


4The problem doesn't seem to come from pygame directly.  I only have the
slightest idea of what pkg_resources actually does.  Does it sound
familiar to you?  And how to fix it?


Thanks for your help,


Vincent

--
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 post to this group, send email to pyinstaller@googlegroups.com.
Visit this group at https://groups.google.com/group/pyinstaller.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/4e5a8c6f-c93e-e712-2583-b0da68332a2a%40gmail.com.
For more options, visit https://groups.google.com/d/optout.





--
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 post to this group, send email to pyinstaller@googlegroups.com.
Visit this group at https://groups.google.com/group/pyinstaller.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/d29b6374-008c-a5d5-dfe5-944df7bfbb00%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [PyInstaller] No module named 'packaging.specifiers' (resolved)

2019-06-30 Thread Eric Fahlgren
Randy,

Thanks for the background, always useful to know other's problems in case
there's any overlap.

Eric

On Wed, Jun 19, 2019 at 2:38 PM gpraceman  wrote:

> Eric,
>
> I had been using PyInstaller to package up my Gtk3 app for years, on
> Python 3.4.  My problem came about when I needed to upgrade Gtk3 to a newer
> version.  Only way it seems to install Gtk3 on Windows, above Python 3.4,
> is using MSYS2.  MSYS2 only installs the latest version of Python
> (3.7.3).   It took some doing, but I was finally able to get Gtk3 working
> on Python 3.7.  However, PyInstaller would not package up the app.   There
> was no moving backwards to Python 3.6, with MSYS2, to give that a try.  In
> a web search, others reported issues packaging with 3.7, but were
> successful if reverting to 3.6.  As, I need to get my app delivered soon, I
> chose to dive into the PyInstaller code and try to fix the packaging issues
> with 3.7.
>
> Also, on my macOS machine, same app would not package on Python 3.7.3.  I
> got some "Security-Alert: try to store file outside of dist-directory"
> error.  Switched to Python 3.6.8 (thanks to pyenv) and PyInstaller was able
> to package up the app.
>
> Not sure why the version of Python makes much of a difference with
> PyInstaller, but it sure seems to.
>
> Randy
>
> On Wednesday, June 19, 2019 at 10:11:06 AM UTC-6, Eric Fahlgren wrote:
>>
>> Since you mention Py 3.7 specifically, I'm just curious as to how much of
>> this you feel relates to Py 3.7?  When I moved from 3.6.3 to 3.7.1 last
>> October, it was pretty much painless, but we're using wxPython for gui and
>> it has been very stable in this regard for years.  Most of my PyInstaller
>> drama comes from SciPy updates, which always seem to add or restructure
>> some DLL import somewhere.
>>
>> On Wed, Jun 19, 2019 at 5:02 AM gpraceman  wrote:
>>
>>> Man, what a pain in the butt it has been to get PyInstaller to work with
>>> Python 3.7 on Windows 10, but I finally got my Gtk3+ app to package and run.
>>>
>>> First, I ran into a big issue with DLL's not being found.  See Issue
>>> #4125 .  To
>>> resolve that issue, I had to download and install the dev version of
>>> PyInstaller.  Then I implemented the proposed changes from Pull #4240
>>> , including
>>> htgoebel's proposed edits.  Now, when I package my app, it finds all of the
>>> needed DLL's.
>>>
>>> However, when running the packaged app, I got a "No module named
>>> 'packaging.specifiers'" error.  I had to edit the
>>> site-packages/pkg_resources/__init__.py file.  I replaced the __import__()
>>> statements, lines 89-92, with regular import statements.  Repackaged the
>>> app and now it runs with no errors!  That is a huge relief.
>>>
>>> Hopefully, this information will help someone.  At a minimum, if should
>>> serve to confirm that the changes in Pull #4240, along with the proposed
>>> edits, do work and should be implemented.
>>>
>>> --
>>> 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 pyins...@googlegroups.com.
>>> To post to this group, send email to pyins...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/pyinstaller.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/pyinstaller/84b4310f-436b-4e55-be52-577cf132a94d%40googlegroups.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> 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 post to this group, send email to pyinstaller@googlegroups.com.
> Visit this group at https://groups.google.com/group/pyinstaller.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pyinstaller/f7103457-c708-4ce0-915e-0166fb991c39%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 post to this group, send email to pyinstaller@googlegroups.com.
Visit this group at https://groups.google.com/group/pyinstaller.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/CAP2Qz%2BWuB4Lr97v2cOtAtGBcf5ids_S_gPhz9EPb_kHUx5Ecgg%40mail.gmail.com.

Re: [PyInstaller] Pygame and PyInstaller

2019-06-30 Thread Vincent Le Goff

Okay, here's my temporary fix:

1. Add a default font file in your game.  My choice is the 
'freesansbold.ttf' as this one does seem standard and is included in 
Pygame (you'll find it in its source code, if nothing else, or 
site-packages/pygame/freesansbold.ttf).

2. Add a few line before creating the font.

import sys

if getattr(sys, "frozen"): # FROZEN executable
    font_family = "./freesansbold.ttf" # Hard-code a local path
else:
    font_family = pygame.font.match_font(font_family)
self.font_object = pygame.font.Font(font_family, font_size)

So we give it the local filename if the executable is frozen. Copy the 
freesansbold.ttf next to the final executable and try it.  It should 
work.  Wrap the data file is you like to do so, it all should work.  
This is, however, a temporary fix, it would be great to have 
pkg_resources working, but one step at a time.


Cheers,

Vincent
On 6/21/2019 2:36 AM, Raoul Snyman wrote:

Hi Vincent,

I was just browsing the PyInstaller documentation the other day
looking for something unrelated, but I came across this question in
the FAQ:

What about pkg_resources?
pkg_resources is currently not supported by PyInstaller. This means
that an application using a library which uses the the pkg_resources
API will probably not work out of the box. The only situation in which
it works is when it's being used on .egg files (see above). For
details follow issue #183.

See https://github.com/pyinstaller/pyinstaller/wiki/FAQ

It may be that PyGame is trying to load something via pkg_resources?

I'm sorry I can't be of more help, I'm not very familiar with pygame
or pkg_resources.


On Thu, Jun 20, 2019 at 8:42 AM Vincent Le Goff
 wrote:

Hello,


I'm a new user of PyInstaller and appreciate its simplicity.  I have,
however, noticed a problem when using pygame.


pygame is an interesting Python library to create games.  It handles
basic operations (like a simple 2D window, sound output, keyboard
processing and so on).  When trying to make an executable out of a game
using pygame, everything seems to work... but things break when pygame
attempts to load its fonts.  Here's the end of the traceback I receive
on calling pygame.font.Font (this is in the executable, not the original
Python script):


File "site-packages\pygame\pkgdata.py", line 50, in getResource
File "site-packages\pkg_resources\__init__.py", line 1134, in
resource_exists
File "site-packages\pkg_resources\__init__.py", line 1404, in
has_resource
File "site-packages\pkg_resources\__init__.py", line 1464, in _has
NotImplementedError: Can't perform this operation for unregistered
loader type


(I am running the pyinstaller script in a virtualenv, which might also
play a role.)


4The problem doesn't seem to come from pygame directly.  I only have the
slightest idea of what pkg_resources actually does.  Does it sound
familiar to you?  And how to fix it?


Thanks for your help,


Vincent

--
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 post to this group, send email to pyinstaller@googlegroups.com.
Visit this group at https://groups.google.com/group/pyinstaller.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/4e5a8c6f-c93e-e712-2583-b0da68332a2a%40gmail.com.
For more options, visit https://groups.google.com/d/optout.





--
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 post to this group, send email to pyinstaller@googlegroups.com.
Visit this group at https://groups.google.com/group/pyinstaller.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/7173b323-6ef7-39a3-b2fa-316a3b9722de%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


[PyInstaller] Problem converting script generated in Anaconda environment to stand-alone executable using PyInstaller

2019-06-30 Thread Timothy Wiles
I'm fairly new to coding, so please forgive any misuse of terminology or 
any ignorance. I have written a Python script in the Spyder IDE in the 
Anaconda environment. I believe the only thing I am importing that is not 
part of the Python standard library is MatPlotLib. I installed PyInstaller 
and PyWin32 by entering the following commands into Anaconda Prompt:

conda install -c conda-forge pyinstaller
conda install -c anaconda pywin32

Then in the prompt I cd to the directory containing my script and enter the 
following:

pyinstaller -F .py

This generates the expected files and folders. When I go to the dist folder I 
find my .exe. However, when I try to run it, it opens a command prompt window 
but nothing is displayed. I was able to use the same approach to succesfully 
generate an executable for a simpler script I wrote (that script does not 
import MatPlotLib).
I'm guessing there is an issue with packaging something from MatPlotLib. I 
tried installing the latest development version of PyInstaller but I don't know 
how to do that using the conda command to install it in the Anaconda 
environment. Any help would be 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 post to this group, send email to pyinstaller@googlegroups.com.
Visit this group at https://groups.google.com/group/pyinstaller.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/662c043e-f719-4b0c-902d-99d4417d9cf0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[PyInstaller] Runtime error with mne libraries

2019-06-30 Thread Ferney beltran velandia
Hi everyone,

I am trying to make a .exe file from python code, which imports mne 
libraries for EEG data analyses. 
I can generate the .exe file using the command line "pyinstaller 
myScript.py" without problems. However, when I execute the program, the 
next error is shown:

FileNotFoundError: [WinError 3] The system cannot find the path specified: 
'C:\...\\AppData\\Local\\Temp\\_MEI74962\\mne\\channels\\data\\montages'

It seems like the mne libraries were not found in the analysis step of 
PyInstaller. 
I've already tried to generate a hiddenimport hook using the command line 
"pyinstaller myScript.py --hidden-import mne" but it was not successful. 
This hook is not pre-installed with PyInstaller by default, that's why I 
tried to include that new hook (called hook-mne.py) in the command line: 
"pyinstaller --onefile myScript.py --additional-hooks-dir=." but still no 
success. 

The hook-mne.py file has just the following line: hiddenimports = ['mne']

The specifications of my environment are:
Windows-10-10.0.17763-SP0
Python 3.7.3
PyInstaller 3.4

I would appreciate every suggestion.

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 post to this group, send email to pyinstaller@googlegroups.com.
Visit this group at https://groups.google.com/group/pyinstaller.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/dc9d5ed8-fcae-4298-b7bb-6d0cdae15ae3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[PyInstaller] pyinstaller adding data from csv

2019-06-30 Thread Dallon Durfey
So I'll start off by saying I'm somewhat new to python and using 
pyinstaller, but I've been reading a lot and cannot find a solution to the 
problem I'm experiencing 

I'm trying to bundle a csv file with some data when using pyinstaller. I've 
successfully done this by by using the --add-data command, as well as 
modifying the spec file. 

The problem I'm having is that once the bundle is complete, the path I've 
specified in my python code references the csv file in the original folder, 
not the one that was bundled with the exe, so when I try to run the exe on 
another computer, it crashes because that file doesn't exist. 

How can I fix this problem? I'm assuming I'll need to change the path to 
something different in my actual python code, but I'm not sure how to do 
this or what the path should be. Can someone help me? 

-- 
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 post to this group, send email to pyinstaller@googlegroups.com.
Visit this group at https://groups.google.com/group/pyinstaller.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/72584fee-4f67-4534-87b5-96ad86a2cb84%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[PyInstaller] PyInstaller cannot parse "HMODULE WINAPI LoadLibraryExW(LPCTSTR lpFileName, HANDLE hFile, DWORD dwFlags);"

2019-06-30 Thread Chuck Recker
I'm trying to make a 1 python file executable.  I'm using the command:
> pyinstaller -- -w My_program.py
and I'm getting the error:
>Traceback (most recent call last):
  File "C:\Python27\lib\runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
  File "C:\Python27\lib\runpy.py", line 72, in _run_code
exec code in run_globals
  File "C:\Python27\Scripts\pyinstaller.exe\__main__.py", line 5, in 

  File "C:\Python27\lib\site-packages\PyInstaller\__init__.py", line 16, in 

from . import compat
  File "C:\Python27\lib\site-packages\PyInstaller\compat.py", line 212, in 

from win32ctypes.pywin32 import pywintypes  # noqa: F401
  File "C:\Python27\lib\site-packages\win32ctypes\pywin32\__init__.py", 
line 11, in 
from win32ctypes.pywin32 import win32api
  File "C:\Python27\lib\site-packages\win32ctypes\pywin32\win32api.py", 
line 12, in 
from win32ctypes.core import (
  File "C:\Python27\lib\site-packages\win32ctypes\core\__init__.py", line 
36, in load_module
module = importlib.import_module(self.redirect_module)
  File "C:\Python27\lib\importlib\__init__.py", line 37, in import_module
__import__(name)
  File "C:\Python27\lib\site-packages\win32ctypes\core\cffi\_dll.py", line 
19, in 
""")
  File "C:\Python27\lib\site-packages\cffi\api.py", line 107, in cdef
self._parser.parse(csource, override=override, packed=packed)
  File "C:\Python27\lib\site-packages\cffi\cparser.py", line 167, in parse
self._internal_parse(csource)
  File "C:\Python27\lib\site-packages\cffi\cparser.py", line 173, in 
_internal_parse
ast, macros, csource = self._parse(csource)
  File "C:\Python27\lib\site-packages\cffi\cparser.py", line 130, in _parse
self.convert_pycparser_error(e, csource)
  File "C:\Python27\lib\site-packages\cffi\cparser.py", line 159, in 
convert_pycparser_error
raise api.CDefError(msg)
cffi.api.CDefError: cannot parse "HMODULE WINAPI LoadLibraryExW(LPCTSTR 
lpFileName, HANDLE hFile, DWORD dwFlags);"
:16:16: before: LoadLibraryExW

Am I missing a DLL or something?

Thanks,
Chuck

-- 
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 post to this group, send email to pyinstaller@googlegroups.com.
Visit this group at https://groups.google.com/group/pyinstaller.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/36d6005d-ce1c-4f84-8ce9-c09cc61abcf5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [PyInstaller] No module named 'packaging.specifiers' (resolved)

2019-06-30 Thread Eric Fahlgren
A recent post on py-dev (first link below) makes me think there is a way to
fix this issue without changing PyInstaller, albeit with a bit of ctypes
coding needed, at least until 3.8 is available.  (I'm sensitive to this as
I know our application will need to adapt, so I thought I'd toss this out
here, since it seems related.)

https://mail.python.org/archives/list/python-...@python.org/message/R5RIBKDOH3J5ZBI22J3VHQWD4PEUTGWK/


>From the 3.8 porting notes:

"DLL dependencies for extension modules and DLLs loaded with ctypes
 on Windows
are now resolved more securely. Only the system paths, the directory
containing the DLL or PYD file, and directories added with
add_dll_directory()
 are
searched for load-time dependencies. *Specifically, **PATH** and the
current working directory are no longer used, and modifications to these
will no longer have any effect on normal DLL resolution.* If your
application relies on these mechanisms, you should check for
add_dll_directory()
 and if
it exists, use it to add your DLLs directory while loading your library.
Note that Windows 7 users will need to ensure that Windows Update KB2533625
has been installed (this is also verified by the installer). (See bpo-36085
.) "

On Thu, Jun 20, 2019 at 11:54 AM Eric Fahlgren 
wrote:

> Randy,
>
> Thanks for the background, always useful to know other's problems in case
> there's any overlap.
>
> Eric
>
> On Wed, Jun 19, 2019 at 2:38 PM gpraceman  wrote:
>
>> Eric,
>>
>> I had been using PyInstaller to package up my Gtk3 app for years, on
>> Python 3.4.  My problem came about when I needed to upgrade Gtk3 to a newer
>> version.  Only way it seems to install Gtk3 on Windows, above Python 3.4,
>> is using MSYS2.  MSYS2 only installs the latest version of Python
>> (3.7.3).   It took some doing, but I was finally able to get Gtk3 working
>> on Python 3.7.  However, PyInstaller would not package up the app.   There
>> was no moving backwards to Python 3.6, with MSYS2, to give that a try.  In
>> a web search, others reported issues packaging with 3.7, but were
>> successful if reverting to 3.6.  As, I need to get my app delivered soon, I
>> chose to dive into the PyInstaller code and try to fix the packaging issues
>> with 3.7.
>>
>> Also, on my macOS machine, same app would not package on Python 3.7.3.  I
>> got some "Security-Alert: try to store file outside of dist-directory"
>> error.  Switched to Python 3.6.8 (thanks to pyenv) and PyInstaller was able
>> to package up the app.
>>
>> Not sure why the version of Python makes much of a difference with
>> PyInstaller, but it sure seems to.
>>
>> Randy
>>
>> On Wednesday, June 19, 2019 at 10:11:06 AM UTC-6, Eric Fahlgren wrote:
>>>
>>> Since you mention Py 3.7 specifically, I'm just curious as to how much
>>> of this you feel relates to Py 3.7?  When I moved from 3.6.3 to 3.7.1 last
>>> October, it was pretty much painless, but we're using wxPython for gui and
>>> it has been very stable in this regard for years.  Most of my PyInstaller
>>> drama comes from SciPy updates, which always seem to add or restructure
>>> some DLL import somewhere.
>>>
>>> On Wed, Jun 19, 2019 at 5:02 AM gpraceman  wrote:
>>>
 Man, what a pain in the butt it has been to get PyInstaller to work
 with Python 3.7 on Windows 10, but I finally got my Gtk3+ app to package
 and run.

 First, I ran into a big issue with DLL's not being found.  See Issue
 #4125 .  To
 resolve that issue, I had to download and install the dev version of
 PyInstaller.  Then I implemented the proposed changes from Pull #4240
 , including
 htgoebel's proposed edits.  Now, when I package my app, it finds all of the
 needed DLL's.

 However, when running the packaged app, I got a "No module named
 'packaging.specifiers'" error.  I had to edit the
 site-packages/pkg_resources/__init__.py file.  I replaced the __import__()
 statements, lines 89-92, with regular import statements.  Repackaged the
 app and now it runs with no errors!  That is a huge relief.

 Hopefully, this information will help someone.  At a minimum, if should
 serve to confirm that the changes in Pull #4240, along with the proposed
 edits, do work and should be implemented.

 --
 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 pyins...@googlegroups.com.
 To post to this group, send email to pyins...@googlegroups.com.
 Visit this group at https://groups.google.com/group/pyinstaller.
 To view 

[PyInstaller] Failed to use mne libraries in runtime. Pyinstaller

2019-06-30 Thread Ferney beltran velandia
Hi everyone,

I am trying to make a .exe file from python code, which imports mne 
libraries for EEG data analyses. 
I can generate the .exe file using the command line "pyinstaller 
myScript.py" without problems. However, when I execute the program, the 
next error is shown:

FileNotFoundError: [WinError 3] The system cannot find the path specified: 
'C:\...\\AppData\\Local\\Temp\\_MEI74962\\mne\\channels\\data\\montages'

It seems like the mne libraries were not found in the analysis step of 
PyInstaller. 
I've already tried to generate a hiddenimport hook using the command line 
"pyinstaller myScript.py --hidden-import mne" but it was not successful. 
This hook is not pre-installed with PyInstaller by default, that's why I 
tried to include that new hook (called hook-mne.py) in the command line: 
"pyinstaller --onefile myScript.py --additional-hooks-dir=." but still no 
success. 

The hook-mne.py file has just the following line: hiddenimports = ['mne']

The specifications of my environment are:
Windows-10-10.0.17763-SP0
Python 3.7.3
PyInstaller 3.4

I would appreciate every suggestion.

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 post to this group, send email to pyinstaller@googlegroups.com.
Visit this group at https://groups.google.com/group/pyinstaller.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/8a44ac81-3ae5-4887-aa22-c1705c99f684%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[PyInstaller] Pyinstaller bootloader fails compile on AIX 7.2

2019-06-30 Thread Bruce Van Horn
I'm trying to install pyinstaller on AIX 7.2.

*pip3 install pyinstaller *gives me

Waf: Entering directory 
`/tmp/pip-install-9qmkycy2/pyinstaller/bootloader/build/debug'
  [ 1/13] Compiling src/pyi_python.c
  [ 2/13] Compiling src/pyi_global.c
  [ 3/13] Compiling src/main.c
  [ 4/13] Compiling src/pyi_archive.c
  [ 5/13] Compiling src/pyi_utils.c
  [ 6/13] Compiling src/pyi_launch.c
  [ 7/13] Compiling src/pyi_path.c
  [ 8/13] Compiling src/pyi_python27_compat.c
  [ 9/13] Compiling src/pyi_main.c
  [10/13] Compiling src/pyi_win32_utils.c
  [11/13] Compiling src/pyi_pythonlib.c
  ../../src/pyi_path.c: In function 'pyi_path_join':
  ../../src/pyi_path.c:143:5: error: 'strncpy' specified bound depends on 
the length of the source argument [-Werror=stringop-overflow=]
   strncpy(result, path1, strlen(path1));
   ^
  ../../src/pyi_path.c:156:9: error: 'strncat' specified bound depends on 
the length of the source argument [-Werror=stringop-overflow=]
   strncat(result, path2, len - 2);
   ^~~
  ../../src/pyi_path.c:152:11: note: length computed here
   len = strlen(path2);
 ^
  cc1: all warnings being treated as errors

  ../../src/pyi_pythonlib.c: In function 'pyi_pylib_start_python':
  ../../src/pyi_pythonlib.c:469:9: error: 'strncat' specified bound 1 
equals source length [-Werror=stringop-overflow=]
   strncat(pypath, PYI_SEPSTR, strlen(PYI_SEPSTR));
   ^~~
  ../../src/pyi_pythonlib.c:470:9: error: 'strncat' specified bound 16 
equals source length [-Werror=stringop-overflow=]
   strncat(pypath, "base_library.zip", strlen("base_library.zip"));
   ^~~
  ../../src/pyi_pythonlib.c:471:9: error: 'strncat' specified bound 1 
equals source length [-Werror=stringop-overflow=]
   strncat(pypath, PYI_PATHSEPSTR, strlen(PYI_PATHSEPSTR));
   ^~~
  ../../src/pyi_pythonlib.c:468:9: error: 'strncpy' specified bound depends 
on the length of the source argument [-Werror=stringop-overflow=]
   strncpy(pypath, status->mainpath, strlen(status->mainpath));
   ^~~
  ../../src/pyi_pythonlib.c:472:9: error: 'strncat' specified bound depends 
on the length of the source argument [-Werror=stringop-overflow=]
   strncat(pypath, status->mainpath, strlen(status->mainpath));
   ^~~
  ../../src/pyi_pythonlib.c:464:9: error: 'strncpy' specified bound depends 
on the length of the source argument [-Werror=stringop-overflow=]
   strncpy(pypath, status->mainpath, strlen(status->mainpath));
   ^~~
  cc1: all warnings being treated as errors

  Waf: Leaving directory 
`/tmp/pip-install-9qmkycy2/pyinstaller/bootloader/build/debug'
  Build failed
   -> task in 'run_d' failed with exit status 1 (run with -v to display 
more information)
   -> task in 'run_d' failed with exit status 1 (run with -v to display 
more information)
  No precompiled bootloader found. Trying to compile it for you ...
  ERROR: Failed compiling the bootloader. Please compile manually and rerun 
setup.py

I downloaded the source and tried to build the bootloader manually as it 
suggests, but I get the same errors when I do that.

Is there a way to successfully install on AIX 7.2?

-- 
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 post to this group, send email to pyinstaller@googlegroups.com.
Visit this group at https://groups.google.com/group/pyinstaller.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/bcd63852-e32e-4811-ae0b-a8c681e59c03%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[PyInstaller] Pyinstaller on AIX

2019-06-30 Thread Bruce Van Horn
I'm trying to install pyinstaller on aix.  When I use pip (python 3) to 
install it, it tells me the bootloader couldn't be built, then it says to 
try to build it manually.

Building it manually yields a set of errors:

../../src/pyi_path.c: In function 'pyi_path_join':
../../src/pyi_path.c:143:5: error: 'strncpy' specified bound depends on the 
length of the source argument [-Werror=stringop-overflow=]
 strncpy(result, path1, strlen(path1));
 ^
../../src/pyi_path.c:156:9: error: 'strncat' specified bound depends on the 
length of the source argument [-Werror=stringop-overflow=]
 strncat(result, path2, len - 2);
 ^~~
../../src/pyi_path.c:152:11: note: length computed here
 len = strlen(path2);
   ^
cc1: all warnings being treated as errors

../../src/pyi_pythonlib.c: In function 'pyi_pylib_start_python':
../../src/pyi_pythonlib.c:469:9: error: 'strncat' specified bound 1 equals 
source length [-Werror=stringop-overflow=]
 strncat(pypath, PYI_SEPSTR, strlen(PYI_SEPSTR));
 ^~~
../../src/pyi_pythonlib.c:470:9: error: 'strncat' specified bound 16 equals 
source length [-Werror=stringop-overflow=]
 strncat(pypath, "base_library.zip", strlen("base_library.zip"));
 ^~~
../../src/pyi_pythonlib.c:471:9: error: 'strncat' specified bound 1 equals 
source length [-Werror=stringop-overflow=]
 strncat(pypath, PYI_PATHSEPSTR, strlen(PYI_PATHSEPSTR));
 ^~~
../../src/pyi_pythonlib.c:468:9: error: 'strncpy' specified bound depends 
on the length of the source argument [-Werror=stringop-overflow=]
 strncpy(pypath, status->mainpath, strlen(status->mainpath));
 ^~~
../../src/pyi_pythonlib.c:472:9: error: 'strncat' specified bound depends 
on the length of the source argument [-Werror=stringop-overflow=]
 strncat(pypath, status->mainpath, strlen(status->mainpath));
 ^~~
../../src/pyi_pythonlib.c:464:9: error: 'strncpy' specified bound depends 
on the length of the source argument [-Werror=stringop-overflow=]
 strncpy(pypath, status->mainpath, strlen(status->mainpath));
 ^~~

I'm not a C++ programmer, but I took a stab at it and changed strncpy to 
just strcpy, strncat to strcat, etc.  It didn't work (probably obvious to 
all you C++ programmers).

Is there a way to install pyinstaller on AIX?  It does say it's supported 
on the pyinstaller web site.

-- 
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 post to this group, send email to pyinstaller@googlegroups.com.
Visit this group at https://groups.google.com/group/pyinstaller.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/e101312e-df9b-4757-b6b5-103b51371d36%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[PyInstaller] Authentication on exe file

2019-06-30 Thread Chee Siang Ng
I created an exe file using PyInstaller.
The Python script used this 
library: https://pypi.org/project/requests-negotiate-sspi/ for 
authentication.
For some reason, after I changed the script from Python to exe, it lost 
authentication rights.
Apparently it can't import the authentication library into the exe.
Any idea how to get the library into the exe file?
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 post to this group, send email to pyinstaller@googlegroups.com.
Visit this group at https://groups.google.com/group/pyinstaller.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/a911f835-ba24-4239-9eac-612ae9f388db%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.