Re: [PyInstaller] pyinstaller not working with gphoto2; how do i force a brew library into the build

2020-04-03 Thread Abasi Brown
1. Try opening the spec file and after the line that says 'block_cipher =
None' put:

def get_gphoto2_path():
 import gphoto2
 gphoto2_path = gphoto2.__path__[0]
 return gphoto2_path

2. Then after the lines that say 'pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)' put:

dict_tree = Tree(get_gphoto2_path(), prefix='gphoto2', excludes=["*.pyc"])
a.datas += dict_tree
a.binaries = filter(lambda x: 'gphoto2' not in x[0], a.binaries)

3. Then go to your command line and run the following command:

pyinstaller your_file_name.spec --specpath=test

Then run the executable.

On Fri, Apr 3, 2020 at 3:19 AM Craigs List  wrote:

> I'm attempting to build a project with gphoto2.  gphoto2 requires brew
> install libgphoto2.
>
> The binary is created successfully, but when I run the binary on a machine
> that doesn't have libgphoto2, it fails.  once i brew install the package is
> continues to work.
>
> help?
>
> --
> 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/bd4a338a-1941-48dc-870f-36d4a2b1a57f%40googlegroups.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/CA%2BjnrzM1vKKTcmw9YW%2BTNqhFc2kK%2B7HO1HX1DNmbzvLw7oLHrQ%40mail.gmail.com.


Re: [PyInstaller] pyinstaller + librosa: "Module not found" for EXE, even w/ hidden import?

2020-04-03 Thread Abasi Brown
revise step one:

def get_librosa_path():
 import librosa
 librosa_path = librosa.__path__[0]
 return librosa_path


On Fri, Apr 3, 2020 at 8:38 AM Abasi Brown  wrote:

> 1. Try opening the spec file and after the line that says 'block_cipher =
> None' put:
>
> def get_librosa_path():
>  import librosa
>  librosa_path = sklearn.__path__[0]
>  return librosa_path
>
> 2. Then after the lines that say 'pyz = PYZ(a.pure, a.zipped_data,
> cipher=block_cipher)' put:
>
> dict_tree = Tree(get_librosa_path(), prefix='librosa', excludes=["*.pyc"])
> a.datas += dict_tree
> a.binaries = filter(lambda x: 'librosa' not in x[0], a.binaries)
>
> 3. Then go to your command line and run the following command:
>
> pyinstaller your_file_name.spec --specpath=test
>
> Then run the executable.  You will likely discover you need to import
> other libraries.  Any library that doesn't work as a hidden import can be
> imported this way just replace 'librosa' with the name of the library you
> are trying to include.
>

-- 
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/CA%2BjnrzPz--s0KepB9B-g0%3Dkw1Y9RsC6AtTnKFmfa5P2n%2B%2Bsc%3Dw%40mail.gmail.com.


Re: [PyInstaller] pyinstaller not working with gphoto2; how do i force a brew library into the build

2020-04-03 Thread Abasi Brown
1. Try opening the spec file and after the line that says 'block_cipher =
None' put:

def get_libgphoto2_path():
 import libgphoto2
 libgphoto2_path = libgphoto2.__path__[0]
 return libgphoto2_path

2. Then after the lines that say 'pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)' put:

dict_tree = Tree(get_libgphoto2_path(), prefix='libgphoto2',
excludes=["*.pyc"])
a.datas += dict_tree
a.binaries = filter(lambda x: 'libgphoto2' not in x[0], a.binaries)

3. Then go to your command line and run the following command:

pyinstaller your_file_name.spec --specpath=test

Then run the executable.


On Fri, Apr 3, 2020 at 9:06 AM Abasi Brown  wrote:

> 1. Try opening the spec file and after the line that says 'block_cipher =
> None' put:
>
> def get_gphoto2_path():
>  import gphoto2
>  gphoto2_path = gphoto2.__path__[0]
>  return gphoto2_path
>
> 2. Then after the lines that say 'pyz = PYZ(a.pure, a.zipped_data,
> cipher=block_cipher)' put:
>
> dict_tree = Tree(get_gphoto2_path(), prefix='gphoto2', excludes=["*.pyc"])
> a.datas += dict_tree
> a.binaries = filter(lambda x: 'gphoto2' not in x[0], a.binaries)
>
> 3. Then go to your command line and run the following command:
>
> pyinstaller your_file_name.spec --specpath=test
>
> Then run the executable.
>
> On Fri, Apr 3, 2020 at 3:19 AM Craigs List  wrote:
>
>> I'm attempting to build a project with gphoto2.  gphoto2 requires brew
>> install libgphoto2.
>>
>> The binary is created successfully, but when I run the binary on a
>> machine that doesn't have libgphoto2, it fails.  once i brew install the
>> package is continues to work.
>>
>> help?
>>
>> --
>> 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/bd4a338a-1941-48dc-870f-36d4a2b1a57f%40googlegroups.com
>> <https://groups.google.com/d/msgid/pyinstaller/bd4a338a-1941-48dc-870f-36d4a2b1a57f%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>

-- 
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/CA%2BjnrzNenMRE1iCH-d0VmdNi_4WCe6eu1N1hQBFJcc0rX7FZyw%40mail.gmail.com.


Re: [PyInstaller] pyinstaller + librosa: "Module not found" for EXE, even w/ hidden import?

2020-04-03 Thread Abasi Brown
1. Try opening the spec file and after the line that says 'block_cipher =
None' put:

def get_librosa_path():
 import librosa
 librosa_path = sklearn.__path__[0]
 return librosa_path

2. Then after the lines that say 'pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)' put:

dict_tree = Tree(get_librosa_path(), prefix='librosa', excludes=["*.pyc"])
a.datas += dict_tree
a.binaries = filter(lambda x: 'librosa' not in x[0], a.binaries)

3. Then go to your command line and run the following command:

pyinstaller your_file_name.spec --specpath=test

Then run the executable.  You will likely discover you need to import other
libraries.  Any library that doesn't work as a hidden import can be
imported this way just replace 'librosa' with the name of the library you
are trying to include.

-- 
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/CA%2BjnrzP-Rp-VyUp-Rgig7j%3Dk6gRKZnHURfppR%3D1d8NcQwvaQBQ%40mail.gmail.com.


Re: [PyInstaller] numpy using mkl libraries

2020-07-07 Thread Abasi Brown
include numpy as a hidden library from the command line:

pyinstaller your_script.py --hidden-import=numpy



On Mon, Jul 6, 2020 at 10:41 AM Ricardo A Corredor J 
wrote:

> Hi everyone,
>
> I have a python code that internally uses *numpy *(plus other
> dependencies) to perform some basic numerical operations.
>
> I installed *numpy* as "*conda install numpy*" (Windows 10) meaning that
> it includes and uses the *mkl libraries*. After running pyinstaller on
> this code, I have an executable that contains the *mkl libraries. *I can
> see those dlls when I run the executable and check the folder created in
> Temp with all the dependencies uncompressed. Nevertheless, when I run the
> executable, t*he program crashes* when it tries to use numpy with the
> optimized mkl libraries (a *numpy.dot*(..,..) operation). I copied the
> executable to the folder where I have the dlls of the mkl libraries in my
> system and the program runs properly.
>
> *Question*: why the mkl libraries are not properly detected/used during
> runtime even if they are included in the executable?  Is there a way to set
> the .specs to link properly to those dlls instead of copying always the
> dlls next to the program or adding to the path? If not, is there a way to
> properly exclude the mkl libs from the executable if in any case I need to
> use them from a different folder ?
>
> Thanks,
>
> Ricardo
> RaC
>
> --
> 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/20a0f688-4032-409c-b48f-3e777a32cb57o%40googlegroups.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/CA%2BjnrzMj-4f1HMBwYYHn%2BTx5DDWkFhZXH9QbMZg7j5YZztA3OQ%40mail.gmail.com.


Re: [PyInstaller] PyDrive not getting included in PyInstaller package

2021-03-29 Thread Abasi Brown
you need to add pydrive using a hook, or directly as a tree in the .spec
file that pyinstaller creates.  I dont know if you can do the second option
using fbs freeze or not.


On Sat, Mar 27, 2021 at 12:24 PM Eddie Espinal 
wrote:

> I have an pyqt5 app that uses the pydrive library to access Google Drive.
> If I create the pyinstaller executable file, when I run it the app crashes
> and won't open. If I comment out the logic to include pydrive it works fine.
>
> Is there a way to include the pydrive library with pyinstaller so it can
> work properly?
>
> I already tried adding the hiddenimports and nothing.  Does anyone have a
> solution to a similar problem?
>
> P.s. I'm using `fbs freeze` to create the executable file which under the
> hood it uses PyInstaller.
>
> https://build-system.fman.io/manual/
>
> Thanks in advance for your help!
>
> Sincerely,
>
> Eddie.
>
> --
> 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/d42c776c-46d8-44c3-9b2a-d9f2d55bb61en%40googlegroups.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/CA%2BjnrzPbOgdKHKf3Qccwg3qH7UZWfnY2TsmfzLKJuz1PGW8%2BeQ%40mail.gmail.com.