Error loading python lib

Trying to get my .app to launch successfully and I'm running into this error when launching from terminal. It sounds like Python isn't getting bundled in the executable, I thought that was ...

Trying to get my .app to launch successfully and I’m running into this error when launching from terminal. It sounds like Python isn’t getting bundled in the executable, I thought that was done by default, or do I need to tell it explicitly? Thanks!

PyInstaller: 3.4.dev0+a617a4eb8
Python: 3.6.5
Platform: Darwin-16.7.0-x86_64-i386-64bit

COMMAND:
python3 /Users/justint/Downloads/pyinstaller-pyqt5_fix/pyinstaller.py —onefile —name=Staticbot —windowed Staticbot-new.spec

Terminal Error Message

[14946] Error loading Python lib '/var/folders/r2/p4jbl90552j41gq0v3_m70bm0000gp/T/_MEIaghUPv/Python': dlopen: dlopen(/var/folders/r2/p4jbl90552j41gq0v3_m70bm0000gp/T/_MEIaghUPv/Python, 10): image not found
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.

[Process completed]

Spec File

# -*- mode: python -*-

import sys
sys.setrecursionlimit(5000)

block_cipher = None


a = Analysis(['../main.py'],
             pathex=[
                 '/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6',
                 '/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/psutil', 
                 '/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/plotly/grid_objs',
                 '/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/plotly/offline',
                 '/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/PyQt5',
                 '/Users/justint/Documents/Justin/Dev/Staticbot'
             ],
             binaries=[],
             datas=[ ('../res_rc.py', '.'), 
                ('../ui.py', '.'),
                ('/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/plotly/plotly/', './plotly/plotly/'),
                ('/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/plotly/grid_objs/', './plotly/grid_objs/'),
                ('/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/plotly/offline/', './plotly/offline/'),
                ('/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/plotly/package_data/default-schema.json', './plotly/package_data/'),
                ('/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/plotly/package_data/graphWidget.js', './plotly/package_data/'),
                ('/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/plotly/package_data/plotly.min.js', './plotly/package_data/'),
                ('/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/PyQt5/QtWebEngine.so', './PyQt5/'),
                ('/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/PyQt5/QtWebEngineCore.so', './PyQt5/'),
                ('/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/PyQt5/QtWebEngineWidgets.so', './PyQt5/'),
                ('/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/PyQt5/Qt/lib/QtWebEngineCore.framework/Helpers/QtWebEngineProcess.app', './PyQt5/Qt/lib/QtWebEngineCore.framework/Helpers/'),
                ('/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/psutil', './psutil')
                ],
             hiddenimports=[],
             hookspath=[],
             runtime_hooks=[],
             excludes=[],
             win_no_prefer_redirects=False,
             win_private_assemblies=False,
             cipher=block_cipher)
pyz = PYZ(a.pure, a.zipped_data,
             cipher=block_cipher)
exe = EXE(pyz,
            a.scripts,
            a.binaries,
            a.zipfiles,
            a.datas,
            exclude_binaries=True,
            name='Staticbot',
            debug=False,
            strip=False,
            upx=False,
            console=False )

app = BUNDLE(exe,
             name='Staticbot.app',
             bundle_identifier='org.qt-project.Qt.QtWebEngineCore')

Warning Text File

missing module named pyimod03_importers - imported by /Users/justint/Downloads/pyinstaller-pyqt5_fix/PyInstaller/loader/rthooks/pyi_rth_pkgres.py
missing module named 'pkg_resources.extern.pyparsing' - imported by pkg_resources._vendor.packaging.markers, pkg_resources._vendor.packaging.requirements
missing module named StringIO - imported by six, urllib3.packages.six, requests.compat, numpy.lib.utils, numpy.testing.nose_tools.utils, numpy.lib.format, pkg_resources._vendor.six
missing module named 'win32com.shell' - imported by pkg_resources._vendor.appdirs
missing module named 'com.sun' - imported by pkg_resources._vendor.appdirs
missing module named com - imported by pkg_resources._vendor.appdirs
missing module named win32api - imported by distutils.msvccompiler, pkg_resources._vendor.appdirs
missing module named win32com - imported by pkg_resources._vendor.appdirs
missing module named netbios - imported by uuid
missing module named win32wnet - imported by uuid
missing module named __builtin__ - imported by numpy.core.numerictypes, numpy.core.numeric, numpy.distutils.misc_util, numpy.lib.function_base, numpy.lib._iotools, numpy.ma.core, numpy, pkg_resources._vendor.pyparsing
missing module named ordereddict - imported by pkg_resources._vendor.pyparsing
missing module named __main__ - imported by pkg_resources
missing module named multiprocessing.SimpleQueue - imported by multiprocessing, concurrent.futures.process
missing module named multiprocessing.set_start_method - imported by multiprocessing, multiprocessing.spawn
missing module named multiprocessing.get_start_method - imported by multiprocessing, multiprocessing.spawn
missing module named multiprocessing.TimeoutError - imported by multiprocessing, multiprocessing.pool
missing module named multiprocessing.get_context - imported by multiprocessing, multiprocessing.pool, multiprocessing.managers, multiprocessing.sharedctypes
missing module named multiprocessing.BufferTooShort - imported by multiprocessing, multiprocessing.connection
missing module named multiprocessing.AuthenticationError - imported by multiprocessing, multiprocessing.connection
missing module named pkg_resources.extern.packaging - imported by pkg_resources.extern, pkg_resources
missing module named pkg_resources.extern.appdirs - imported by pkg_resources.extern, pkg_resources
missing module named 'pkg_resources.extern.six.moves' - imported by pkg_resources, pkg_resources._vendor.packaging.requirements
missing module named pkg_resources.extern.six - imported by pkg_resources.extern, pkg_resources
missing module named 'multiprocessing.forking' - imported by /Users/justint/Downloads/pyinstaller-pyqt5_fix/PyInstaller/loader/rthooks/pyi_rth_multiprocessing.py
missing module named org - imported by pickle, /Users/justint/Documents/Justin/Dev/Staticbot/main.py
excluded module named _frozen_importlib - imported by importlib, importlib.abc, /Users/justint/Documents/Justin/Dev/Staticbot/main.py
missing module named _frozen_importlib_external - imported by importlib._bootstrap, importlib, importlib.abc, /Users/justint/Documents/Justin/Dev/Staticbot/main.py
missing module named _winreg - imported by platform, requests.utils, numpy.distutils.cpuinfo, /Users/justint/Documents/Justin/Dev/Staticbot/main.py, pkg_resources._vendor.appdirs
missing module named java - imported by platform, /Users/justint/Documents/Justin/Dev/Staticbot/main.py
missing module named 'java.lang' - imported by platform, /Users/justint/Documents/Justin/Dev/Staticbot/main.py, xml.sax._exceptions
missing module named vms_lib - imported by platform, /Users/justint/Documents/Justin/Dev/Staticbot/main.py
missing module named msvcrt - imported by subprocess, getpass, multiprocessing.spawn, multiprocessing.popen_spawn_win32, numpy.distutils.mingw32ccompiler, /Users/justint/Documents/Justin/Dev/Staticbot/main.py
missing module named _winapi - imported by subprocess, multiprocessing.reduction, multiprocessing.connection, multiprocessing.heap, multiprocessing.popen_spawn_win32, /Users/justint/Documents/Justin/Dev/Staticbot/main.py
missing module named winreg - imported by platform, mimetypes, urllib.request, requests.utils, distutils.msvccompiler, distutils.msvc9compiler, distutils._msvccompiler, numpy.distutils.cpuinfo, /Users/justint/Documents/Justin/Dev/Staticbot/main.py
missing module named urllib.getproxies_environment - imported by urllib, requests.compat
missing module named urllib.proxy_bypass_environment - imported by urllib, requests.compat
missing module named urllib.proxy_bypass - imported by urllib, requests.compat
missing module named urllib.getproxies - imported by urllib, requests.compat
missing module named urllib.urlencode - imported by urllib, requests.compat
missing module named urllib.unquote_plus - imported by urllib, requests.compat
missing module named urllib.quote_plus - imported by urllib, requests.compat
missing module named urllib.unquote - imported by urllib, requests.compat
missing module named urllib.quote - imported by urllib, requests.compat
missing module named nt - imported by os, ntpath, shutil, pathlib, /Users/justint/Documents/Justin/Dev/Staticbot/main.py
missing module named 'org.python' - imported by copy, setuptools.sandbox, /Users/justint/Documents/Justin/Dev/Staticbot/main.py, xml.sax
missing module named _dummy_threading - imported by dummy_threading, /Users/justint/Documents/Justin/Dev/Staticbot/main.py
missing module named Queue - imported by urllib3.connectionpool
missing module named "'urllib3.packages.six.moves.urllib'.parse" - imported by urllib3.request, urllib3.poolmanager
runtime module named urllib3.packages.six.moves - imported by http.client, urllib3.connectionpool, urllib3.util.response, 'urllib3.packages.six.moves.urllib', urllib3.response
missing module named backports - imported by urllib3.packages.ssl_match_hostname
missing module named socks - imported by urllib3.contrib.socks
missing module named 'OpenSSL.crypto' - imported by urllib3.contrib.pyopenssl
missing module named 'cryptography.x509' - imported by urllib3.contrib.pyopenssl
missing module named 'cryptography.hazmat' - imported by urllib3.contrib.pyopenssl
missing module named cryptography - imported by urllib3.contrib.pyopenssl
missing module named OpenSSL - imported by urllib3.contrib.pyopenssl
missing module named _abcoll - imported by urllib3.packages.ordered_dict
missing module named dummy_thread - imported by urllib3.packages.ordered_dict, numpy.core.arrayprint
missing module named thread - imported by urllib3.packages.ordered_dict, numpy.core.arrayprint
missing module named Cookie - imported by requests.compat
missing module named cookielib - imported by requests.compat
missing module named urllib2 - imported by requests.compat, numpy.lib._datasource
missing module named urlparse - imported by requests.compat, numpy.lib._datasource
missing module named simplejson - imported by requests.compat
missing module named IPython - imported by plotly.plotly.plotly
runtime module named six.moves - imported by plotly.plotly.plotly, plotly.plotly.chunked_requests.chunked_request, 'six.moves.urllib'
missing module named "'six.moves.urllib'.parse" - imported by plotly.plotly.chunked_requests.chunked_request
missing module named pandas - imported by plotly.graph_objs.graph_objs, plotly.figure_factory._county_choropleth
missing module named numpy.lib.i0 - imported by numpy.lib, numpy.dual
missing module named numpy.linalg.inv - imported by numpy.linalg, numpy.matrixlib.defmatrix, numpy.lib.polynomial
missing module named cPickle - imported by numpy.core.numeric, numpy.lib.format, numpy.lib.npyio, numpy.ma.core
missing module named cStringIO - imported by cPickle
missing module named copy_reg - imported by cPickle, cStringIO, numpy.core
missing module named ConfigParser - imported by numpy.distutils.system_info, numpy.distutils.npy_pkg_config
missing module named 'numpy_distutils.cpuinfo' - imported by numpy.f2py.diagnose
missing module named 'numpy_distutils.fcompiler' - imported by numpy.f2py.diagnose
missing module named 'numpy_distutils.command' - imported by numpy.f2py.diagnose
missing module named numpy_distutils - imported by numpy.f2py.diagnose
missing module named numpy.testing.memusage - imported by numpy.testing, numpy.f2py.f2py_testing
missing module named numpy.testing.jiffies - imported by numpy.testing, numpy.f2py.f2py_testing
missing module named setuptools.extern.packaging - imported by setuptools.extern, setuptools.dist, setuptools.command.egg_info
missing module named 'setuptools.extern.six' - imported by setuptools, setuptools.extension
missing module named _manylinux - imported by setuptools.pep425tags
missing module named wincertstore - imported by setuptools.ssl_support
missing module named 'backports.ssl_match_hostname' - imported by setuptools.ssl_support
missing module named 'setuptools.extern.packaging.version' - imported by setuptools.msvc
missing module named 'setuptools.extern.six.moves' - imported by setuptools.dist, setuptools.py33compat, setuptools.command.easy_install, setuptools.sandbox, setuptools.command.setopt, setuptools.package_index, setuptools.ssl_support, setuptools.command.egg_info, setuptools.command.py36compat, setuptools.namespaces, setuptools.msvc
missing module named setuptools.extern.six - imported by setuptools.extern, setuptools.monkey, setuptools.dist, setuptools.py33compat, setuptools.config, setuptools.command.easy_install, setuptools.sandbox, setuptools.py27compat, setuptools.package_index, setuptools.wheel, setuptools.command.egg_info, setuptools.command.sdist, setuptools.command.bdist_egg, setuptools.unicode_utils, setuptools.glob, setuptools.command.develop
missing module named _distutils_findvs - imported by distutils._msvccompiler
missing module named __svn_version__ - imported by numpy.f2py.__version__
missing module named numarray - imported by numpy.distutils.system_info
missing module named Numeric - imported by numpy.distutils.system_info
missing module named commands - imported by numpy.distutils.cpuinfo
missing module named 'nose.plugins' - imported by numpy.testing.nose_tools.noseclasses, numpy.testing.nose_tools.nosetester
missing module named scipy - imported by numpy.testing.nose_tools.nosetester
missing module named 'nose.util' - imported by numpy.testing.nose_tools.noseclasses
missing module named nose - imported by numpy.testing.nose_tools.utils, numpy.testing.nose_tools.decorators, numpy.testing.nose_tools.noseclasses
missing module named numpy.core.number - imported by numpy.core, numpy.testing.nose_tools.utils
missing module named numpy.lib.imag - imported by numpy.lib, numpy.testing.nose_tools.utils
missing module named numpy.lib.real - imported by numpy.lib, numpy.testing.nose_tools.utils
missing module named numpy.lib.iscomplexobj - imported by numpy.lib, numpy.testing.nose_tools.utils
missing module named numpy.core.signbit - imported by numpy.core, numpy.testing.nose_tools.utils
missing module named win32pdh - imported by numpy.testing.nose_tools.utils
missing module named numpy.core.float64 - imported by numpy.core, numpy.testing.nose_tools.utils
missing module named numpy.core.float32 - imported by numpy.core, numpy.testing.nose_tools.utils
missing module named win32con - imported by distutils.msvccompiler
missing module named numpy.core.integer - imported by numpy.core, numpy.fft.helper
missing module named numpy.core.sqrt - imported by numpy.core, numpy.linalg.linalg, numpy.fft.fftpack
missing module named numpy.core.conjugate - imported by numpy.core, numpy.fft.fftpack
missing module named numpy.lib.triu - imported by numpy.lib, numpy.linalg.linalg
missing module named numpy.core.divide - imported by numpy.core, numpy.linalg.linalg
missing module named numpy.core.object_ - imported by numpy.core, numpy.linalg.linalg
missing module named numpy.core.intp - imported by numpy.core, numpy.linalg.linalg
missing module named numpy.core.longdouble - imported by numpy.core, numpy.linalg.linalg
missing module named numpy.core.geterrobj - imported by numpy.core, numpy.linalg.linalg
missing module named numpy.core.maximum - imported by numpy.core, numpy.linalg.linalg
missing module named numpy.core.add - imported by numpy.core, numpy.linalg.linalg
missing module named numpy.core.complexfloating - imported by numpy.core, numpy.linalg.linalg
missing module named numpy.core.inexact - imported by numpy.core, numpy.linalg.linalg
missing module named numpy.core.cdouble - imported by numpy.core, numpy.linalg.linalg
missing module named numpy.core.csingle - imported by numpy.core, numpy.linalg.linalg
missing module named numpy.core.double - imported by numpy.core, numpy.linalg.linalg
missing module named numpy.core.single - imported by numpy.core, numpy.linalg.linalg
missing module named future_builtins - imported by numpy.lib.npyio
missing module named numpy.recarray - imported by numpy, numpy.ma.mrecords
missing module named numpy.dtype - imported by numpy, numpy.ma.mrecords, numpy.ctypeslib
missing module named numpy.expand_dims - imported by numpy, numpy.ma.core
missing module named numpy.array - imported by numpy, numpy.ma.core, numpy.ma.extras, numpy.ma.mrecords, numpy.ctypeslib
missing module named numpy.bool_ - imported by numpy, numpy.ma.core, numpy.ma.mrecords
missing module named numpy.iscomplexobj - imported by numpy, numpy.ma.core
missing module named numpy.amin - imported by numpy, numpy.ma.core
missing module named numpy.amax - imported by numpy, numpy.ma.core
missing module named numpy.ndarray - imported by numpy, numpy.ma.core, numpy.ma.extras, numpy.ma.mrecords, numpy.ctypeslib
missing module named numpy.histogramdd - imported by numpy, numpy.lib.twodim_base
missing module named numpy.eye - imported by numpy, numpy.core.numeric
missing module named sets - imported by pytz.tzinfo
missing module named UserDict - imported by pytz.lazy
missing module named psutil._psutil_aix - imported by psutil, psutil._psaix
missing module named psutil._psutil_sunos - imported by psutil, psutil._pssunos
missing module named psutil._psutil_bsd - imported by psutil, psutil._psbsd
missing module named psutil._psutil_windows - imported by psutil, psutil._pswindows
missing module named _psutil_linux - imported by psutil
missing module named win32process - imported by /Users/justint/Documents/Justin/Dev/Staticbot/main.py
missing module named win32gui - imported by /Users/justint/Documents/Justin/Dev/Staticbot/main.py

Error loading Python lib
The name of my python script is kled.py

This is the message I used to create it:

pyinstaller kled.py —windowed
Here is the error message I get when I execute the terminal file located in dist—>(a folder called kled)—>(executable terminal file called kled)

[3173] Error loading Python lib '/Users/john/Documents/chill.py/kledfinal/dist/kled/Python': dlopen: dlopen(/Users/john/Documents/chill.py/kledfinal/dist/kled/Python, 10): no suitable image found.  Did find:
    /Users/john/Documents/chill.py/kledfinal/dist/kled/Python: code signature invalid for '/Users/john/Documents/chill.py/kledfinal/dist/kled/Python'

When I double click the application it has created it appears to open in my dock, and then goes away, nothing actually opens.

Here are the resources I’ve already looked at but didn’t find success from:

https://github.com/pyinstaller/pyinstaller/issues/2150

  • I don’t understand the solution they found. The two people troubleshooting didn’t explain the steps they were taking so I couldn’t follow.

https://github.com/pyinstaller/pyinstaller/issues/3499

  • This is where I got the idea to change my spec files, because in his pyinstaller command it seems like he has a specific spec file he was trying to use.

https://pyinstaller.readthedocs.io/en/stable/spec-files.html

  • I thought maybe I could edit my spec file to include the modules or python version it might be missing, but no other results told me how to properly set up my spec file to do this. I was originally trying to use py2app and if any of you know it, you will know that setup.py basically lets you hand pick all the files and stuff you need. Unfortunately py2app has a huge amount of issues in general so I decided my error wasn’t going to get fixed, but pyinstaller seems to have some experts so maybe you guys can help.

Error loading Python lib with PyInstaller on MacOS

  • went through the steps and it just didn’t work for me. Same outcome where the application doesn’t work and the executable terminal file called kled says that it had an Error loading python lib.

RESOURCES YOU MIGHT NEED (idk I’m just guessing but here is some stuff)

my kled.spec file:

# -*- mode: python ; coding: utf-8 -*-

block_cipher = None


a = Analysis(['kled.py'],
             pathex=['/Users/john/Documents/chill.py/kledfinal'],
             binaries=[],
             datas=[],
             hiddenimports=[],
             hookspath=[],
             runtime_hooks=[],
             excludes=[],
             win_no_prefer_redirects=False,
             win_private_assemblies=False,
             cipher=block_cipher,
             noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
             cipher=block_cipher)
exe = EXE(pyz,
          a.scripts,
          a.binaries,
          a.zipfiles,
          a.datas,
          [],
          name='kled',
          debug=False,
          bootloader_ignore_signals=False,
          strip=False,
          upx=True,
          upx_exclude=[],
          runtime_tmpdir=None,
          console=False )
app = BUNDLE(exe,
             name='kled.app',
             icon=None,
             bundle_identifier=None)


**Python version:**

Python 3.8.2

Modules I am trying to use:

pygame
time
random
sys
os
pickle

MacOS version:

macOS Catalina

Version 10.15.4

My warn-kled.txt file:

This file lists modules PyInstaller was not able to find. This does not
necessarily mean this module is required for running you program. Python and
Python 3rd-party packages include a lot of conditional or optional modules. For
example the module 'ntpath' only exists on Windows, whereas the module
'posixpath' only exists on Posix systems.

Types if import:
* top-level: imported at the top-level - look at these first
* conditional: imported within an if-statement
* delayed: imported from within a function
* optional: imported within a try-except-statement

IMPORTANT: Do NOT post this list to the issue-tracker. Use it as a basis for
           yourself tracking down the missing module. Thanks!

missing module named pyimod03_importers - imported by /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PyInstaller/loader/rthooks/pyi_rth_pkgres.py (top-level)
missing module named StringIO - imported by setuptools._vendor.six (conditional), numpy.testing._private.utils (conditional), numpy.lib.utils (delayed, conditional), numpy.lib.format (delayed, conditional), pkg_resources._vendor.six (conditional), py._io.capture (optional)
missing module named 'pkg_resources.extern.pyparsing' - imported by pkg_resources._vendor.packaging.markers (top-level), pkg_resources._vendor.packaging.requirements (top-level)
missing module named 'win32com.shell' - imported by pkg_resources._vendor.appdirs (conditional, optional)
missing module named 'com.sun' - imported by pkg_resources._vendor.appdirs (delayed, conditional, optional)
missing module named com - imported by pkg_resources._vendor.appdirs (delayed)
missing module named nt - imported by os (delayed, conditional, optional), ntpath (optional), shutil (conditional), pathlib (conditional), ctypes (delayed, conditional)
missing module named win32api - imported by distutils.msvccompiler (optional), pkg_resources._vendor.appdirs (delayed, conditional, optional)
missing module named win32com - imported by pkg_resources._vendor.appdirs (delayed)
missing module named _winreg - imported by platform (delayed, optional), pygame.sysfont (conditional), numpy.distutils.cpuinfo (delayed, conditional, optional), pkg_resources._vendor.appdirs (delayed, conditional), pygments.formatters.img (optional)
missing module named winreg - imported by platform (delayed, optional), mimetypes (optional), urllib.request (delayed, conditional, optional), pygame.sysfont (conditional), distutils.msvccompiler (optional), distutils.msvc9compiler (top-level), distutils._msvccompiler (top-level), numpy.distutils.cpuinfo (delayed, conditional, optional), pkg_resources._vendor.appdirs (delayed, conditional), pygments.formatters.img (optional)
missing module named netbios - imported by uuid (delayed)
missing module named win32wnet - imported by uuid (delayed)
missing module named _winapi - imported by encodings (delayed, conditional, optional), subprocess (optional), test.support (delayed, conditional), multiprocessing.connection (optional), multiprocessing.spawn (delayed, conditional), multiprocessing.reduction (conditional), multiprocessing.shared_memory (conditional), multiprocessing.heap (conditional), multiprocessing.popen_spawn_win32 (top-level), asyncio.windows_events (top-level), asyncio.windows_utils (top-level)
missing module named msvcrt - imported by subprocess (optional), getpass (optional), test.support (delayed, conditional, optional), multiprocessing.spawn (delayed, conditional), multiprocessing.popen_spawn_win32 (top-level), asyncio.windows_events (top-level), asyncio.windows_utils (top-level), numpy.distutils.mingw32ccompiler (conditional, optional)
missing module named urllib.urlretrieve - imported by urllib (conditional, optional), pygments.lexers._php_builtins (conditional, optional)
missing module named urllib.FancyURLopener - imported by urllib (conditional, optional), pygments.lexers._sourcemod_builtins (conditional, optional)
missing module named urllib.urlopen - imported by urllib (conditional, optional), pygments.lexers._postgres_builtins (conditional, optional), pygments.lexers._lua_builtins (conditional, optional)
missing module named urllib.quote - imported by urllib (delayed), py._path.svnwc (delayed)
missing module named _frozen_importlib_external - imported by importlib._bootstrap (delayed), importlib (optional), importlib.abc (optional), zipimport (top-level)
excluded module named _frozen_importlib - imported by importlib (optional), importlib.abc (optional), zipimport (top-level)
missing module named __builtin__ - imported by numpy.core.numerictypes (conditional), numpy.core.numeric (conditional), numpy.lib.function_base (conditional), numpy.lib._iotools (conditional), numpy.ma.core (conditional), numpy.distutils.misc_util (delayed, conditional), numpy (conditional), pkg_resources._vendor.pyparsing (conditional), setuptools._vendor.pyparsing (conditional), py._builtin (conditional), ptyprocess.ptyprocess (optional)
missing module named ordereddict - imported by pkg_resources._vendor.pyparsing (optional), setuptools._vendor.pyparsing (optional)
missing module named 'org.python' - imported by copy (optional), setuptools.sandbox (conditional), xml.sax (delayed, conditional)
missing module named multiprocessing.TimeoutError - imported by multiprocessing (top-level), multiprocessing.pool (top-level)
missing module named multiprocessing.get_context - imported by multiprocessing (top-level), multiprocessing.pool (top-level), multiprocessing.managers (top-level), multiprocessing.sharedctypes (top-level)
missing module named multiprocessing.set_start_method - imported by multiprocessing (top-level), multiprocessing.spawn (top-level)
missing module named multiprocessing.get_start_method - imported by multiprocessing (top-level), multiprocessing.spawn (top-level)
missing module named 'java.lang' - imported by platform (delayed, optional), xml.sax._exceptions (conditional)
missing module named multiprocessing.BufferTooShort - imported by multiprocessing (top-level), multiprocessing.connection (top-level)
missing module named multiprocessing.AuthenticationError - imported by multiprocessing (top-level), multiprocessing.connection (top-level)
missing module named _overlapped - imported by asyncio.windows_events (top-level)
missing module named asyncio.DefaultEventLoopPolicy - imported by asyncio (delayed, conditional), asyncio.events (delayed, conditional)
missing module named win32evtlog - imported by logging.handlers (delayed, optional)
missing module named win32evtlogutil - imported by logging.handlers (delayed, optional)
missing module named pkg_resources.extern.packaging - imported by pkg_resources.extern (top-level), pkg_resources (top-level)
missing module named pkg_resources.extern.appdirs - imported by pkg_resources.extern (top-level), pkg_resources (top-level)
missing module named 'pkg_resources.extern.six.moves' - imported by pkg_resources (top-level), pkg_resources._vendor.packaging.requirements (top-level)
missing module named pkg_resources.extern.six - imported by pkg_resources.extern (top-level), pkg_resources (top-level), pkg_resources.py31compat (top-level)
missing module named vms_lib - imported by platform (delayed, conditional, optional)
missing module named java - imported by platform (delayed)
missing module named 'multiprocessing.forking' - imported by /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PyInstaller/loader/rthooks/pyi_rth_multiprocessing.py (optional)
missing module named org - imported by pickle (optional)
missing module named copy_reg - imported by cStringIO (top-level), numpy.core (conditional), pygame (conditional)
missing module named 'pygame._view' - imported by pygame (delayed)
missing module named OpenGL - imported by pygame (delayed)
missing module named numpy.uint32 - imported by numpy (top-level), pygame._numpysurfarray (top-level)
missing module named commands - imported by numpy.distutils.cpuinfo (conditional)
missing module named setuptools.extern.packaging - imported by setuptools.extern (top-level), setuptools.dist (top-level), setuptools.command.egg_info (top-level)
missing module named 'setuptools.extern.six' - imported by setuptools (top-level), setuptools.extension (top-level)
missing module named 'setuptools.extern.packaging.specifiers' - imported by setuptools.config (top-level)
missing module named 'setuptools.extern.packaging.version' - imported by setuptools.config (top-level), setuptools.msvc (top-level)
missing module named setuptools.extern.six.moves.filterfalse - imported by setuptools.extern.six.moves (top-level), setuptools.dist (top-level), setuptools.msvc (top-level)
missing module named setuptools.extern.six.moves.filter - imported by setuptools.extern.six.moves (top-level), setuptools.dist (top-level), setuptools.ssl_support (top-level), setuptools.command.py36compat (top-level)
missing module named setuptools.extern.ordered_set - imported by setuptools.extern (top-level), setuptools.dist (top-level), setuptools.command.sdist (top-level)
missing module named 'setuptools.extern.packaging.utils' - imported by setuptools.wheel (top-level)
missing module named 'setuptools.extern.packaging.tags' - imported by setuptools.wheel (top-level)
missing module named wincertstore - imported by setuptools.ssl_support (delayed, optional)
missing module named 'backports.ssl_match_hostname' - imported by setuptools.ssl_support (optional)
missing module named backports - imported by setuptools.ssl_support (optional)
missing module named 'setuptools._vendor.six.moves' - imported by 'setuptools._vendor.six.moves' (top-level)
missing module named 'setuptools.extern.pyparsing' - imported by setuptools._vendor.packaging.requirements (top-level), setuptools._vendor.packaging.markers (top-level)
missing module named setuptools.extern.six.moves.winreg - imported by setuptools.extern.six.moves (conditional), setuptools.msvc (conditional)
missing module named setuptools.extern.six.moves.map - imported by setuptools.extern.six.moves (top-level), setuptools.dist (top-level), setuptools.command.easy_install (top-level), setuptools.sandbox (top-level), setuptools.package_index (top-level), setuptools.ssl_support (top-level), setuptools.command.egg_info (top-level), setuptools.namespaces (top-level)
runtime module named setuptools.extern.six.moves - imported by setuptools.dist (top-level), configparser (top-level), setuptools.command.easy_install (top-level), setuptools.sandbox (top-level), setuptools.command.setopt (top-level), setuptools.package_index (top-level), setuptools.ssl_support (top-level), setuptools.py33compat (top-level), setuptools.command.egg_info (top-level), setuptools.command.py36compat (top-level), setuptools.namespaces (top-level), setuptools.msvc (top-level), 'setuptools._vendor.six.moves' (top-level)
missing module named setuptools.extern.six - imported by setuptools.extern (top-level), setuptools.monkey (top-level), setuptools.dist (top-level), setuptools.extern.six.moves (top-level), setuptools.config (top-level), setuptools.command.easy_install (top-level), setuptools.sandbox (top-level), setuptools.py27compat (top-level), setuptools.package_index (top-level), setuptools.py33compat (top-level), setuptools.wheel (top-level), setuptools.command.egg_info (top-level), setuptools.command.sdist (top-level), setuptools.command.bdist_egg (top-level), setuptools.unicode_utils (top-level), setuptools.installer (top-level), setuptools.command.develop (top-level)
missing module named 'numpy_distutils.cpuinfo' - imported by numpy.f2py.diagnose (delayed, conditional, optional)
missing module named 'numpy_distutils.fcompiler' - imported by numpy.f2py.diagnose (delayed, conditional, optional)
missing module named 'numpy_distutils.command' - imported by numpy.f2py.diagnose (delayed, conditional, optional)
missing module named numpy_distutils - imported by numpy.f2py.diagnose (delayed, optional)
missing module named __svn_version__ - imported by numpy.f2py.__version__ (optional)
missing module named numarray - imported by numpy.distutils.system_info (delayed, conditional, optional)
missing module named Numeric - imported by numpy.distutils.system_info (delayed, conditional, optional)
missing module named ConfigParser - imported by numpy.distutils.system_info (conditional), numpy.distutils.npy_pkg_config (conditional)
missing module named win32con - imported by distutils.msvccompiler (optional)
missing module named _dummy_threading - imported by dummy_threading (optional)
missing module named twisted - imported by _pytest.unittest (delayed)
missing module named zope - imported by _pytest.unittest (delayed)
missing module named py.process - imported by py (top-level), py._path.svnurl (top-level)
missing module named py.path - imported by py (top-level), py._path.svnurl (top-level), _pytest.doctest (top-level)
missing module named apipkg - imported by py (optional)
missing module named UserDict - imported by attr._compat (conditional)
missing module named chardet - imported by pygments.lexer (delayed, conditional, optional)
missing module named ctags - imported by pygments.formatters.html (optional)
missing module named PIL - imported by pygments.formatters.img (optional)
missing module named 'py.io' - imported by _pytest._io (top-level)
missing module named importlib_metadata - imported by pluggy.manager (conditional), _pytest.compat (conditional)
missing module named typing_extensions - imported by _pytest.outcomes (conditional), _pytest._code.code (conditional), _pytest._code.source (conditional), _pytest.config.argparsing (conditional), _pytest.runner (conditional), _pytest.main (conditional), _pytest.capture (conditional)
missing module named pathlib2 - imported by _pytest.pathlib (conditional)
missing module named colorama - imported by py._io.terminalwriter (conditional, optional), _pytest.capture (delayed, conditional, optional)
missing module named atomicwrites - imported by _pytest.assertion.rewrite (conditional)
missing module named argcomplete - imported by _pytest._argcomplete (conditional, optional)
missing module named 'py.builtin' - imported by py._io.terminalwriter (top-level)
missing module named compiler - imported by py._code._assertionold (top-level)
missing module named 'nose.plugins' - imported by numpy.testing._private.noseclasses (top-level), numpy.testing._private.nosetester (delayed)
missing module named scipy - imported by numpy.testing._private.nosetester (delayed, conditional)
missing module named 'nose.util' - imported by numpy.testing._private.noseclasses (top-level)
missing module named nose - imported by numpy.testing._private.utils (delayed, optional), numpy.testing._private.decorators (delayed), numpy.testing._private.noseclasses (top-level)
missing module named psutil - imported by numpy.testing._private.utils (delayed, optional)
missing module named numpy.core.number - imported by numpy.core (delayed), numpy.testing._private.utils (delayed)
missing module named numpy.core.object_ - imported by numpy.core (top-level), numpy.linalg.linalg (top-level), numpy.testing._private.utils (delayed)
missing module named numpy.core.signbit - imported by numpy.core (delayed), numpy.testing._private.utils (delayed)
missing module named win32pdh - imported by numpy.testing._private.utils (delayed, conditional)
missing module named numpy.core.float32 - imported by numpy.core (top-level), numpy.testing._private.utils (top-level)
missing module named numpy.core.intp - imported by numpy.core (top-level), numpy.testing._private.utils (top-level), numpy.linalg.linalg (top-level)
missing module named numpy.lib.i0 - imported by numpy.lib (top-level), numpy.dual (top-level)
missing module named dummy_thread - imported by numpy.core.arrayprint (conditional, optional)
missing module named thread - imported by numpy.core.arrayprint (conditional, optional)
missing module named cpickle - imported by numpy.compat.py3k (conditional)
missing module named pickle5 - imported by numpy.compat.py3k (conditional, optional)
missing module named numpy.core.integer - imported by numpy.core (top-level), numpy.fft.helper (top-level)
missing module named numpy.core.sqrt - imported by numpy.core (top-level), numpy.linalg.linalg (top-level), numpy.fft._pocketfft (top-level)
missing module named numpy.core.conjugate - imported by numpy.core (top-level), numpy.fft._pocketfft (top-level)
missing module named numpy.core.sign - imported by numpy.core (top-level), numpy.linalg.linalg (top-level)
missing module named numpy.core.divide - imported by numpy.core (top-level), numpy.linalg.linalg (top-level)
missing module named numpy.core.geterrobj - imported by numpy.core (top-level), numpy.linalg.linalg (top-level)
missing module named numpy.core.add - imported by numpy.core (top-level), numpy.linalg.linalg (top-level)
missing module named numpy.core.complexfloating - imported by numpy.core (top-level), numpy.linalg.linalg (top-level)
missing module named numpy.core.inexact - imported by numpy.core (top-level), numpy.linalg.linalg (top-level)
missing module named numpy.core.cdouble - imported by numpy.core (top-level), numpy.linalg.linalg (top-level)
missing module named numpy.core.csingle - imported by numpy.core (top-level), numpy.linalg.linalg (top-level)
missing module named numpy.core.double - imported by numpy.core (top-level), numpy.linalg.linalg (top-level)
missing module named numpy.core.single - imported by numpy.core (top-level), numpy.linalg.linalg (top-level)
missing module named future_builtins - imported by numpy.lib.npyio (conditional)
missing module named urllib2 - imported by numpy.lib._datasource (delayed, conditional)
missing module named urlparse - imported by numpy.lib._datasource (delayed, conditional)
missing module named numpy.recarray - imported by numpy (top-level), numpy.ma.mrecords (top-level)
missing module named numpy.dtype - imported by numpy (top-level), numpy.ma.mrecords (top-level), numpy.ctypeslib (top-level)
missing module named numpy.expand_dims - imported by numpy (top-level), numpy.ma.core (top-level)
missing module named numpy.array - imported by numpy (top-level), numpy.ma.core (top-level), numpy.ma.extras (top-level), numpy.ma.mrecords (top-level), numpy.ctypeslib (top-level), pygame._numpysurfarray (top-level)
missing module named numpy.bool_ - imported by numpy (top-level), numpy.ma.core (top-level), numpy.ma.mrecords (top-level)
missing module named numpy.iscomplexobj - imported by numpy (top-level), numpy.ma.core (top-level)
missing module named numpy.amin - imported by numpy (top-level), numpy.ma.core (top-level)
missing module named numpy.amax - imported by numpy (top-level), numpy.ma.core (top-level)
missing module named numpy.ndarray - imported by numpy (top-level), numpy.ma.core (top-level), numpy.ma.extras (top-level), numpy.ma.mrecords (top-level), numpy.ctypeslib (top-level), pygame._numpysurfarray (top-level)
missing module named numpy.histogramdd - imported by numpy (delayed), numpy.lib.twodim_base (delayed)
missing module named numpy.eye - imported by numpy (delayed), numpy.core.numeric (delayed)
missing module named 'pygame.scrap' - imported by pygame (optional)
missing module named 'pygame.movie' - imported by pygame (optional)
missing module named 'pygame.overlay' - imported by pygame (optional)
missing module named Queue - imported by pygame.threads (conditional)
missing module named Py25Queue - imported by pygame.threads (conditional)
missing module named 'pygame.cdrom' - imported by pygame (conditional, optional)
missing module named cStringIO - imported by pygame.compat (conditional)

Thread Rating:

  • 0 Vote(s) — 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

PyInstaller on Mac … does not work easily?

Hello All!

I am new to this forum, however, I like the forums very much because I learn :)

I am having a problem with a pyinstaller, somehow, I get an error:

Last login: Thu Nov 19 11:50:46 on ttys001
mkdir: /Users/.../.bash_sessions: Operation not permitted
...SM_Python/build/simple/simple ; exit;
MU234s-iMac:~ mu234$ /Users/.../Desktop/Python delam/SM_Python/build/simple/simple ; exit;
[4606] Error loading Python lib '/Users/.../Desktop/Python delam/SM_Python/build/simple/Python': dlopen: dlopen(/Users/.../Desktop/Python delam/SM_Python/build/simple/Python, 10): image not found
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.

[Process completed]

Any idea why I do not have the permissions? I have ran the pyinstaller as SUDO : sudo pyinstaller simple.py, in addition, there is a problem with finding a python Lib? Not sure what that is?

Anyway, I am on MAC and if I run the script in terminal : python ….py works like a charm. Wondering what is going on.

Anyway, what can I do to properly have the standalone app?

Best.

Posts: 6,572

Threads: 116

Joined: Sep 2016

Reputation:
487

What version of Python are you running,the path look a little strange.
Look at The right and wrong way to set Python 3 as default on a Mac
So recently pyinstaller is now also updated for Python 3.9.

Should not need to run pyinstaller as sudo.
Not sure on permissions setup Mac,can make a virtual environment(build into python) that should fix permissions issues.

Quick demo.

[email protected]:~$ python -V
Python 3.8.5
[email protected]:~$ pip -V
pip 20.2.3 from /home/tom/.pyenv/versions/3.8.5/lib/python3.8/site-packages/pip (python 3.8)

# Make 
[email protected]:~$ python -m venv py_env

# cd in
[email protected]:~$ cd py_env

# Activate 
[email protected]:~/py_env$ source bin/activate

# Install
(py_env) [email protected]:~/py_env$ pip install pyinstaller
Collecting pyinstaller
  Downloading pyinstaller-4.1.tar.gz (3.5 MB) .....
  
Successfully installed altgraph-0.17 pyinstaller-4.1 pyinstaller-hooks-contrib-2020.10

# Now will pyisntaller run from this folder
(py_env) [email protected]:~/py_env$ which pyinstaller
/home/tom/py_env/bin/pyinstaller

mu234

Programmer named Tim


Posts: 9

Threads: 1

Joined: Nov 2020

Reputation:
0

python 3.9

will have a look at what you are saying … thanks!

(Nov-19-2020, 03:06 PM)snippsat Wrote: What version of Python are you running,the path look a little strange.
Look at The right and wrong way to set Python 3 as default on a Mac
So recently pyinstaller is now also updated for Python 3.9.

Should not need to run pyinstaller as sudo.
Not sure on permissions setup Mac,can make a virtual environment(build into python) that should fix permissions issues.

Quick demo.

[email protected]:~$ python -V
Python 3.8.5
[email protected]:~$ pip -V
pip 20.2.3 from /home/tom/.pyenv/versions/3.8.5/lib/python3.8/site-packages/pip (python 3.8)

# Make 
[email protected]:~$ python -m venv py_env

# cd in
[email protected]:~$ cd py_env

# Activate 
[email protected]:~/py_env$ source bin/activate

# Install
(py_env) [email protected]:~/py_env$ pip install pyinstaller
Collecting pyinstaller
  Downloading pyinstaller-4.1.tar.gz (3.5 MB) .....
  
Successfully installed altgraph-0.17 pyinstaller-4.1 pyinstaller-hooks-contrib-2020.10

# Now will pyisntaller run from this folder
(py_env) [email protected]:~/py_env$ which pyinstaller
/home/tom/py_env/bin/pyinstaller

mu234

Programmer named Tim


Posts: 9

Threads: 1

Joined: Nov 2020

Reputation:
0

Interestingly! I have a problem with get a version of pip, have a look at the output when I type $pip -V

MU234s-iMac:~ mu234$ python -V
Python 3.9.0

MU234s-iMac:~ mu234$ pip -V
Traceback (most recent call last):
File «/usr/local/bin/pip», line 5, in <module>
from pkg_resources import load_entry_point
File «/Users/mu234/Library/Python/2.7/lib/python/site-packages/pkg_resources/__init__.py», line 3251, in <module>
@_call_aside
File «/Users/mu234/Library/Python/2.7/lib/python/site-packages/pkg_resources/__init__.py», line 3235, in _call_aside
f(*args, **kwargs)
File «/Users/mu234/Library/Python/2.7/lib/python/site-packages/pkg_resources/__init__.py», line 3264, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File «/Users/mu234/Library/Python/2.7/lib/python/site-packages/pkg_resources/__init__.py», line 583, in _build_master
ws.require(__requires__)
File «/Users/mu234/Library/Python/2.7/lib/python/site-packages/pkg_resources/__init__.py», line 900, in require
needed = self.resolve(parse_requirements(requirements))
File «/Users/mu234/Library/Python/2.7/lib/python/site-packages/pkg_resources/__init__.py», line 786, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The ‘pip==20.2.4’ distribution was not found and is required by the application
MU234s-iMac:~ mu234$

I guess I have to reinstall the pip…

(Nov-20-2020, 10:21 AM)mu234 Wrote: python 3.9

will have a look at what you are saying … thanks!

(Nov-19-2020, 03:06 PM)snippsat Wrote: What version of Python are you running,the path look a little strange.
Look at The right and wrong way to set Python 3 as default on a Mac
So recently pyinstaller is now also updated for Python 3.9.

Should not need to run pyinstaller as sudo.
Not sure on permissions setup Mac,can make a virtual environment(build into python) that should fix permissions issues.

Quick demo.

[email protected]:~$ python -V
Python 3.8.5
[email protected]:~$ pip -V
pip 20.2.3 from /home/tom/.pyenv/versions/3.8.5/lib/python3.8/site-packages/pip (python 3.8)

# Make 
[email protected]:~$ python -m venv py_env

# cd in
[email protected]:~$ cd py_env

# Activate 
[email protected]:~/py_env$ source bin/activate

# Install
(py_env) [email protected]:~/py_env$ pip install pyinstaller
Collecting pyinstaller
  Downloading pyinstaller-4.1.tar.gz (3.5 MB) .....
  
Successfully installed altgraph-0.17 pyinstaller-4.1 pyinstaller-hooks-contrib-2020.10

# Now will pyisntaller run from this folder
(py_env) [email protected]:~/py_env$ which pyinstaller
/home/tom/py_env/bin/pyinstaller

mu234

Programmer named Tim


Posts: 9

Threads: 1

Joined: Nov 2020

Reputation:
0

ok, but when I try to install the pip I get the following :

Output:

MU234s-iMac:~ mu234$ sudo easy_install pip Password: Traceback (most recent call last): File "/usr/bin/easy_install-2.7", line 7, in <module> from pkg_resources import load_entry_point File "/Users/mu234/Library/Python/2.7/lib/python/site-packages/pkg_resources/__init__.py", line 3251, in <module> @_call_aside File "/Users/mu234/Library/Python/2.7/lib/python/site-packages/pkg_resources/__init__.py", line 3235, in _call_aside f(*args, **kwargs) File "/Users/mu234/Library/Python/2.7/lib/python/site-packages/pkg_resources/__init__.py", line 3264, in _initialize_master_working_set working_set = WorkingSet._build_master() File "/Users/mu234/Library/Python/2.7/lib/python/site-packages/pkg_resources/__init__.py", line 585, in _build_master return cls._build_from_requirements(__requires__) File "/Users/mu234/Library/Python/2.7/lib/python/site-packages/pkg_resources/__init__.py", line 598, in _build_from_requirements dists = ws.resolve(reqs, Environment()) File "/Users/mu234/Library/Python/2.7/lib/python/site-packages/pkg_resources/__init__.py", line 786, in resolve raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'setuptools==18.5' distribution was not found and is required by the application MU234s-iMac:~ mu234$

mu234

Programmer named Tim


Posts: 9

Threads: 1

Joined: Nov 2020

Reputation:
0

OK, it seems I have two versions of Python, and the default is Python 2.7 …

Output:

MU234s-iMac:~ mu234$ python -V Python 2.7.16 MU234s-iMac:~ mu234$ python3 -V Python 3.9.0 MU234s-iMac:~ mu234$

mu234

Programmer named Tim


Posts: 9

Threads: 1

Joined: Nov 2020

Reputation:
0

In addition, I do not have the pip :/

Output:

MU234s-iMac:~ mu234$ sudo easy_install pip sudo: unable to execute /Library/Frameworks/Python.framework/Versions/3.9/bin/easy_install: No such file or directory

mu234

Programmer named Tim


Posts: 9

Threads: 1

Joined: Nov 2020

Reputation:
0

OK, solved the problem with PIP with the «python3 get-pip.py» and now I have the pip version

Output:

MU234s-iMac:~ mu234$ pip -V pip 20.2.4 from /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pip (python 3.9)

mu234

Programmer named Tim


Posts: 9

Threads: 1

Joined: Nov 2020

Reputation:
0

… and pyinstaller version is 4.0

Output:

MU234s-iMac:~ mu234$ pyinstaller -v 4.0 MU234s-iMac:~ mu234$

IS THIS OK now?

mu234

Programmer named Tim


Posts: 9

Threads: 1

Joined: Nov 2020

Reputation:
0

OK, now I have followed your instructions and seems ok, but when I run the final .executable in district folder I get the following:

Output:

Last login: Fri Nov 20 12:29:17 on ttys000 mkdir: /Users/mu234/.bash_sessions: Operation not permitted MU234s-iMac:~ mu234$ /Users/mu234/Desktop/Python delam/SM_Python/dist/SM_final/SM_final ; exit; [3054] Error loading Python lib '/Users/mu234/Desktop/Python delam/SM_Python/dist/SM_final/Python': dlopen: dlopen(/Users/mu234/Desktop/Python delam/SM_Python/dist/SM_final/Python, 10): no suitable image found. Did find: /Users/mu234/Desktop/Python delam/SM_Python/dist/SM_final/Python: code signature invalid for '/Users/mu234/Desktop/Python delam/SM_Python/dist/SM_final/Python' logout Saving session... ...copying shared history... ...saving history...truncating history files... ...completed. [Process completed]
Possibly Related Threads…
Thread Author Replies Views Last Post
  how to easily create a list of already existing item CompleteNewb 15 1,827 Jan-06-2022, 12:48 AM
Last Post: CompleteNewb

Эта страница — попытка документировать общие проблемы с TF2 Classic и их решения.

Убедитесь, что вы полностью выполнили инструкции, приведенные на странице Установка, прежде чем искать решение проблему здесь.

Проблемы, связанные с TF2CDownloader

(Windows) SmartScreen заблокировал TF2CDownloader!

Он делает это для каждого неподписанного приложения. Подписать его будет стоить нам около $800 в год, поэтому мы этого не делаем. Во всплывающем окне SmartScreen нажмите «Подробнее», затем «Выполнить в любом случае».

(Windows) Пишет, что TF2CDownloader нахватает памяти!

Это происходит на Windows 7. Мы не поддерживаем и не можем поддерживать Windows 7, вы должны установить игру вручную.

(Linux) TF2CDownloader выдает «Error loading Python lib»!

Это происходит, когда приложение было собрано с версией glibc, более новой, чем та, которую поддерживает ваш дистрибутив. В настоящее время мы поддерживаем Ubuntu 20.04 и любой другой дистрибутив с glibc 2.31 или новее.

Почему при запуске TF2CDownloader возникает так много ошибок?

Это нормально. Выводимые данные чрезвычайно подробны. Первое, что делает TF2CDownloader, это проверяет, существует ли уже файл игры для проверки. Обычно он не существует, что заставляет его выдать «Checksum error». Затем, если какие-либо зеркала не работают, выходят из строя, отсутствуют или имеют другие проблемы, он также выдаст ошибку при попытке связаться с ними. Это не фатальные ошибки, и они ожидаются в процессе работы.

Я не могу найти папку, которую извлек TF2CDownloader!

Если вы не извлекаете файлы в исходные файлы (sourcemods), ваш каталог для извлечения — большая и загроможденная папка, «и» вы сортируете папки по дате изменения, вы, скорее всего, не сможете легко найти папку, которую он извлек. Вместо этого следует отсортировать папку в алфавитном порядке, а затем прокрутить ее, пока не найдете папку «tf2classic», чтобы переместить ее в папку sourcemods. Также может быть полезно нажать F5, чтобы обновить содержимое папки.

Проблемы с ручной установкой

Я получаю ошибку при попытке извлечь ZIP!

В Windows

Известно, что эта ошибка возникает при использовании встроенного ZIP-архиватора Проводника Windows. Для извлечения файлов игры необходимо использовать сторонние архиваторы (см. ниже).

Проверенные и поддерживаемые варианты включают 7-Zip, PeaZip, и WinZip (не бесплатный). WinRAR вероятно, также подойдет, однако его не рекомендуется использовать, поскольку в прошлом он был известен случайными ошибками при извлечении, а также тем, что является проприетарным.

В Linux

Эта проблема связана с тем, что старые версии libzip не поддерживают ZIP файлы, сжатые с помощью LZMA, что влияет на множество менеджеров архивов. Команда unzip не будет работать.

В дистрибутивах на базе KDE Plasma необходимо открыть Ark, нажать на «Settings» на панели инструментов, нажать «Configure Ark…», и в разделе «Plugins» окна конфигурации снять галочку с «Libzip plugin». Примените изменения и повторите попытку извлечения. Он должен вернуться к использованию бэкенда P7Zip, который будет работает нормально.

Как правило, следует установить 7-Zip и распаковать через CLI. На Ubuntu 22.04+ или Debian 12+ установите пакет «7zip». В Arch Linux или Manjaro установите «7-zip» из AUR. Затем выполните:

7zz x tf2classic-2.0.3.zip

И переместите извлеченную папку «tf2classic» в папку sourcemods.

Различные вопросы

Я не могу подключиться ни к одному серверу, и весь текст начинается с #TF!

Убедитесь в правильности структуры папок. Внутри вашей папки sourcemods, должна быть папка tf2classic, которая должна содержать файл gameinfo.txt. Если это не так, значит, вы извлекли файл неправильно. Если ваш путь выглядит как sourcemods/tf2classic-2.0.4/tf2classic или если все ваши файлы свободно сбрасываются в sourcemods, это приведет к такой проблеме.

Программа запуска сообщает мне, что SDK2013 не установлен, но он установлен!

Это может произойти, если Source SDK Base 2013 Multiplayer установлен на отдельный диск от клиента Steam. Правильный диск почти всегда будет C:. Любые другие диски кроме дисков C: приведут к проблемам. Вы можете переместить его, как показано ниже:

MoveSDKrus.jpg

Для опытных пользователей есть возможность создать символическая ссылку из предполагаемого местоположения в общей папке на диске C: в реальное местоположение на другом диске. Смотрите инструкцию здесь о том, как создать такую ссылку.

Программа запуска говорит, что SDK2013 необходимо обновить, но это так!

Вам следует попробовать запустить SDK2013 из Steam. Даже если Steam утверждает, что он полностью установлен, он может требовать проверки или другой работы, которую Steam выполнит только при попытке его запуска. После запуска и повторного закрытия перезапустите программу запуска.

Лаунчер не работает!

Если у вас возникли какие-либо проблемы с лаунчером, вы можете полностью игнорировать её. Игра должна появиться в вашей библиотеке Steam, если она была установлена правильно, и вы можете запустить ее через неё.

Моя игра не отображается в моей библиотеке Steam!

Сначала полностью перезапустите Steam, если вы этого не сделали после установки игры. Щелкните правой кнопкой мыши по Steam в системном трее (стрелка вверх рядом с уведомлениями и панелью задач), затем нажмите «Выход» в появившемся меню. Или нажмите на кнопку Steam в левом верхнем углу окна и выберите «Выход» из выпадающего меню. Затем снова запустите Steam и посмотрите, появится ли он.

Если это не сработало, убедитесь, что структура папок правильная. Внутри вашей папки sourcemods, должна быть папка tf2classic, которая должна содержать файл gameinfo.txt. Если все это не так, значит, вы извлекли файл неправильно. Если ваш путь выглядит как sourcemods/tf2classic-2.0.4/tf2classic или если все ваши файлы свободно сбрасываются в sourcemods, это приведет к тому, что файл не будет обнаружен.

Эта проблема также может возникнуть, если Steam и TF2 Classic установлены на разных дисках (например, Steam на диске C:, а TF2 Classic на диске E:). Решение заключается в создании «символичной ссылки» — в папке с Steam, которая перенаправляет на папку во внешнем диске. Этапы для этого зависят от вашей системы.

Создание символичной ссылки в Windows

  1. Найдите свою папку sourcemods. Если вы не можете найти его, вы можете выполнить reg query HKCUSoftwareValveSteam /v SourceModInstallPath в Командной строке, чтобы увидеть путь.
  2. Удалите папку sourcemods, иначе Символическая ссылка не сможет быть создана. Если какие-либо моды все еще находятся там, перенесите их в новое место.
  3. Откройте Командную строку от имени администратора.
  4. Введите эту команду: mklink /d /j "path to steam sourcemods" "path to your sourcemods"

Замените "path to steam sourcemods" на путь Steam sourcemods, например: "C:Program Files (x86)Steamsteamappssourcemods"

Замените "path to your sourcemods" на любой путь, который вам нужен, например: "D:Gamessourcemods"

Создание символичной ссылки в Linux

  1. Удалите папку Steam sourcemods, которая обычно находится по пути ~/.steam/steam/steamapps/sourcemods
  2. Откройте терминал и запустите ln -s /path/to/your/sourcemods ~/.steam/steam/steamapps/sourcemods

Как и в Windows, замените /path/to/your/sourcemods на полный путь к папке, которую вы хотите использовать на внешнем диске.

Обратите внимание, что любой внешний диск, используемый для запуска игр, «должен быть доступен для чтения и записи вашим пользователем, и у вас должны быть права на выполнение действий». Если это диск NTFS, следуйте руководству Valve по его подготовке: https://github.com/ValveSoftware/Proton/wiki/Using-a-NTFS-disk-with-Linux-and-Windows.

(Linux) Моя игра не может подключиться к серверам!/Мой внутриигровой оверлей не работает!

В Linux для правильной работы TF2C требуется специальный параметр запуска. Щелкните правой кнопкой мыши по игре в библиотеке Steam, нажмите «Свойства», затем вставьте это в поле «Параметры запуска»:

LD_PRELOAD="$HOME/.steam/steam/ubuntu12_32/gameoverlayrenderer.so" %command% -steam -steam

Это исправит оверлей и позволит вам подключаться к игровым серверам.

«На сервере, к которому вы пытаетесь подключиться, установлена старая версия игры».

Эта ошибка частично ложная. Чаще всего старая версия игры установлена не на сервере, а у вас. Если вы сами скачали старую версию игры, то при подключении к официальным серверам вы получите эту ошибку. Следовательно, вам необходимо переустановить игру из архива, используя последнюю версию игры.

Игроки невидимы в моей игре!

Обычно это происходит, если сеть ненадежна или игра тормозит. Можно выполнить команду, чтобы исправить это, хотя вам придется выполнять эту команду каждый раз, когда это будет происходить.

  1. Включите консоль разработчиков в настройках игры.
  2. Нажмите клавишу ~ (тильда, или Ё на русской раскладке) на клавиатуре, чтобы открыть консоль.
  3. Запустите record demo;stop

Игра застряла на «Получение информации о сервере», но я слышу внутриигровые звуки!

Эта проблема возникает, если вы запускаете игру с Intel Graphics вместо использования выделенного GPU.

Решением является снижение графических настроек до тех пор, пока проблема не исчезнет.

Смотрите также

  • Установка
  • Discord сервер (напишите в наш англоязычный дискорд сервер, в канал #technical-issues если ваш вопрос не удалось решить здесь)

Fix Python DLL error by using administrative privileges

by Tashreef Shareef

Tashreef Shareef is a software developer turned tech writer. He discovered his interest in technology after reading a tech magazine accidentally. Now he writes about everything tech from… read more


Updated on November 10, 2022

Reviewed by
Alex Serban

Alex Serban

After moving away from the corporate work-style, Alex has found rewards in a lifestyle of constant analysis, team coordination and pestering his colleagues. Holding an MCSA Windows Server… read more

  • If you’re getting an Error loading Python DLL, make sure you’re using the right directory.
  • Lack of administrative privileges can often cause this problem to appear.

XINSTALL BY CLICKING THE DOWNLOAD FILE

To fix errors caused by DLLs, we recommend Restoro:This software will replace the broken or corrupted DLLs with their working versions from a dedicated database where the tool has the official DLL files. The tools will also keep you away from hardware failure and malware damage. Fix PC issues and remove virus damage now in 3 easy steps:

  1. Download Restoro PC Repair Tool that comes with Patented Technologies (patent available here).
  2. Click Start Scan to find DLL files that could be causing PC problems.
  3. Click Repair All to replace broken DLLs with working versions
  • Restoro has been downloaded by 0 readers this month.

Python is a great programming language, but error loading Python DLL on their PC. This problem can lead to other issues, such as Python runtime error for example.

If you are also troubled by this error, here are a couple of troubleshooting tips to help you resolve this issue once and for all.

Why does the error loading Python DLL appear?

There are multiple reasons for this issue, but the following are the most common ones:

  • User error – Sometimes not running the proper file or not having your script configured properly can lead to DLL errors. This can also lead to PIP not recognized and other errors.
  • Lack of administrative privileges – If you don’t use administrative rights while running Python commands, sometimes you might encounter this error. You can do that by using administrator account.
  • Version incompatibility – Older versions of Python aren’t always compatible with scripts made using the latest version, which results in this error.

How can I fix the error loading Python DLL?

Before we start fixing this problem, there are a couple of quick checks that you need to perform:

  • Use the correct directory – Many users reported this issue because they used build instead of dist directory. Not using correct directory can lead to The specified module could not be found and other problems. To avoid this issue, always use dist/main
  • Check your Python version – If you compiled your script with a newer version, older versions of Python might not be able to run it. This is especially true for Windows 7 since it doesn’t support Python 3.9 or never.
  • Start the console as administrator – Before you run your script, that the command line as administrator and check if that helps.

1. Add your configuration to the Python script

  1. Open your Python file.
  2. Copy the configuration parameters to the top of the file.
  3. Save changes.

Many users reported that moving the configuration parameters from a separate file or the spec file, fixed the problem for them, so be sure to try it.

This solution can help you if you’re getting error loading python dll python310.dll or python39.dll anaconda message, so be sure to try it.

Restoro repair

Restoro is a reliable third-party DLL fixer which uses a built-in automated system and an online library full of functional DLLs to replace and repair any files that might be corrupted or damaged on your PC.

All you need to do to resolve your PC’s problems is to launch it, and simply follow the on-screen instructions to start the process, as everything else is covered by the software’s automated processes.

This is how you can fix registry errors using Restoro:

  1. Download and install Restoro.
  2. Launch the software.
  3. Wait for it to scan your PC for any stability issues and possible malware.
  4. Press Start Repair.
  5. Restart your PC for all the changes to take effect.

After this process is completed your PC will be as good as new, and you will no longer have to deal with BSoD errors, slow response times, or other similar issues.

⇒ Get Restoro


Disclaimer: This program needs to be upgraded from the free version in order to perform some specific actions.


2. Use different parameters with pyinstaller

  1. Start your console.
  2. Now enter the following command: pyinstaller --upx-exclude"vcruntime140.dll" myscript.py
  3. Press Enter to run it.

Some PC issues are hard to tackle, especially when it comes to corrupted repositories or missing Windows files. If you are having troubles fixing an error, your system may be partially broken.
We recommend installing Restoro, a tool that will scan your machine and identify what the fault is.
Click here to download and start repairing.

Users also reported that the following commands worked for them, so feel free to try them as well: pyinstaller --onefile file_name.py
pyinstaller --noupx file_name.py

This is a simple and easy solution if you’re getting error loading python DLL in pyinstaller.

3. Add Temp directory to the list of exclusions

  1. Press Windows key + S and enter windows security. Select Windows Security from the list.
  2. Go to Virus & threat protection. Next click on Manage settings.
  3. Click on Add or remove exclusions.
    Add or remove exclusions - asus rog gaming center not working
  4. Click on Add an exclusion and select Folder.
  5. Select the following directory: C:Usersyour_usernameAppDataLocalTemp

Error loading python dll loadlibrary pyinstaller: formatmessagew failed can cause a lot of problems, but this solution might help you fix them.

Read more about this topic

  • How to open PY files on a Windows 10/11 PC
  • Windows can’t find Python executable error [QUICK FIX]
  • Circular Kernel Context Logger 0xc0000035: 6 Easy Fixes
  • Error Opening File for Writing: 9 Methods to Fix This Issue
  • Fix: The Local Device Name is Already in Use in Windows 10

4. Delete files from pyinstaller folder

  1. Press Windows key + R and enter %appdata%. Press Enter.
  2. Navigate to pyinstaller directory.
  3. Delete all files from it.

This is a simple workaround and it can be helpful if you’re getting error loading Python DLL in Ultimaker Cura or AWS CLI.

The Error loading Python DLL can be problematic, but we hope you managed to solve it. If you believe that this issue is caused by a lack of permissions, our Python permission denied error guide should be able to help you.

Did you find a different solution for this problem? Let us know in the comments section below.

newsletter icon

Newsletter

Понравилась статья? Поделить с друзьями:
  • Error loading python dll loadlibrary не найден указанный модуль
  • Error loading python dll loadlibrary pyinstaller formatmessagew failed
  • Error loading python dll cura
  • Error loading psycopg2 module dll load failed while importing psycopg
  • Error loading program files