Pyinstaller: TypeError: an integer is required (got type bytes) when compiling any script

Created on 8 Jun 2019  ·  59Comments  ·  Source: pyinstaller/pyinstaller

When i compile any script using pyinstaller i get TypeError: an integer is required (got type bytes)

i tried both with and without UPX, still the same error, i even tried installing the latest dev builds and it's still the same error.

Here's the log:

PS C:\Users\sl4v\Desktop\Projects\wikia-download-gui> py -m PyInstaller .\wikia_dl_gui.py --debug=all
104 INFO: PyInstaller: 3.5.dev0+0cbe7fba3
104 INFO: Python: 3.8.0b1
106 INFO: Platform: Windows-10-10.0.17134-SP0
113 INFO: wrote C:\Users\sl4v\Desktop\Projects\wikia-download-gui\wikia_dl_gui.spec
116 INFO: UPX is not available.
118 INFO: Extending PYTHONPATH with paths
['C:\\Users\\sl4v\\Desktop\\Projects\\wikia-download-gui',
 'C:\\Users\\sl4v\\Desktop\\Projects\\wikia-download-gui']
119 INFO: checking Analysis
267 INFO: checking PYZ
267 INFO: Building PYZ because PYZ-00.toc is non existent
268 INFO: Building PYZ (ZlibArchive) C:\Users\sl4v\Desktop\Projects\wikia-download-gui\build\wikia_dl_gui\PYZ-00.pyz
Traceback (most recent call last):
  File "C:\Users\sl4v\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 192, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\sl4v\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\sl4v\AppData\Local\Programs\Python\Python38\lib\site-packages\PyInstaller\__main__.py", line 118, in <module>
    run()
  File "C:\Users\sl4v\AppData\Local\Programs\Python\Python38\lib\site-packages\PyInstaller\__main__.py", line 111, in run
    run_build(pyi_config, spec_file, **vars(args))
  File "C:\Users\sl4v\AppData\Local\Programs\Python\Python38\lib\site-packages\PyInstaller\__main__.py", line 63, in run_build
    PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
  File "C:\Users\sl4v\AppData\Local\Programs\Python\Python38\lib\site-packages\PyInstaller\building\build_main.py", line 844, in main
    build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
  File "C:\Users\sl4v\AppData\Local\Programs\Python\Python38\lib\site-packages\PyInstaller\building\build_main.py", line 791, in build
    exec(code, spec_namespace)
  File "C:\Users\sl4v\Desktop\Projects\wikia-download-gui\wikia_dl_gui.spec", line 18, in <module>
    pyz = PYZ(a.pure, a.zipped_data,
  File "C:\Users\sl4v\AppData\Local\Programs\Python\Python38\lib\site-packages\PyInstaller\building\api.py", line 98, in __init__
    self.__postinit__()
  File "C:\Users\sl4v\AppData\Local\Programs\Python\Python38\lib\site-packages\PyInstaller\building\datastruct.py", line 158, in __postinit__
    self.assemble()
  File "C:\Users\sl4v\AppData\Local\Programs\Python\Python38\lib\site-packages\PyInstaller\building\api.py", line 128, in assemble
    self.code_dict = {
  File "C:\Users\sl4v\AppData\Local\Programs\Python\Python38\lib\site-packages\PyInstaller\building\api.py", line 129, in <dictcomp>
    key: strip_paths_in_code(code)
  File "C:\Users\sl4v\AppData\Local\Programs\Python\Python38\lib\site-packages\PyInstaller\building\utils.py", line 652, in strip_paths_in_code
    consts = tuple(
  File "C:\Users\sl4v\AppData\Local\Programs\Python\Python38\lib\site-packages\PyInstaller\building\utils.py", line 653, in <genexpr>
    strip_paths_in_code(const_co, new_filename)
  File "C:\Users\sl4v\AppData\Local\Programs\Python\Python38\lib\site-packages\PyInstaller\building\utils.py", line 660, in strip_paths_in_code
    return code_func(co.co_argcount, co.co_kwonlyargcount, co.co_nlocals, co.co_stacksize,
TypeError: an integer is required (got type bytes)
invalid

Most helpful comment

pip install https://github.com/pyinstaller/pyinstaller/archive/develop.tar.gz

Direct install the latest version can compatible with python 3.8

All 59 comments

Note that i was using Python 3.8.

Seems like this is constructing a code object and could be due to PEP 570 implementation : https://github.com/python/cpython/pull/12701

types.CodeType has a new parameter in the second position of the constructor (posonlyargcount) to support positional-only arguments defined in PEP 570. The first argument (argcount) now represents the total number of positional arguments (including positional-only arguments). A new replace() method of types.CodeType can be used to make the code future-proof.

I have the exact same error, using python3.8.0 and pyinstaller 3.5

Bump

I have this same issue. Various other threads claim this was fixed but it definitely persists. See below
https://github.com/pyinstaller/pyinstaller/pull/4440

Me too. Exactly same error. Python 3.8.0 and PyInstaller 3.5

I'm also seeing this error. I'm using pyenv 1.2.13 to create a python 3.8.0 environment (sudo env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install 3.8.0), and PyInstaller 3.5 on Mac OSX High Sierra.

pyinstaller create_token.py
66 INFO: PyInstaller: 3.5
66 INFO: Python: 3.8.0
73 INFO: Platform: macOS-10.13.3-x86_64-i386-64bit
74 INFO: wrote /Users/fowliena/Documents/repositories/aidna.docker.ansible-test/create_token.spec
77 INFO: UPX is not available.
78 INFO: Extending PYTHONPATH with paths
['/Users/fowliena/Documents/repositories/aidna.docker.ansible-test',
 '/Users/fowliena/Documents/repositories/aidna.docker.ansible-test']
78 INFO: checking Analysis
82 INFO: Building because hiddenimports changed
82 INFO: Initializing module dependency graph...
84 INFO: Initializing module graph hooks...
85 INFO: Analyzing base_library.zip ...
3616 INFO: running Analysis Analysis-00.toc
3625 INFO: Caching module hooks...
3628 INFO: Analyzing /Users/fowliena/Documents/repositories/aidna.docker.ansible-test/create_token.py
3780 INFO: Processing pre-safe import module hook   urllib3.packages.six.moves
5000 INFO: Loading module hooks...
5000 INFO: Loading module hook "hook-encodings.py"...
5065 INFO: Loading module hook "hook-certifi.py"...
5067 INFO: Loading module hook "hook-xml.py"...
5121 INFO: Loading module hook "hook-pydoc.py"...
5140 INFO: Looking for ctypes DLLs
5144 INFO: Analyzing run-time hooks ...
5147 INFO: Including run-time hook 'pyi_rth_multiprocessing.py'
5150 INFO: Including run-time hook 'pyi_rth_certifi.py'
5156 INFO: Looking for dynamic libraries
5259 INFO: Looking for eggs
5259 INFO: Using Python library /Users/fowliena/.pyenv/versions/3.8.0/lib/libpython3.8.dylib
5266 INFO: Warnings written to /Users/fowliena/Documents/repositories/aidna.docker.ansible-test/build/create_token/warn-create_token.txt
5307 INFO: Graph cross-reference written to /Users/fowliena/Documents/repositories/aidna.docker.ansible-test/build/create_token/xref-create_token.html
5326 INFO: checking PYZ
5326 INFO: Building PYZ because PYZ-00.toc is non existent
5326 INFO: Building PYZ (ZlibArchive) /Users/fowliena/Documents/repositories/aidna.docker.ansible-test/build/create_token/PYZ-00.pyz
Traceback (most recent call last):
  File "/Users/fowliena/.pyenv/versions/3.8.0/bin/pyinstaller", line 10, in <module>
    sys.exit(run())
  File "/Users/fowliena/.pyenv/versions/3.8.0/lib/python3.8/site-packages/PyInstaller/__main__.py", line 111, in run
    run_build(pyi_config, spec_file, **vars(args))
  File "/Users/fowliena/.pyenv/versions/3.8.0/lib/python3.8/site-packages/PyInstaller/__main__.py", line 63, in run_build
    PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
  File "/Users/fowliena/.pyenv/versions/3.8.0/lib/python3.8/site-packages/PyInstaller/building/build_main.py", line 844, in main
    build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
  File "/Users/fowliena/.pyenv/versions/3.8.0/lib/python3.8/site-packages/PyInstaller/building/build_main.py", line 791, in build
    exec(code, spec_namespace)
  File "/Users/fowliena/Documents/repositories/aidna.docker.ansible-test/create_token.spec", line 18, in <module>
    pyz = PYZ(a.pure, a.zipped_data,
  File "/Users/fowliena/.pyenv/versions/3.8.0/lib/python3.8/site-packages/PyInstaller/building/api.py", line 98, in __init__
    self.__postinit__()
  File "/Users/fowliena/.pyenv/versions/3.8.0/lib/python3.8/site-packages/PyInstaller/building/datastruct.py", line 158, in __postinit__
    self.assemble()
  File "/Users/fowliena/.pyenv/versions/3.8.0/lib/python3.8/site-packages/PyInstaller/building/api.py", line 128, in assemble
    self.code_dict = {
  File "/Users/fowliena/.pyenv/versions/3.8.0/lib/python3.8/site-packages/PyInstaller/building/api.py", line 129, in <dictcomp>
    key: strip_paths_in_code(code)
  File "/Users/fowliena/.pyenv/versions/3.8.0/lib/python3.8/site-packages/PyInstaller/building/utils.py", line 652, in strip_paths_in_code
    consts = tuple(
  File "/Users/fowliena/.pyenv/versions/3.8.0/lib/python3.8/site-packages/PyInstaller/building/utils.py", line 653, in <genexpr>
    strip_paths_in_code(const_co, new_filename)
  File "/Users/fowliena/.pyenv/versions/3.8.0/lib/python3.8/site-packages/PyInstaller/building/utils.py", line 652, in strip_paths_in_code
    consts = tuple(
  File "/Users/fowliena/.pyenv/versions/3.8.0/lib/python3.8/site-packages/PyInstaller/building/utils.py", line 653, in <genexpr>
    strip_paths_in_code(const_co, new_filename)
  File "/Users/fowliena/.pyenv/versions/3.8.0/lib/python3.8/site-packages/PyInstaller/building/utils.py", line 660, in strip_paths_in_code
    return code_func(co.co_argcount, co.co_kwonlyargcount, co.co_nlocals, co.co_stacksize,
TypeError: an integer is required (got type bytes)

Not sure if it helps at all, but the issue also occurs when UPX is installed.

pyinstaller create_token.py
60 INFO: PyInstaller: 3.5
60 INFO: Python: 3.8.0
77 INFO: Platform: macOS-10.13.3-x86_64-i386-64bit
78 INFO: wrote /Users/fowliena/Documents/repositories/aidna.docker.ansible-test/create_token.spec
86 INFO: UPX is available.
88 INFO: Extending PYTHONPATH with paths
['/Users/fowliena/Documents/repositories/aidna.docker.ansible-test',
 '/Users/fowliena/Documents/repositories/aidna.docker.ansible-test']
88 INFO: checking Analysis
116 INFO: checking PYZ
116 INFO: Building PYZ because PYZ-00.toc is non existent
116 INFO: Building PYZ (ZlibArchive) /Users/fowliena/Documents/repositories/aidna.docker.ansible-test/build/create_token/PYZ-00.pyz
Traceback (most recent call last):
  File "/Users/fowliena/.pyenv/versions/3.8.0/bin/pyinstaller", line 10, in <module>
    sys.exit(run())
  File "/Users/fowliena/.pyenv/versions/3.8.0/lib/python3.8/site-packages/PyInstaller/__main__.py", line 111, in run
    run_build(pyi_config, spec_file, **vars(args))
  File "/Users/fowliena/.pyenv/versions/3.8.0/lib/python3.8/site-packages/PyInstaller/__main__.py", line 63, in run_build
    PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
  File "/Users/fowliena/.pyenv/versions/3.8.0/lib/python3.8/site-packages/PyInstaller/building/build_main.py", line 844, in main
    build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
  File "/Users/fowliena/.pyenv/versions/3.8.0/lib/python3.8/site-packages/PyInstaller/building/build_main.py", line 791, in build
    exec(code, spec_namespace)
  File "/Users/fowliena/Documents/repositories/aidna.docker.ansible-test/create_token.spec", line 18, in <module>
    pyz = PYZ(a.pure, a.zipped_data,
  File "/Users/fowliena/.pyenv/versions/3.8.0/lib/python3.8/site-packages/PyInstaller/building/api.py", line 98, in __init__
    self.__postinit__()
  File "/Users/fowliena/.pyenv/versions/3.8.0/lib/python3.8/site-packages/PyInstaller/building/datastruct.py", line 158, in __postinit__
    self.assemble()
  File "/Users/fowliena/.pyenv/versions/3.8.0/lib/python3.8/site-packages/PyInstaller/building/api.py", line 128, in assemble
    self.code_dict = {
  File "/Users/fowliena/.pyenv/versions/3.8.0/lib/python3.8/site-packages/PyInstaller/building/api.py", line 129, in <dictcomp>
    key: strip_paths_in_code(code)
  File "/Users/fowliena/.pyenv/versions/3.8.0/lib/python3.8/site-packages/PyInstaller/building/utils.py", line 652, in strip_paths_in_code
    consts = tuple(
  File "/Users/fowliena/.pyenv/versions/3.8.0/lib/python3.8/site-packages/PyInstaller/building/utils.py", line 653, in <genexpr>
    strip_paths_in_code(const_co, new_filename)
  File "/Users/fowliena/.pyenv/versions/3.8.0/lib/python3.8/site-packages/PyInstaller/building/utils.py", line 660, in strip_paths_in_code
    return code_func(co.co_argcount, co.co_kwonlyargcount, co.co_nlocals, co.co_stacksize,
TypeError: an integer is required (got type bytes)

请问你解决了?我也是Python3.8 +3.5报同样的错误,哪怕最简单的 print "hell oworld" 编译为exe都报错
10668 INFO: Warnings written to E:\exec\test\build\helloworld\warn-helloworld.txt
10729 INFO: Graph cross-reference written to E:\exec\test\build\helloworld\xref-helloworld.html
10754 INFO: checking PYZ
10755 INFO: Building PYZ because PYZ-00.toc is non existent
10755 INFO: Building PYZ (ZlibArchive) E:\exec\test\build\helloworld\PYZ-00.pyz
Traceback (most recent call last):
File "c:users\administrator\appdata\local\programs\python\python38\lib\runpy.py", line 192, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:users\administrator\appdata\local\programs\python\python38\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\UsersAdministratorAppData\Local\Programs\Python\Python38\Scripts\pyinstaller.exe__main__.py", line 7, in
File "c:users\administrator\appdata\local\programs\python\python38\lib\site-packages\PyInstaller__main__.py", line 111, in run
run_build(pyi_config, spec_file, *vars(args))
File "c:users\administrator\appdata\local\programs\python\python38\lib\site-packages\PyInstaller__main__.py", line 63, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, *
kwargs)
File "c:users\administrator\appdata\local\programs\python\python38\lib\site-packages\PyInstaller\building\build_main.py", line 844, in main
build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
File "c:users\administrator\appdata\local\programs\python\python38\lib\site-packages\PyInstaller\building\build_main.py", line 791, in build
exec(code, spec_namespace)
File "E:\exec\test\helloworld.spec", line 18, in
pyz = PYZ(a.pure, a.zipped_data,
File "c:users\administrator\appdata\local\programs\python\python38\lib\site-packages\PyInstaller\building\api.py", line 98, in __init__
self.__postinit__()
File "c:users\administrator\appdata\local\programs\python\python38\lib\site-packages\PyInstaller\building\datastruct.py", line 158, in __postinit__
self.assemble()
File "c:users\administrator\appdata\local\programs\python\python38\lib\site-packages\PyInstaller\building\api.py", line 128, in assemble
self.code_dict = {
File "c:users\administrator\appdata\local\programs\python\python38\lib\site-packages\PyInstaller\building\api.py", line 129, in
key: strip_paths_in_code(code)
File "c:users\administrator\appdata\local\programs\python\python38\lib\site-packages\PyInstaller\buildingutils.py", line 652, in strip_paths_in_code
consts = tuple(
File "c:users\administrator\appdata\local\programs\python\python38\lib\site-packages\PyInstaller\buildingutils.py", line 653, in
strip_paths_in_code(const_co, new_filename)
File "c:users\administrator\appdata\local\programs\python\python38\lib\site-packages\PyInstaller\buildingutils.py", line 660, in strip_paths_in_code
return code_func(co.co_argcount, co.co_kwonlyargcount, co.co_nlocals, co.co_stacksize,
TypeError: an integer is required (got type bytes)

I have the same problem with Python 3.8

pip install https://github.com/pyinstaller/pyinstaller/archive/develop.tar.gz

Direct install the latest version can compatible with python 3.8

use python 3.7.5 is ok.

Same here, but fixed with latest development version provided by shuax.

pip install https://github.com/pyinstaller/pyinstaller/archive/develop.tar.gz

Direct install the latest version can compatible with python 3.8

Thank you!

use python 3.7.5 is ok.

Thanks)

pip install https://github.com/pyinstaller/pyinstaller/archive/develop.tar.gz
Direct install the latest version can compatible with python 3.8

Thank you @shuax , it worked! I thought that the error was caused by the pickled file that would have to be somehow "linked", but actually it's enough to just put them together in the same directory. Thank you again.

pip install https://github.com/pyinstaller/pyinstaller/archive/develop.tar.gz

Direct install the latest version can compatible with python 3.8

Thank you @shuax , it is ok

pip install https://github.com/pyinstaller/pyinstaller/archive/develop.tar.gz

Instalación directa, la última versión puede ser compatible con Python 3.8

Gracias !

Seeing as how the dev version currently fixes this error that everyone with Python 3.8 will come across, it should probably be released as soon as possible.

Seeing as how the dev version currently fixes this error that everyone with Python 3.8 will come across, it should probably be released as soon as possible.

Fortunately, until then, it's not too difficult to find this thread.

pip install https://github.com/pyinstaller/pyinstaller/archive/develop.tar.gz

Direct install the latest version can compatible with python 3.8

thanks a lot man!

Closing as invalid. Python 3.8 is not yet supported.

@ghazias I guess this thread will now be a bit harder to find with it being closed, and the question marked as invalid and not supported, even though the archived version supports it :p

For anyone coming here experiencing this problem even if they are not running Python 3.8, I wanted to mention that I experience this same error with Python 3.7.4 on a macOS 10.13 system. Similarly to other people above, the problem goes away if I install the dev version as suggested by shuax above.

Closing as invalid. Python 3.8 is not yet supported.

Hello, can I perhaps suggest that this gets tagged as "3.8 defects" rather than close outright. As a maintainer/owner you can do of course whatever you want, but closing a defect for what is a likely common issue for many perhaps could be reconsidered?

Much love

WFM with this

pip install https://github.com/pyinstaller/pyinstaller/archive/develop.tar.gz

Direct install the latest version can compatible with python 3.8

Worked like a charm!

Seeing the same TypeError as everyone else after upgrading Python to 3.8 from 3.7.5. Fixed with latest dev version. Windows user, so had to modify it to:

pip install https://github.com/pyinstaller/pyinstaller/archive/develop.zip

To some, it may seem obvious to change the extension. I wouldn't have thought of it a few months ago, though.

Edit: Both extensions work, on Windows, Ubuntu, Kali, and Pi. I don't know why it didn't before. Probably a typo on my part. And it probably works universally across most, if not all, OSs. My errors constantly set back my learning, due to confusion. Ah, well.

Seeing the same TypeError as everyone else after upgrading Python to 3.8 from 3.7.5. Fixed with latest dev version. Windows user, so had to modify it to:

pip install https://github.com/pyinstaller/pyinstaller/archive/develop.zip

To some, it may seem obvious to change the extension. I wouldn't have thought of it a few months ago, though.

Thanks!

pip install https://github.com/pyinstaller/pyinstaller/archive/develop.tar.gz

Direct install the latest version can compatible with python 3.8

Thanks very much.I hope this newest version could be uploaded to PYPI(pip) as soon as possibble!Thanks

pip install https://github.com/pyinstaller/pyinstaller/archive/develop.tar.gz

Direct install the latest version can compatible with python 3.8

Huge thanks, this helped a lot!

pip install https://github.com/pyinstaller/pyinstaller/archive/develop.tar.gz

Direct install the latest version can compatible with python 3.8

Thank you!

pip install https://github.com/pyinstaller/pyinstaller/archive/develop.tar.gz

Direct install the latest version can compatible with python 3.8

Thank you so much, bro! This was giving me too much headache since 3 months ago!

You can install direct from a git hash if you'd rather not float over develop:
pip install git+git://github.com/pyinstaller/pyinstaller.git@9dd34bdfbaeaa4e0459bd3051d1caf0c7d75073f

Latest as of this writing:
9dd34bdfbaeaa4e0459bd3051d1caf0c7d75073f

pip install https://github.com/pyinstaller/pyinstaller/archive/develop.tar.gz

Direct install the latest version can compatible with python 3.8

This also solved my problem

Thanks you! this solve my issue

Disappointing that this was closed as it is the first thing I ran into on Python 3.8.

pip install https://github.com/pyinstaller/pyinstaller/archive/develop.tar.gz

Direct install the latest version can compatible with python 3.8

Is what works; the issue doesn't deserve the [invalid] tag but that's neither here nor there FWIW the above worked for me as well.

Seeing the same TypeError as everyone else after upgrading Python to 3.8 from 3.7.5. Fixed with latest dev version. Windows user, so had to modify it to:

pip install https://github.com/pyinstaller/pyinstaller/archive/develop.zip

To some, it may seem obvious to change the extension. I wouldn't have thought of it a few months ago, though.

Thanks

Most helpful. Thanks.

pip install https://github.com/pyinstaller/pyinstaller/archive/develop.tar.gz

Direct install the latest version can compatible with python 3.8

Thank you very much buddy

I am able to make exe after following @shuax solution but facing the following issue while executing the exe:

Traceback (most recent call last):
File "AriesoProcess.py", line 7, in
from RPAWrapper import ClsRPAWrapper
File "c:users\earptka\appdata\local\programs\python\python38\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 621, in exec_module
exec(bytecode, module.__dict__)
File "RPAWrapper.py", line 7, in
from ConfigParser import ConfigParser
File "c:users\earptka\appdata\local\programs\python\python38\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 621, in exec_module
exec(bytecode, module.__dict__)
File "ConfigParser.py", line 1, in
import pandas as pd
File "c:users\earptka\appdata\local\programs\python\python38\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 621, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\pandas__init__.py", line 16, in
ImportError: Unable to import required dependencies:
numpy:

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy c-extensions failed.

  • Try uninstalling and reinstalling numpy.
  • If you have already done that, then:

    1. Check that you expected to use Python3.8 from "C:\Users\earptka\DesktopAriesoPy3AriesoPy3AriesoProcess.exe",

      and that you have no directories in your PATH or PYTHONPATH that can

      interfere with the Python and numpy version "1.18.0" you're trying to use.

    2. If (1) looks fine, you can open a new issue at

      https://github.com/numpy/numpy/issues. Please include details on:



      • how you installed Python


      • how you installed numpy


      • your operating system


      • whether or not you have multiple versions of Python installed


      • if you built from source, your compiler versions and ideally a build log



  • If you're working with a numpy git repository, try git clean -xdf
    (removes all files not under version control) and rebuild numpy.

Note: this error has many possible causes, so please don't comment on
an existing issue about this - open a new one instead.

Original error was: DLL load failed while importing _multiarray_umath: The specified module could not be found.

[23260] Failed to execute script AriesoProcess

pip install https://github.com/pyinstaller/pyinstaller/archive/develop.tar.gz

Direct install the latest version can compatible with python 3.8

Thanks very much....You are a live saver

pip install https://github.com/pyinstaller/pyinstaller/archive/develop.tar.gz

Direct install the latest version can compatible with python 3.8

Love u boi

pip install https://github.com/pyinstaller/pyinstaller/archive/develop.tar.gz

Direct install the latest version can compatible with python 3.8
Thank you

pip install https://github.com/pyinstaller/pyinstaller/archive/develop.tar.gz

Direct install the latest version can compatible with python 3.8

you are the best

pip install https://github.com/pyinstaller/pyinstaller/archive/develop.tar.gz

Direct install the latest version can compatible with python 3.8

Thx...4hrs searching has come to an end...praise him

I have it too

pip install https://github.com/pyinstaller/pyinstaller/archive/develop.tar.gz

Direct install the latest version can compatible with python 3.8

Love it, thanks bro !

i have it tried what shuax say,
but its not working.

I am using MacOs Catalina 10.15
here is the log:

216 INFO: PyInstaller: 3.5 216 INFO: Python: 3.8.0 226 INFO: Platform: macOS-10.15.2-x86_64-i386-64bit 228 INFO: wrote /Users/mehmetemir/Documents/Slimme-admin-app/run.spec 232 INFO: UPX is not available. 234 INFO: Extending PYTHONPATH with paths ['/Users/mehmetemir/Documents/Slimme-admin-app', '/Users/mehmetemir/Documents/Slimme-admin-app'] 234 INFO: checking Analysis 234 INFO: Building Analysis because Analysis-00.toc is non existent 234 INFO: Initializing module dependency graph... 239 INFO: Initializing module graph hooks... 245 INFO: Analyzing base_library.zip ... 5757 INFO: running Analysis Analysis-00.toc 5773 INFO: Caching module hooks... 5782 INFO: Analyzing /Users/mehmetemir/Documents/Slimme-admin-app/run.py 5980 INFO: Loading module hooks... 5980 INFO: Loading module hook "hook-sqlite3.py"... 6075 INFO: Loading module hook "hook-_tkinter.py"... 6083 ERROR: Tcl/Tk improperly installed on this system. 6083 INFO: Loading module hook "hook-encodings.py"... 6168 INFO: Loading module hook "hook-xml.py"... 6523 INFO: Loading module hook "hook-pydoc.py"... 6564 INFO: Looking for ctypes DLLs 6578 INFO: Analyzing run-time hooks ... 6584 INFO: Including run-time hook 'pyi_rth_multiprocessing.py' 6590 INFO: Including run-time hook 'pyi_rth__tkinter.py' 6606 INFO: Looking for dynamic libraries 6860 INFO: Looking for eggs 6860 INFO: Using Python library /Library/Frameworks/Python.framework/Versions/3.8/Python 6867 INFO: Warnings written to /Users/mehmetemir/Documents/Slimme-admin-app/build/run/warn-run.txt 6923 INFO: Graph cross-reference written to /Users/mehmetemir/Documents/Slimme-admin-app/build/run/xref-run.html 6940 INFO: Appending 'binaries' from .spec 6945 INFO: checking PYZ 6946 INFO: Building PYZ because PYZ-00.toc is non existent 6946 INFO: Building PYZ (ZlibArchive) /Users/mehmetemir/Documents/Slimme-admin-app/build/run/PYZ-00.pyz Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.8/bin/pyinstaller", line 8, in <module> sys.exit(run()) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PyInstaller/__main__.py", line 111, in run run_build(pyi_config, spec_file, **vars(args)) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PyInstaller/__main__.py", line 63, in run_build PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PyInstaller/building/build_main.py", line 844, in main build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build')) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PyInstaller/building/build_main.py", line 791, in build exec(code, spec_namespace) File "/Users/mehmetemir/Documents/Slimme-admin-app/run.spec", line 18, in <module> pyz = PYZ(a.pure, a.zipped_data, File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PyInstaller/building/api.py", line 98, in __init__ self.__postinit__() File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PyInstaller/building/datastruct.py", line 158, in __postinit__ self.assemble() File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PyInstaller/building/api.py", line 128, in assemble self.code_dict = { File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PyInstaller/building/api.py", line 129, in <dictcomp> key: strip_paths_in_code(code) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PyInstaller/building/utils.py", line 652, in strip_paths_in_code consts = tuple( File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PyInstaller/building/utils.py", line 653, in <genexpr> strip_paths_in_code(const_co, new_filename) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PyInstaller/building/utils.py", line 652, in strip_paths_in_code consts = tuple( File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PyInstaller/building/utils.py", line 653, in <genexpr> strip_paths_in_code(const_co, new_filename) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PyInstaller/building/utils.py", line 660, in strip_paths_in_code return code_func(co.co_argcount, co.co_kwonlyargcount, co.co_nlocals, co.co_stacksize, TypeError: an integer is required (got type bytes)

Solution from shuax solved the issue I was facing:

pip install https://github.com/pyinstaller/pyinstaller/archive/develop.tar.gz
Which resulted in pyinstaller 4.0.dev0+555c5e8163, which eventually compiled my script to .exe

Now I am getting a new error

OS Details

NAME="Manjaro Linux"
ID=manjaro
ID_LIKE=arch
PRETTY_NAME="Manjaro Linux"
ANSI_COLOR="1;32"
HOME_URL="https://www.manjaro.org/"
SUPPORT_URL="https://www.manjaro.org/"
BUG_REPORT_URL="https://bugs.manjaro.org/"
LOGO=manjarolinux

Error

Traceback (most recent call last):
  File "/home/terabyte/.pyenv/versions/3.7.5/bin/pyinstaller", line 8, in <module>
    sys.exit(run())
  File "/home/terabyte/.pyenv/versions/3.7.5/lib/python3.7/site-packages/PyInstaller/__main__.py", line 114, in run
    run_build(pyi_config, spec_file, **vars(args))
  File "/home/terabyte/.pyenv/versions/3.7.5/lib/python3.7/site-packages/PyInstaller/__main__.py", line 65, in run_build
    PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
  File "/home/terabyte/.pyenv/versions/3.7.5/lib/python3.7/site-packages/PyInstaller/building/build_main.py", line 729, in main
    build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
  File "/home/terabyte/.pyenv/versions/3.7.5/lib/python3.7/site-packages/PyInstaller/building/build_main.py", line 676, in build
    exec(code, spec_namespace)
  File "/home/terabyte/Programs/python/linkedin-ss/app.spec", line 17, in <module>
    noarchive=False)
  File "/home/terabyte/.pyenv/versions/3.7.5/lib/python3.7/site-packages/PyInstaller/building/build_main.py", line 241, in __init__
    self.__postinit__()
  File "/home/terabyte/.pyenv/versions/3.7.5/lib/python3.7/site-packages/PyInstaller/building/datastruct.py", line 160, in __postinit__
    self.assemble()
  File "/home/terabyte/.pyenv/versions/3.7.5/lib/python3.7/site-packages/PyInstaller/building/build_main.py", line 474, in assemble
    self._check_python_library(self.binaries)
  File "/home/terabyte/.pyenv/versions/3.7.5/lib/python3.7/site-packages/PyInstaller/building/build_main.py", line 563, in _check_python_library
    python_lib = bindepend.get_python_library_path()
  File "/home/terabyte/.pyenv/versions/3.7.5/lib/python3.7/site-packages/PyInstaller/depend/bindepend.py", line 948, in get_python_library_path
    raise IOError(msg)
OSError: Python library not found: libpython3.7mu.so.1.0, libpython3.7m.so.1.0, libpython3.7.so.1.0, libpython3.7m.so
    This would mean your Python installation doesn't come with proper library files.
    This usually happens by missing development package, or unsuitable build parameters of Python installation.

    * On Debian/Ubuntu, you would need to install Python development packages
      * apt-get install python3-dev
      * apt-get install python-dev
    * If you're building Python by yourself, please rebuild your Python with `--enable-shared` (or, `--enable-framework` on Darwin)

pip install https://github.com/pyinstaller/pyinstaller/archive/develop.tar.gz

Direct install the latest version can compatible with python 3.8

it works thanks

Fixed --> try using older versions of python; it is compatibility issue. I changed to 3.7.6 and works fine now

I'm getting the error even after loading

pip install https://github.com/pyinstaller/pyinstaller/archive/develop.tar.gz

I'm currently using python 3.8.1 on Mac OSX High Sierra (v. 10.13.6).

^Dev version fixed the issue using pyinstaller, but now back to the same issue while trying to make PyUpdater work. Any word on when this fix will be released as stable?

pip install https://github.com/pyinstaller/pyinstaller/archive/develop.tar.gz
Direct install the latest version can compatible with python 3.8

Facing same issue

pip install https://github.com/pyinstaller/pyinstaller/archive/develop.tar.gz
Direct install the latest version can compatible with python 3.8

Facing same issue

Mine too, with python 3.8.2 and spark hadoop 2.4.5, also pip version is upgraded to 20.0.2

Thanks to shuax. This issue has been dogging me for a few days. Your suggestion fixed my issue!

xception ignored in thread started by: .wrapper at 0x7f96f302bd30>
Traceback (most recent call last):
File "/Users/rhandall/Documents/GitHub/school_new/venv/lib/python3.8/site-packages/django/utils/autoreload.py", line 225, in wrapper
fn(*args, kwargs)
File "/Users/rhandall/Documents/GitHub/school_new/venv/lib/python3.8/site-packages/django/core/management/commands/runserver.py", line 117, in inner_run
self.check(display_num_errors=True)
File "/Users/rhandall/Documents/GitHub/school_new/venv/lib/python3.8/site-packages/django/core/management/base.py", line 376, in check
all_issues = self._run_checks(
File "/Users/rhandall/Documents/GitHub/school_new/venv/lib/python3.8/site-packages/django/core/management/base.py", line 366, in _run_checks
return checks.run_checks(
kwargs)
File "/Users/rhandall/Documents/GitHub/school_new/venv/lib/python3.8/site-packages/django/core/checks/registry.py", line 71, in run_checks
new_errors = check(app_configs=app_configs)
File "/Users/rhandall/Documents/GitHub/school_new/venv/lib/python3.8/site-packages/django/core/checks/urls.py", line 40, in check_url_namespaces_unique
all_namespaces = _load_all_namespaces(resolver)
File "/Users/rhandall/Documents/GitHub/school_new/venv/lib/python3.8/site-packages/django/core/checks/urls.py", line 57, in _load_all_namespaces
url_patterns = getattr(resolver, 'url_patterns', [])
File "/Users/rhandall/Documents/GitHub/school_new/venv/lib/python3.8/site-packages/django/utils/functional.py", line 37, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/Users/rhandall/Documents/GitHub/school_new/venv/lib/python3.8/site-packages/django/urls/resolvers.py", line 533, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/Users/rhandall/Documents/GitHub/school_new/venv/lib/python3.8/site-packages/django/utils/functional.py", line 37, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/Users/rhandall/Documents/GitHub/school_new/venv/lib/python3.8/site-packages/django/urls/resolvers.py", line 526, in urlconf_module
return import_module(self.urlconf_name)
File "/Users/rhandall/opt/anaconda3/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "", line 783, in exec_module
File "", line 219, in _call_with_frames_removed
File "/Users/rhandall/Documents/GitHub/school_new/base/urls.py", line 5, in
from schoolio import views as schoolio_views
File "/Users/rhandall/Documents/GitHub/school_new/schoolio/views.py", line 81, in
from .standard_matching import match_standard, match_activity, fetch_single_classroom, match_standard_to_international
File "/Users/rhandall/Documents/GitHub/school_new/schoolio/standard_matching.py", line 1, in
from sklearn.feature_extraction.text import CountVectorizer
File "/Users/rhandall/Documents/GitHub/school_new/venv/lib/python3.8/site-packages/sklearn/__init__.py", line 80, in
from .base import clone
File "/Users/rhandall/Documents/GitHub/school_new/venv/lib/python3.8/site-packages/sklearn/base.py", line 21, in
from .utils import _IS_32BIT
File "/Users/rhandall/Documents/GitHub/school_new/venv/lib/python3.8/site-packages/sklearn/utils/__init__.py", line 23, in
from .class_weight import compute_class_weight, compute_sample_weight
File "/Users/rhandall/Documents/GitHub/school_new/venv/lib/python3.8/site-packages/sklearn/utils/class_weight.py", line 7, in
from .validation import _deprecate_positional_args
File "/Users/rhandall/Documents/GitHub/school_new/venv/lib/python3.8/site-packages/sklearn/utils/validation.py", line 21, in
import joblib
File "/Users/rhandall/Documents/GitHub/school_new/venv/lib/python3.8/site-packages/joblib/__init__.py", line 119, in
from .parallel import Parallel
File "/Users/rhandall/Documents/GitHub/school_new/venv/lib/python3.8/site-packages/joblib/parallel.py", line 28, in
from ._parallel_backends import (FallbackToBackend, MultiprocessingBackend,
File "/Users/rhandall/Documents/GitHub/school_new/venv/lib/python3.8/site-packages/joblib/_parallel_backends.py", line 22, in
from .executor import get_memmapping_executor
File "/Users/rhandall/Documents/GitHub/school_new/venv/lib/python3.8/site-packages/joblib/executor.py", line 14, in
from .externals.loky.reusable_executor import get_reusable_executor
File "/Users/rhandall/Documents/GitHub/school_new/venv/lib/python3.8/site-packages/joblib/externals/loky/__init__.py", line 12, in
from .backend.reduction import set_loky_pickler
File "/Users/rhandall/Documents/GitHub/school_new/venv/lib/python3.8/site-packages/joblib/externals/loky/backend/reduction.py", line 125, in
from joblib.externals import cloudpickle # noqa: F401
File "/Users/rhandall/Documents/GitHub/school_new/venv/lib/python3.8/site-packages/joblib/externals/cloudpickle/__init__.py", line 3, in
from .cloudpickle import *
File "/Users/rhandall/Documents/GitHub/school_new/venv/lib/python3.8/site-packages/joblib/externals/cloudpickle/cloudpickle.py", line 152, in
_cell_set_template_code = _make_cell_set_template_code()
File "/Users/rhandall/Documents/GitHub/school_new/venv/lib/python3.8/site-packages/joblib/externals/cloudpickle/cloudpickle.py", line 133, in _make_cell_set_template_code
return types.CodeType(
TypeError: an integer is required (got type bytes)

Need Help with this anyone please

pip install https://github.com/pyinstaller/pyinstaller/archive/develop.tar.gz

Direct install the latest version can compatible with python 3.8

Oh you are amazing.....

Was this page helpful?
0 / 5 - 0 ratings