Having an import issue when running the exe (as onefile) created by pyinstaller I added 'falcon.responders' to the list of hidden imports. But still the import error when running the executable. What can be wrong?
Traceback (most recent call last):
File "s2rdf.py", line 62, in <module>
import morph_kgc
File "PyInstaller\loader\pyimod03_importers.py", line 495, in exec_module
File "morph_kgc\__init__.py", line 16, in <module>
File "PyInstaller\loader\pyimod03_importers.py", line 495, in exec_module
File "morph_kgc\engine.py", line 16, in <module>
File "PyInstaller\loader\pyimod03_importers.py", line 495, in exec_module
File "morph_kgc\materializer.py", line 14, in <module>
File "PyInstaller\loader\pyimod03_importers.py", line 495, in exec_module
File "falcon\__init__.py", line 32, in <module>
File "falcon\app.py", line 24, in init falcon.app
ImportError: cannot import name responders
[16196] Failed to execute script 's2rdf' due to unhandled exception!
Snippet from spec file
a = Analysis(
['s2rdf.py'],
pathex=[],
binaries=[],
datas=[],
hiddenimports=['falcon.app_helpers','falcon.responders'],
hookspath=[],
hooksconfig={},
I had a similar problem, but it was fixed by removing the last generated directories ("build" and "dist") and using this hidden import list:
hiddenimports=['falcon.app_helpers', 'xml.etree', 'falcon.responders', 'xml.etree.ElementTree']
Related
So I have two VM machines running windows 10, and one one of them I get a funky error after installing one of our site-packages.
Some info:
Python version Python 3.10.2 with latests pip is installed, and I also have git 2.16.2.
The repository/python lib requires python 3.10+.
I run this command on my machine:
pip install --upgrade git+ssh://git#bitbucket.ccd2.com:7999/pyt/jira
it installed at normal, but when I then run pip list I get the following error:
$ pip list
Traceback (most recent call last):
File "C:\Programs\Python\Python3102\lib\importlib\_common.py", line 89, in _te mpfile
os.write(fd, reader())
File "C:\Programs\Python\Python3102\lib\importlib\abc.py", line 371, in read_b ytes
with self.open('rb') as strm:
File "C:\Programs\Python\Python3102\lib\importlib\_adapters.py", line 54, in o pen
raise ValueError()
ValueError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Programs\Python\Python3102\lib\runpy.py", line 196, in _run_module_as _main
return _run_code(code, main_globals, None,
File "C:\Programs\Python\Python3102\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Programs\Python\Python3102\Scripts\pip.exe\__main__.py", line 4, in < module>
File "C:\Programs\Python\Python3102\lib\site-packages\pip\_internal\cli\main.p y", line 9, in <module>
from pip._internal.cli.autocompletion import autocomplete
File "C:\Programs\Python\Python3102\lib\site-packages\pip\_internal\cli\autoco mpletion.py", line 10, in <module>
from pip._internal.cli.main_parser import create_main_parser
File "C:\Programs\Python\Python3102\lib\site-packages\pip\_internal\cli\main_p arser.py", line 8, in <module>
from pip._internal.cli import cmdoptions
File "C:\Programs\Python\Python3102\lib\site-packages\pip\_internal\cli\cmdopt ions.py", line 23, in <module>
from pip._internal.cli.parser import ConfigOptionParser
File "C:\Programs\Python\Python3102\lib\site-packages\pip\_internal\cli\parser .py", line 12, in <module>
from pip._internal.configuration import Configuration, ConfigurationError
File "C:\Programs\Python\Python3102\lib\site-packages\pip\_internal\configurat ion.py", line 20, in <module>
from pip._internal.exceptions import (
File "C:\Programs\Python\Python3102\lib\site-packages\pip\_internal\exceptions .py", line 13, in <module>
from pip._vendor.requests.models import Request, Response
File "C:\Programs\Python\Python3102\lib\site-packages\pip\_vendor\requests\__i nit__.py", line 135, in <module>
from . import utils
File "C:\Programs\Python\Python3102\lib\site-packages\pip\_vendor\requests\uti ls.py", line 27, in <module>
from . import certs
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "C:\Programs\Python\Python3102\lib\site-packages\wrapt\importer.py", line 177, in _exec_module
notify_module_loaded(module)
File "C:\Programs\Python\Python3102\lib\site-packages\wrapt\decorators.py", li ne 470, in _synchronized
return wrapped(*args, **kwargs)
File "C:\Programs\Python\Python3102\lib\site-packages\wrapt\importer.py", line 136, in notify_module_loaded
hook(module)
File "C:\Programs\Python\Python3102\lib\site-packages\certifi_win32\wrapt_pip. py", line 35, in apply_patches
import certifi
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "C:\Programs\Python\Python3102\lib\site-packages\wrapt\importer.py", line 177, in _exec_module
notify_module_loaded(module)
File "C:\Programs\Python\Python3102\lib\site-packages\wrapt\decorators.py", li ne 470, in _synchronized
return wrapped(*args, **kwargs)
File "C:\Programs\Python\Python3102\lib\site-packages\wrapt\importer.py", line 136, in notify_module_loaded
hook(module)
File "C:\Programs\Python\Python3102\lib\site-packages\certifi_win32\wrapt_cert ifi.py", line 20, in apply_patches
certifi_win32.wincerts.CERTIFI_PEM = certifi.where()
File "C:\Programs\Python\Python3102\lib\site-packages\certifi\core.py", line 3 7, in where
_CACERT_PATH = str(_CACERT_CTX.__enter__())
File "C:\Programs\Python\Python3102\lib\contextlib.py", line 135, in __enter__
return next(self.gen)
File "C:\Programs\Python\Python3102\lib\importlib\_common.py", line 95, in _te mpfile
os.remove(raw_path)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\77870\\AppData\\Local\\Temp\\2\\tmplh cnerdl'
I have no idea why it works on all other machines VM or my own PC, but this one VM machine has this problem.
I have reinstalled everything and tried different versions of python and git, but the same error occurs.
I think it looks like something is stuck maybe in the temp folder? or maybe I have an issue with something else that I don't know?
Because its in the Temp folder, maybe its just a leftover from a program. Try deleting it, but I would make a backup for in case things go wrong. However, because this is kinda risky, I would wait in case a better answer appears (I have too little rep to comment).
I corrected it by removing two *.pth files that were created when I had installed python-certifi-win32. This prevents python-certifi-win32 from loading when python is run.
The files are listed below, and were located here:
%LOCALAPPDATA%\Programs\Python\Python310\Lib\site-packages
Files:
python-certifi-win32-init.pth
distutils-precedence.pth
Had a machine where everything was running so made a pip freeze > req.txt file to check every version one by one, and then I just tried to update all the pip list --outdated packages, and when wrapt was updated the problem occurred. Downgraded the version to wrapt==1.13.3 which one of the other machines was running and now everything works.
I installed the python-certifi-win32 module (I'm so busy trying to fix this problem that I don't even remember why I originally installed it). Right after I installed it, though, I started getting this error when I run pip (extended error code below): PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\user1\\AppData\\Local\\Temp\\tmph93rz74c'
When I delete the file C:\\Users\\user1\\AppData\\Local\\Temp\\tmph93rz74c, another file pops up in its place, just with a different random combination of letters and numbers, and the error says the new file name instead.
I have no idea how to fix it, my pip hasn't been working for days. I've looked through tens of pages of google results.
Full error code:
Traceback (most recent call last):
File "C:\Users\user1\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\user1\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Users\user1\AppData\Local\Programs\Python\Python310\Scripts\pip.exe\__main__.py", line 4, in <module>
File "C:\Users\user1\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_internal\cli\main.py", line 9, in <module>
from pip._internal.cli.autocompletion import autocomplete
File "C:\Users\user1\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_internal\cli\autocompletion.py", line 10, in <module>
from pip._internal.cli.main_parser import create_main_parser
File "C:\Users\user1\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_internal\cli\main_parser.py", line 8, in <module>
from pip._internal.cli import cmdoptions
File "C:\Users\user1\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_internal\cli\cmdoptions.py", line 23, in <module>
from pip._internal.cli.parser import ConfigOptionParser
File "C:\Users\user1\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_internal\cli\parser.py", line 12, in <module>
from pip._internal.configuration import Configuration, ConfigurationError
File "C:\Users\user1\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_internal\configuration.py", line 20, in <module>
from pip._internal.exceptions import (
File "C:\Users\user1\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_internal\exceptions.py", line 13, in <module>
from pip._vendor.requests.models import Request, Response
File "C:\Users\user1\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\requests\__init__.py", line 135, in <module>
from . import utils
File "C:\Users\user1\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\requests\utils.py", line 27, in <module>
from . import certs
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "C:\Users\user1\AppData\Local\Programs\Python\Python310\lib\site-packages\wrapt\importer.py", line 170, in exec_module
notify_module_loaded(module)
File "C:\Users\user1\AppData\Local\Programs\Python\Python310\lib\site-packages\wrapt\decorators.py", line 470, in _synchronized
return wrapped(*args, **kwargs)
File "C:\Users\user1\AppData\Local\Programs\Python\Python310\lib\site-packages\wrapt\importer.py", line 136, in notify_module_loaded
hook(module)
File "C:\Users\user1\AppData\Local\Programs\Python\Python310\lib\site-packages\certifi_win32\wrapt_pip.py", line 35, in apply_patches
import certifi
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "C:\Users\user1\AppData\Local\Programs\Python\Python310\lib\site-packages\wrapt\importer.py", line 170, in exec_module
notify_module_loaded(module)
File "C:\Users\user1\AppData\Local\Programs\Python\Python310\lib\site-packages\wrapt\decorators.py", line 470, in _synchronized
return wrapped(*args, **kwargs)
File "C:\Users\user1\AppData\Local\Programs\Python\Python310\lib\site-packages\wrapt\importer.py", line 136, in notify_module_loaded
hook(module)
File "C:\Users\user1\AppData\Local\Programs\Python\Python310\lib\site-packages\certifi_win32\wrapt_certifi.py", line 20, in apply_patches
certifi_win32.wincerts.CERTIFI_PEM = certifi.where()
File "C:\Users\user1\AppData\Local\Programs\Python\Python310\lib\site-packages\certifi\core.py", line 37, in where
_CACERT_PATH = str(_CACERT_CTX.__enter__())
File "C:\Users\user1\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 135, in __enter__
return next(self.gen)
File "C:\Users\user1\AppData\Local\Programs\Python\Python310\lib\importlib\_common.py", line 95, in _tempfile
os.remove(raw_path)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\user1\\AppData\\Local\\Temp\\tmph93rz74c'
I ran into the same problem after installing python-certifi-win32. I installed this package in the hope to solve errors caused by the self-signed certificate used by our SSL Inspection infrastructure.
To bring pip back to a running state remove python-certifi-win32 from the installation folder:
Determine the installation path for pip packages (source):
python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"
Switch to the folder and delete the package's files:
del python-certifi-win32-init.pth
rmdir /s/q python_certifi_win32-1.6.dist-info
I could observe the same error pattern when upgrading from Python 3.9 to Python 3.10. Somehow python-certifi-win32 seems to be malfunctioning in certain scenarios then.
Andrew Leech, the author of python-certifi-win32, suggests to move on to his other project pip-system-certs . Drop-in replacing the library with pip-system-certs (PyPI link) solved all issues for me.
the only solution to this problem is to delete Python from control panel.Then completely delete the Python folder from the address below
windows:
C:\Users\user1\AppData\Local\Programs\python
and linux base:
/bin/python3
I am using darkflow for custom object detection it is working perfectly fine and it is running perfectly through anaconda prompt. I made the exe using pyinstaller, So when I was running the exe it is showing the above error. Can anyone help me to get rid of this? I tried installing darkflow globally also but it didn't work.
Traceback (most recent call last):
File "demo.py", line 1, in <module>
from darkflow.net.build import TFNet
File "c:\users\camfyvision\anaconda3\envs\darkflow\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module
exec(bytecode, module.__dict__)
File "darkflow\net\build.py", line 7, in <module>
from .framework import create_framework
File "c:\users\camfyvision\anaconda3\envs\darkflow\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module
exec(bytecode, module.__dict__)
File "darkflow\net\framework.py", line 1, in <module>
from . import yolo
File "c:\users\camfyvision\anaconda3\envs\darkflow\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module
exec(bytecode, module.__dict__)
File "darkflow\net\yolo\__init__.py", line 2, in <module>
from . import predict
File "c:\users\camfyvision\anaconda3\envs\darkflow\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module
exec(bytecode, module.__dict__)
File "darkflow\net\yolo\predict.py", line 7, in <module>
from ...cython_utils.cy_yolo_findboxes import yolo_box_constructor
File "c:\users\camfyvision\anaconda3\envs\darkflow\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 714, in load_module
module = loader.load_module(fullname)
File "darkflow\cython_utils\cy_yolo_findboxes.pyx", line 1, in init darkflow.cython_utils.cy_yolo_findboxes
import numpy as np
ModuleNotFoundError: No module named 'darkflow.cython_utils.nms'
This is the error I got when I did drag and drop of the exe into propmt and also I am providing below the corresponding information I got regarding the error when I was making the exe using pyinstaller.
136360 INFO: Updating manifest in C:\Users\CamfyVision\AppData\Roaming\pyinstaller\bincache00_py36_64bit\darkflow.cython_utils.cy_yolo_findboxes.pyd
136361 INFO: Updating resource type 24 name 2 language 1033
136413 INFO: Updating manifest in C:\Users\CamfyVision\AppData\Roaming\pyinstaller\bincache00_py36_64bit\darkflow.cython_utils.cy_yolo2_findboxes.pyd
136414 INFO: Updating resource type 24 name 2 language 1033
I am trying to create or open existing conda project in PyCharm. In both cases I get this error:
TypeError: LoadLibrary() argument 1 must be str, not None
I have Anaconda3 package installed (conda 4.7.5) on my Windows machine. I was able to use it successfully from Anaconda Prompt (create and use environments, install packages and create project). But every time I try to create a project in PyCharm by selecting "File -> New Project -> Scientific -> New environment using Conda" with Python 3.6 I am getting the error above while the project is being created.
Alternatively, when I open existing conda project (from Anaconda Prompt) in PyCharm and then trying to select conda as interpreter I am getting exact same error.
I have been trying to solve this problem for 3 hours: reading forums, installing older versions, trying miniconda instead. Is that the problem with PyCharm?
Edit: Attached full stack trace.
Traceback (most recent call last):
File "C:\Users\Eduard\Anaconda3\lib\site-packages\conda\exceptions.py", line 1043, in __call__
return func(*args, **kwargs)
File "C:\Users\Eduard\Anaconda3\lib\site-packages\conda\cli\main.py", line 84, in _main
exit_code = do_call(args, p)
File "C:\Users\Eduard\Anaconda3\lib\site-packages\conda\cli\conda_argparse.py", line 80, in do_call
module = import_module(relative_mod, __name__.rsplit('.', 1)[0])
File "C:\Users\Eduard\Anaconda3\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "C:\Users\Eduard\Anaconda3\lib\site-packages\conda\cli\main_create.py", line 10, in <module>
from .install import install
File "C:\Users\Eduard\Anaconda3\lib\site-packages\conda\cli\install.py", line 19, in <module>
from ..core.index import calculate_channel_urls, get_index
File "C:\Users\Eduard\Anaconda3\lib\site-packages\conda\core\index.py", line 9, in <module>
from .package_cache_data import PackageCacheData
File "C:\Users\Eduard\Anaconda3\lib\site-packages\conda\core\package_cache_data.py", line 15, in <module>
from conda_package_handling.api import InvalidArchiveError
File "C:\Users\Eduard\Anaconda3\lib\site-packages\conda_package_handling\api.py", line 3, in <module>
from libarchive.exception import ArchiveError as _LibarchiveArchiveError
File "C:\Users\Eduard\Anaconda3\lib\site-packages\libarchive\__init__.py", line 1, in <module>
from .entry import ArchiveEntry
File "C:\Users\Eduard\Anaconda3\lib\site-packages\libarchive\entry.py", line 6, in <module>
from . import ffi
File "C:\Users\Eduard\Anaconda3\lib\site-packages\libarchive\ffi.py", line 27, in <module>
libarchive = ctypes.cdll.LoadLibrary(libarchive_path)
File "C:\Users\Eduard\Anaconda3\lib\ctypes\__init__.py", line 434, in LoadLibrary
return self._dlltype(name)
File "C:\Users\Eduard\Anaconda3\lib\ctypes\__init__.py", line 356, in __init__
self._handle = _dlopen(self._name, mode)
TypeError: LoadLibrary() argument 1 must be str, not None
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Eduard\Anaconda3\Scripts\conda-script.py", line 12, in <module>
sys.exit(main())
File "C:\Users\Eduard\Anaconda3\lib\site-packages\conda\cli\main.py", line 150, in main
return conda_exception_handler(_main, *args, **kwargs)
File "C:\Users\Eduard\Anaconda3\lib\site-packages\conda\exceptions.py", line 1335, in conda_exception_handler
return_value = exception_handler(func, *args, **kwargs)
File "C:\Users\Eduard\Anaconda3\lib\site-packages\conda\exceptions.py", line 1046, in __call__
return self.handle_exception(exc_val, exc_tb)
File "C:\Users\Eduard\Anaconda3\lib\site-packages\conda\exceptions.py", line 1090, in handle_exception
return self.handle_unexpected_exception(exc_val, exc_tb)
File "C:\Users\Eduard\Anaconda3\lib\site-packages\conda\exceptions.py", line 1101, in handle_unexpected_exception
self.print_unexpected_error_report(error_report)
File "C:\Users\Eduard\Anaconda3\lib\site-packages\conda\exceptions.py", line 1171, in print_unexpected_error_report
from .cli.main_info import get_env_vars_str, get_main_info_str
File "C:\Users\Eduard\Anaconda3\lib\site-packages\conda\cli\main_info.py", line 19, in <module>
from ..core.index import _supplement_index_with_system
File "C:\Users\Eduard\Anaconda3\lib\site-packages\conda\core\index.py", line 9, in <module>
from .package_cache_data import PackageCacheData
File "C:\Users\Eduard\Anaconda3\lib\site-packages\conda\core\package_cache_data.py", line 15, in <module>
from conda_package_handling.api import InvalidArchiveError
File "C:\Users\Eduard\Anaconda3\lib\site-packages\conda_package_handling\api.py", line 7, in <module>
from .tarball import CondaTarBZ2 as _CondaTarBZ2
File "C:\Users\Eduard\Anaconda3\lib\site-packages\conda_package_handling\tarball.py", line 7, in <module>
import libarchive
File "C:\Users\Eduard\Anaconda3\lib\site-packages\libarchive\__init__.py", line 1, in <module>
from .entry import ArchiveEntry
File "C:\Users\Eduard\Anaconda3\lib\site-packages\libarchive\entry.py", line 6, in <module>
from . import ffi
File "C:\Users\Eduard\Anaconda3\lib\site-packages\libarchive\ffi.py", line 27, in <module>
libarchive = ctypes.cdll.LoadLibrary(libarchive_path)
File "C:\Users\Eduard\Anaconda3\lib\ctypes\__init__.py", line 434, in LoadLibrary
return self._dlltype(name)
File "C:\Users\Eduard\Anaconda3\lib\ctypes\__init__.py", line 356, in __init__
self._handle = _dlopen(self._name, mode)
TypeError: LoadLibrary() argument 1 must be str, not None
I was getting the same issue while making a conda environment through command prompt. I added this in my environment variables. It helped in my case. Maybe it can help you as well
Your path to anaconda folder/Anaconda3/library/bin
I am using Pyinstaller on Ubuntu to create a binary executable for my Python code. This code has a bunch of files and dependencies. One of them is tensorflow. The executable is getting created correctly but when I try to run it, I get the following error:
Traceback (most recent call last):
File "detection_init.py", line 14, in <module>
import lib.tensorboxDetector as tensorboxDetector
File "/tmp/pip-build-EuLWEf/pyinstaller/PyInstaller/loader/pyimod03_importers.py", line 389, in load_module
File "lib/tensorboxDetector.py", line 20, in <module>
import tensorflow as tf
File "/tmp/pip-build-EuLWEf/pyinstaller/PyInstaller/loader/pyimod03_importers.py", line 389, in load_module
File "tensorflow/__init__.py", line 24, in <module>
File "/tmp/pip-build-EuLWEf/pyinstaller/PyInstaller/loader/pyimod03_importers.py", line 389, in load_module
File "tensorflow/python/__init__.py", line 104, in <module>
File "/tmp/pip-build-EuLWEf/pyinstaller/PyInstaller/loader/pyimod03_importers.py", line 389, in load_module
File "tensorflow/python/platform/test.py", line 57, in <module>
File "/tmp/pip-build-EuLWEf/pyinstaller/PyInstaller/loader/pyimod03_importers.py", line 389, in load_module
File "mock/__init__.py", line 2, in <module>
File "/tmp/pip-build-EuLWEf/pyinstaller/PyInstaller/loader/pyimod03_importers.py", line 389, in load_module
File "mock/mock.py", line 71, in <module>
File "pbr/version.py", line 461, in semantic_version
File "pbr/version.py", line 447, in _get_version_from_pkg_resources
File "/tmp/pip-build-EuLWEf/pyinstaller/PyInstaller/loader/pyimod03_importers.py", line 389, in load_module
File "pbr/packaging.py", line 32, in <module>
File "/tmp/pip-build-EuLWEf/pyinstaller/PyInstaller/loader/pyimod03_importers.py", line 389, in load_module
File "setuptools/__init__.py", line 160, in <module>
File "setuptools/monkey.py", line 104, in patch_all
File "setuptools/monkey.py", line 156, in patch_for_msvc_specialized_compiler
File "importlib/__init__.py", line 37, in import_module
ImportError: No module named msvc
How can I resolve this error and run the file correctly?
This problem was solved by using the dev version of Pyinstaller. More details here: https://github.com/pyinstaller/pyinstaller/issues/2824
I added msvc to the hidden imports. I'm still battling imports, but seem to be past this one.
{
a = Analysis(['/Users/Ben/Documents/DeepMeerkat/DeepMeerkat/main.py'],
pathex=['/Users/ben/Documents/DeepMeerkat/DeepMeerkat/'],
binaries=[],
datas=[],
hiddenimports=['setuptools.msvc'],
hookspath=[],
runtime_hooks=[],
excludes=[ 'enchant', 'twisted'],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher)
}