When I use pyinstaller to package python projects in the windows environment, the following problems occur:
443 INFO: PyInstaller: 4.10
444 INFO: Python: 3.6.2
444 INFO: Platform: Windows-10-10.0.19041-SP0
446 INFO: wrote E:Projectspipeline.spec
453 INFO: UPX is not available.
454 INFO: Extending PYTHONPATH with paths
[‘E:Projectsmaster0601’]
File «», line 2
import
^
SyntaxError: invalid syntax
1026 INFO: checking Analysis
1026 INFO: Building Analysis because Analysis-00.toc is non existent
1031 INFO: Initializing module dependency graph…
1042 INFO: Caching module graph hooks…
1061 INFO: Analyzing base_library.zip …
File «», line 2
import
^
SyntaxError: invalid syntax
File «», line 2
import
^
SyntaxError: invalid syntax
4529 INFO: Caching module dependency graph…
4625 INFO: running Analysis Analysis-00.toc
4656 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable
required by C:UsersASUS.virtualenvsmaster0601-tYJbxQyDScriptspython.exe
4905 INFO: Analyzing E:ProjectsDinovamaster0601airway_pipeline.py
6397 INFO: Processing pre-find module path hook distutils from ‘C:UsersASUS.virtualenvsmaster0601-tYJbxQyDlibsite-packagespyinstaller-4.10-py3.6.eggPyInstallerhookspre_find_module_pathhook-distutils.py’.
6399 INFO: distutils: retargeting to non-venv dir ‘c:usersasusappdatalocalprogramspythonpython36lib’
7509 INFO: Processing pre-find module path hook site from ‘C:UsersASUS.virtualenvsmaster0601-tYJbxQyDlibsite-packagespyinstaller-4.10-py3.6.eggPyInstallerhookspre_find_module_pathhook-site.py’.
7511 INFO: site: retargeting to fake-dir ‘C:UsersASUS.virtualenvsmaster0601-tYJbxQyDlibsite-packagespyinstaller-4.10-py3.6.eggPyInstallerfake-modules’
17171 INFO: Processing pre-safe import module hook six.moves from ‘C:UsersASUS.virtualenvsmaster0601-tYJbxQyDlibsite-packagespyinstaller-4.10-py3.6.eggPyInstallerhookspre_safe_import_modulehook-six.moves.py’.
File «», line 2
import
^
SyntaxError: invalid syntax
pre-safe-import-module hook failed, needs fixing.
I have searched a lot of information and have not found an effective solution. How can I solve this?
How did you install PyInstaller?
How did you install PyInstaller?
I downloaded the installation package and installed pyinstaller through the official website. I tried to use pip install pyinstaller but all reported errors as follows:

What is the output of pip freeze in your environment?
Can you try creating a new virtual environment; activate it; upgrade pip, wheel, and setuptools (python -m pip install -U pip wheel setuptools); and then try to install pyinstaller via pip install pyinstaller?
What is the output of
pip freezein your environment?
airway==0.1.1
altgraph==0.17.2
Brotli==1.0.9
cffi==1.15.0
colorama==0.4.4
cssselect2==0.4.1
cycler==0.11.0
decorator==4.4.2
fonttools==4.27.1
future==0.18.2
html5lib==1.1
igraph==0.9.9
imageio==2.15.0
importlib-metadata==4.8.3
importlib-resources==5.4.0
kiwisolver==1.3.1
Markdown==3.3.6
matplotlib==3.3.4
networkx==2.5.1
numpy==1.19.5
pandas==1.1.5
pefile==2021.9.3
Pillow==8.4.0
pycparser==2.21
pydicom==2.2.2
pydyf==0.1.2
pyinstaller==4.10
pyinstaller-hooks-contrib==2022.2
pyparsing==3.0.7
pyphen==0.11.0
python-dateutil==2.8.2
python-igraph==0.9.9
pytz==2021.3
PyWavelets==1.1.1
pywin32==303
pywin32-ctypes==0.2.0
PyYAML==6.0
scikit-image==0.17.2
scipy==1.5.4
six==1.16.0
texttable==1.6.4
tifffile==2020.9.3
tinycss2==1.1.1
tqdm==4.63.0
typing_extensions==4.1.1
weasyprint==54.2
webencodings==0.5.1
zipp==3.6.0
zopfli==0.1.9
pyinstaller==4.10 is installed by me through the installation package
Can you try creating a new virtual environment; activate it; upgrade pip, wheel, and setuptools (
python -m pip install -U pip wheel setuptools); and then try to install pyinstaller viapip install pyinstaller?
I removed the original virtual environment, re-created a virtual environment, and after activating it, I used python -m pip install -U pip wheel setuptools to update, and then used pip install pyinstaller to install pyinstaller, but the same error still occurs, what’s going on?

Hmm, looks like pefile is somehow blocking the installation of recent pyinstaller versions. So pip tries to install an older version, which is not compatible with your python version (e.g., pyinstaller 2.0, which results in SyntaxError seen at the top of your screenshot).
Hmm, looks like
pefileis somehow blocking the installation of recent pyinstaller versions. So pip tries to install an older version, which is not compatible with your python version (e.g., pyinstaller 2.0, which results in SyntaxError seen at the top of your screenshot).
Hmm, Has this happened before? I’ve looked online for this problem, but it didn’t solve it. what should I do?
I haven’t seen this happen before, so no idea, really.
What happens if you start with clean virtual environment again, upgrade pip/wheel/setuptools, then install pefile (pip install pefile), and then try to pin pyinstaller version (pip install pyinstaller==4.10)? Do you see any errors reported by pip in previous steps?
I haven’t seen this happen before, so no idea, really.
What happens if you start with clean virtual environment again, upgrade pip/wheel/setuptools, then install pefile (
pip install pefile), and then try to pin pyinstaller version (pip install pyinstaller==4.10)? Do you see any errors reported by pip in previous steps?
I cleared the virtual environment, updated pip, etc., and then installed pefile, and it started reporting errors as follows:

What are you using to create virtual environment? The venv module, or something else?
What are you using to create virtual environment? The
venvmodule, or something else?
I am using pipenv of windows system
Can you try a regular venv instead?
Can you try a regular
venvinstead?
I tried to use the virtual environment created by conda, but an error was also reported during the packaging process using pyinstaller, and there was no exe file in the generated dist folder
Is this a conda python?
No, it’s not conda python, my first attempt was to use a conda virtual environment and it failed, then I used pipenv to create a virtual environment and I got those errors above
What if you try to install the latest version of pefile (pip install pefile==2021.9.3) — what is the error in that case? Because again, the syntax errors in your screenshot are from old versions that are probably incompatible with your python)…
What if you try to install the latest version of
pefile(pip install pefile==2021.9.3) — what is the error in that case? Because again, the syntax errors in your screenshot are from old versions that are probably incompatible with your python)…
When I install the latest version of the prefile, I get the following error:

Have you install/upgraded pip, wheel and setuptools in your environment?
What is the output of where pip and where python, and of pip --version and python -c "import setuptools; print(setuptools.__version__)"?
Have you install/upgraded
pip,wheelandsetuptoolsin your environment?
Yes,I have,I used python -m pip install -U pip wheel setuptools to update
What is the output of
where pipandwhere python, and ofpip --versionandpython -c "import setuptools; print(setuptools.__version__)"?
The output is as follows:


Hmm, this all looks fine.
What if you download the pefile-2021.9.3.tar.gz manually, unpack it, move into unpacked directory, and try to either:
- try to install via
pip install . - or try to build wheel via
python setup.py bdist_wheel
Do these two commands work, or do you also get the syntax error?
- try to install via
pip install .
when I try to use the command, the error is as follows:

- or try to build wheel via
python setup.py bdist_wheel
when I try to use the command, no errors appear

- try to install via
pip install .when I try to use the command, the error is as follows:
Not pip install setup.py — use pip install .
But if the second command succeeded, you should have a .whl file in the dist directory. Try installing it via pip install distpefile-2021.9.3-py3-none-any.whl.
Not
pip install setup.py— usepip install .
I use pip install ., I also get the syntax error

But if the second command succeeded, you should have a .whl file in the dist directory. Try installing it via
pip install distpefile-2021.9.3-py3-none-any.whl.
I use pip install distpefile-2021.9.3-py3-none-any.whl ,the error as follows:

What if you try to manually download the future-0.18.2.tar.gz, unpack it and build the wheel, then try to install the built future wheel?
What if you try to manually download the
future-0.18.2.tar.gz, unpack it and build the wheel, then try to install the builtfuturewheel?
Yes, I can successfully install future by this method

Ok, what about pefile? Does it install now that future has been installed?
Ok, what about
pefile? Does it install now thatfuturehas been installed?
Yes, the prefile is already installed, haha

Does pip install pyinstaller work now?
Does
pip install pyinstallerwork now?
Yes, It works now, thank you very much

Does
pip install pyinstallerwork now?
When I successfully installed pyinstaller and used pyinstaller to package my project, this problem «`
SyntaxError: invalid syntax
pre-safe-import-module hook failed, needs fixing.

This has nothing to do with pre-safe-import-module hook failed, needs fixing., there’s other syntax errors before that, too.
There’s something in you environment that triggers that, and I have absolutely no idea what it is. But it’s definitely not related to PyInstaller, as the exactly same error was popping up during the above installation attempts for other packages.
I’m out of ideas — perhaps you should try reinstalling your python, or upgrading pipenv.
Those syntax errors are presumably happening inside exec_statement() calls. That’s the only place I know that executes raw strings without setting the source filename parameter and that would not always abort the build. And I imagine that the cause will by some invalid Python file kicking around in sys.path with the same name as some standard library package. Can you run it using:
python -vvvv PyInstaller -Dw airway_pipeline.py >logs.txt 2>&1
That’ll create a file called logs.txt — can you upload that here? Those logs contain which files Python is trying to import.
Incidentally, PyInstaller 4.10 doesn’t support Python 3.6 so this particular setup is doomed anyway.
Incidentally, PyInstaller 4.10 doesn’t support Python 3.6 so this particular setup is doomed anyway.
Was #6475 actually backported to v4? There still seem to be references to 3.6 support in the code (e.g., here or here).
python -vvvv PyInstaller -Dw airway_pipeline.py >logs.txt 2>&1
I use this command to generate this log text,the logs.txt says python: can't open file 'PyInstaller': [Errno 2] No such file or directory, but I have already installed pyinstaller, why can’t I find it?
logs.txt
That command should have been:
python -vvvv -m PyInstaller -Dw airway_pipeline.py >logs.txt 2>&1
(the original is missing the -m before PyInstaller).
python -vvvv -m PyInstaller -Dw airway_pipeline.py >logs.txt 2>&1
I try the command, the logs.txt as follows:
logs.txt
What about:
python -vvvv C:UsersASUS.virtualenvsAirway-master0601-tYJbxQyDlibsite-packagesPyInstallerhookspre_safe_import_modulehook-six.moves.py >logs.txt 2>&1
What about:
python -vvvv C:UsersASUS.virtualenvsAirway-master0601-tYJbxQyDlibsite-packagesPyInstallerhookspre_safe_import_modulehook-six.moves.py >logs.txt 2>&1
I use the command, the logs.txt as follows:
logs.txt
Hmm, that last one does indeed show it going ballistic but for a different reason. It appears to be trying to import C:\Users\ASUS\. I dread to think how it got into that mess.
# trying E:ProjectsDinovaAirway-master0601C:UsersASUS.cp36-win_amd64.pyd
# trying E:ProjectsDinovaAirway-master0601C:UsersASUS.pyd
# trying E:ProjectsDinovaAirway-master0601C:UsersASUS.py
# trying E:ProjectsDinovaAirway-master0601C:UsersASUS.pyw
# trying E:ProjectsDinovaAirway-master0601C:UsersASUS.pyc
# trying c:usersasusappdatalocalprogramspythonpython36DLLsC:UsersASUS.cp36-win_amd64.pyd
# trying c:usersasusappdatalocalprogramspythonpython36DLLsC:UsersASUS.pyd
# trying c:usersasusappdatalocalprogramspythonpython36DLLsC:UsersASUS.py
# trying c:usersasusappdatalocalprogramspythonpython36DLLsC:UsersASUS.pyw
# trying c:usersasusappdatalocalprogramspythonpython36DLLsC:UsersASUS.pyc
# trying c:usersasusappdatalocalprogramspythonpython36libC:UsersASUS.cp36-win_amd64.pyd
# trying c:usersasusappdatalocalprogramspythonpython36libC:UsersASUS.pyd
# trying c:usersasusappdatalocalprogramspythonpython36libC:UsersASUS.py
# trying c:usersasusappdatalocalprogramspythonpython36libC:UsersASUS.pyw
# trying c:usersasusappdatalocalprogramspythonpython36libC:UsersASUS.pyc
# trying c:usersasusappdatalocalprogramspythonpython36C:UsersASUS.cp36-win_amd64.pyd
# trying c:usersasusappdatalocalprogramspythonpython36C:UsersASUS.pyd
# trying c:usersasusappdatalocalprogramspythonpython36C:UsersASUS.py
# trying c:usersasusappdatalocalprogramspythonpython36C:UsersASUS.pyw
# trying c:usersasusappdatalocalprogramspythonpython36C:UsersASUS.pyc
# trying C:UsersASUS.virtualenvsAirway-master0601-tYJbxQyDC:UsersASUS.cp36-win_amd64.pyd
# trying C:UsersASUS.virtualenvsAirway-master0601-tYJbxQyDC:UsersASUS.pyd
# trying C:UsersASUS.virtualenvsAirway-master0601-tYJbxQyDC:UsersASUS.py
# trying C:UsersASUS.virtualenvsAirway-master0601-tYJbxQyDC:UsersASUS.pyw
# trying C:UsersASUS.virtualenvsAirway-master0601-tYJbxQyDC:UsersASUS.pyc
# trying C:UsersASUS.virtualenvsAirway-master0601-tYJbxQyDlibsite-packagesC:UsersASUS.cp36-win_amd64.pyd
# trying C:UsersASUS.virtualenvsAirway-master0601-tYJbxQyDlibsite-packagesC:UsersASUS.pyd
# trying C:UsersASUS.virtualenvsAirway-master0601-tYJbxQyDlibsite-packagesC:UsersASUS.py
# trying C:UsersASUS.virtualenvsAirway-master0601-tYJbxQyDlibsite-packagesC:UsersASUS.pyw
# trying C:UsersASUS.virtualenvsAirway-master0601-tYJbxQyDlibsite-packagesC:UsersASUS.pyc
# trying E:ProjectsDinovaAirway-master0601C:UsersASUS.cp36-win_amd64.pyd
# trying E:ProjectsDinovaAirway-master0601C:UsersASUS.pyd
# trying E:ProjectsDinovaAirway-master0601C:UsersASUS.py
# trying E:ProjectsDinovaAirway-master0601C:UsersASUS.pyw
# trying E:ProjectsDinovaAirway-master0601C:UsersASUS.pyc
# trying c:usersasusappdatalocalprogramspythonpython36DLLsC:UsersASUS.cp36-win_amd64.pyd
# trying c:usersasusappdatalocalprogramspythonpython36DLLsC:UsersASUS.pyd
# trying c:usersasusappdatalocalprogramspythonpython36DLLsC:UsersASUS.py
# trying c:usersasusappdatalocalprogramspythonpython36DLLsC:UsersASUS.pyw
# trying c:usersasusappdatalocalprogramspythonpython36DLLsC:UsersASUS.pyc
# trying c:usersasusappdatalocalprogramspythonpython36libC:UsersASUS.cp36-win_amd64.pyd
# trying c:usersasusappdatalocalprogramspythonpython36libC:UsersASUS.pyd
# trying c:usersasusappdatalocalprogramspythonpython36libC:UsersASUS.py
# trying c:usersasusappdatalocalprogramspythonpython36libC:UsersASUS.pyw
# trying c:usersasusappdatalocalprogramspythonpython36libC:UsersASUS.pyc
# trying c:usersasusappdatalocalprogramspythonpython36C:UsersASUS.cp36-win_amd64.pyd
# trying c:usersasusappdatalocalprogramspythonpython36C:UsersASUS.pyd
# trying c:usersasusappdatalocalprogramspythonpython36C:UsersASUS.py
# trying c:usersasusappdatalocalprogramspythonpython36C:UsersASUS.pyw
# trying c:usersasusappdatalocalprogramspythonpython36C:UsersASUS.pyc
# trying C:UsersASUS.virtualenvsAirway-master0601-tYJbxQyDC:UsersASUS.cp36-win_amd64.pyd
# trying C:UsersASUS.virtualenvsAirway-master0601-tYJbxQyDC:UsersASUS.pyd
# trying C:UsersASUS.virtualenvsAirway-master0601-tYJbxQyDC:UsersASUS.py
# trying C:UsersASUS.virtualenvsAirway-master0601-tYJbxQyDC:UsersASUS.pyw
# trying C:UsersASUS.virtualenvsAirway-master0601-tYJbxQyDC:UsersASUS.pyc
# trying C:UsersASUS.virtualenvsAirway-master0601-tYJbxQyDlibsite-packagesC:UsersASUS.cp36-win_amd64.pyd
# trying C:UsersASUS.virtualenvsAirway-master0601-tYJbxQyDlibsite-packagesC:UsersASUS.pyd
# trying C:UsersASUS.virtualenvsAirway-master0601-tYJbxQyDlibsite-packagesC:UsersASUS.py
# trying C:UsersASUS.virtualenvsAirway-master0601-tYJbxQyDlibsite-packagesC:UsersASUS.pyw
# trying C:UsersASUS.virtualenvsAirway-master0601-tYJbxQyDlibsite-packagesC:UsersASUS.pyc
C:UsersASUS.virtualenvsAirway-master0601-tYJbxQyDScriptspython.exe: Error while finding module specification for 'C:\Users\ASUS\.virtualenvs\Airway-master0601-tYJbxQyD\lib\site-packages\PyInstaller\hooks\pre_safe_import_module\hook-six.moves.py' (ModuleNotFoundError: No module named 'C:\Users\ASUS\')
I reckon reinstalling Python is the most sensible thing to do after all.
I reckon reinstalling Python is the most sensible thing to do after all.
So which version of python do I reinstall?
Just the latest will do. Unless you want to support Windows 7, in which case use 3.8.
Just the latest will do. Unless you want to support Windows 7, in which case use 3.8.
Ok, then I will try to reinstall python
Did you get it working? I’d like to avoid open but stale issue threads.
github-actions
bot
locked as resolved and limited conversation to collaborators
Nov 16, 2022
We will learn, with this explanation, why we get an invalid syntax error when we try to install Python packages. We will also learn how to fix this error in Python.
Use the pip Command Without Getting an Invalid Syntax Error in Python
Many errors exist in Python, but one of the most common that beginners face is SyntaxError: invalid syntax when they try to install Python packages. Let’s get started with a real example to show you the error.

When we tried to install the Python package inside the Python shell, we got the Syntax Error.
Sometimes, beginners do not understand what they did wrong. You may be a little confused about working with the Python shell if you are a beginner.
To better understand, if we type exit inside the Python shell, it will not work. We often use the exit command in the command prompt, but it is not working this time because the same command will not work in the Python shell.
Looking at the very top corner, you can see the Microsoft command prompt that ensures you are working in the command prompt. As a beginner, it sometimes becomes confusing; however, if you type exit, you will get an error Use exit() or Ctrl-Z plus Return to exit.

We get this error because we are running a terminal command to exit from this Python shell, which will not terminate the Python shell. The exit command will terminate our command prompt window when we run inside the command prompt area.
The command prompt area lies where we run Python to start the Python shell, but inside it, the area is a shell. How do we know we are in the Python shell or the command prompt? Well, we can verify it easily.
When we run the Python shell using the python command, we are in the Python shell, and after running the Python shell, three greater than signs will show in the left corner. These three signs signal that the user is working in a different shell, the Python shell in this case.
In the Python shell, you will need to enter different commands that should be related to Python, where this pip command fails. You would think that this particular pip installation command is related to Python, so it must work inside a Python shell.
Another tip for beginners to recognize they are inside the command prompt is if you see a drive name and a path name of your folder where your cursor blinks, then you are working in your command prompt.
If we run the pip command from our command prompt shell, we will not get an error, and now we can see Requirement already satisfied, which means the Flask is already installed in our system.

The pip package installer must be run from the command line. If you try to install a package from the Python interpreter or in a Python program, you’ll encounter the SyntaxError: invalid syntax error.
In this guide, we’re going to discuss the cause of the pip install invalid syntax error and what it means. We’ll walk through an example of this error so you can learn how to fix it in your code.
Find Your Bootcamp Match
- Career Karma matches you with top tech bootcamps
- Access exclusive scholarships and prep courses
Select your interest
First name
Last name
Phone number
By continuing you agree to our Terms of Service and Privacy Policy, and you consent to receive offers and opportunities from Career Karma by telephone, text message, and email.
pip install invalid syntax
Python pip is a package installer. The pip tool lets you download and install packages from the Python Package Index, where thousands of libraries are available with which you can work in your code.
The pip tool runs as its own command line interface. pip is separate from your installation of Python. This is because pip is an installer rather than a tool that executes code.
If these tools were bundled together, it would be more confusing for developers who want to install packages because similar syntax used to start a Python program would also apply to installing modules.
This behavior is common across programming environments. Node.js relies on npm to install packages. To run a program using Node.js, you need to use the node command.
An Example Scenario
We’re going to set up the Beautiful Soup 4 library (bs4) in a development environment. This library lets you scrape a web page and retrieve particular pieces of data.
To start, let’s open up a Python 3 shell. In this shell, we’ll do all the work for our project:
python3
An interactive shell is opened in which we can write our Python code:
Python 3.8.5 (v3.8.5:580fbb018f, Jul 20 2020, 12:11:27) [Clang 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>>
Next, let’s import the bs4 library into our code. We must import any external libraries that we want to use before we can reference them in a program or the shell. Here’s the command we’ll use to import the bs4package:
>>> from bs4 import BeautifulSoup Traceback (most recent call last): File "<stdin>", line 1, in <module> ModuleNotFoundError: No module named 'bs4'
Our code returns a ModuleNotFoundError when we try to import our package. This means that we can’t continue writing our program. Python cannot locate the package modules that we need to write our program. Let’s fix this error by installing the bs4 library:
>>> pip install bs4
This command results in another error:
File "<stdin>", line 1
pip3 install bs4
^
SyntaxError: invalid syntax
It appears as if we cannot install bs4 using the pip3 command in the Python shell. pip3 is the package installer for Python 3 packages.
The Solution
We’ve tried to install the bs4 package from the Python interpreter.
You can tell because we’ve opened Python 3 using the python3 command and then we’ve executed the pip3 install command.
Python returns a pip install invalid syntax error because pip is not a keyword in Python. pip is a command line tool that must be run from a command line shell.
To fix this error, we must first exit our Python shell:
>>> exit()
The exit() command tells Python to close the interpreter that is open. Next, we can install bs4 from the command prompt:
pip3 install bs4
This command will install the pip library onto our system. Once this command has executed, we can open up a new Python shell:
python3
Our new shell should have access to the bs4 library. We can test this by importing bs4 into our code:
>>> from bs4 import BeautifulSoup >>>
No error is raised. This means that the import was successful. We can now use bs4 in our program.
Conclusion
The pip install invalid syntax error is raised when you try to install a Python package from the interpreter. To fix this error, exit your interpreter and run the pip install command from a command line shell.

«Career Karma entered my life when I needed it most and quickly helped me match with a bootcamp. Two months after graduating, I found my dream job that aligned with my values and goals in life!»
Venus, Software Engineer at Rockbot
Now you have the expertise you need to solve this error like a professional coder!
C:Pyhon>pip install pyinstaller
Collecting pyinstaller
Using cached https://files.pythonhosted.org/packages/e2/c9/0b44b2ea87ba36395483a672fddd07e6a9cb2b8d3c4a28d7ae76c7e7e1e5/PyInstaller-3.5.tar.gz
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... error
ERROR: Command errored out with exit status 1:
command: 'c:usersалексейappdatalocalprogramspythonpython37-32python.exe' 'c:usersалексейappdatalocalprogramspythonpython37-32libsite-packagespip_vendorpep517_in_process.py' prepare_metadata_for_build_wheel 'C:UsersCD86~1AppDataLocalTemptmpwoe542ci'
cwd: C:UsersCD86~1AppDataLocalTemppip-install-ehv7615ypyinstaller
Complete output (36 lines):
running dist_info
creating C:UsersCD86~1AppDataLocalTemppip-install-ehv7615ypyinstallerpip-wheel-metadataPyInstaller.egg-info
writing C:UsersCD86~1AppDataLocalTemppip-install-ehv7615ypyinstallerpip-wheel-metadataPyInstaller.egg-infoPKG-INFO
writing dependency_links to C:UsersCD86~1AppDataLocalTemppip-install-ehv7615ypyinstallerpip-wheel-metadataPyInstaller.egg-infodependency_links.txt
writing entry points to C:UsersCD86~1AppDataLocalTemppip-install-ehv7615ypyinstallerpip-wheel-metadataPyInstaller.egg-infoentry_points.txt
writing requirements to C:UsersCD86~1AppDataLocalTemppip-install-ehv7615ypyinstallerpip-wheel-metadataPyInstaller.egg-inforequires.txt
writing top-level names to C:UsersCD86~1AppDataLocalTemppip-install-ehv7615ypyinstallerpip-wheel-metadataPyInstaller.egg-infotop_level.txt
writing manifest file 'C:UsersCD86~1AppDataLocalTemppip-install-ehv7615ypyinstallerpip-wheel-metadataPyInstaller.egg-infoSOURCES.txt'
reading manifest file 'C:UsersCD86~1AppDataLocalTemppip-install-ehv7615ypyinstallerpip-wheel-metadataPyInstaller.egg-infoSOURCES.txt'
reading manifest template 'MANIFEST.in'
Error in sitecustomize; set PYTHONVERBOSE for traceback:
SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xe0 in position 0: invalid continuation byte (sitecustomize.py, line 7)
no previously-included directories found matching 'bootloaderbuild'
no previously-included directories found matching 'bootloader.waf-*'
no previously-included directories found matching 'bootloader.waf3-*'
no previously-included directories found matching 'bootloaderwaf-*'
no previously-included directories found matching 'bootloaderwaf3-*'
no previously-included directories found matching 'bootloader_sdks'
no previously-included directories found matching 'bootloader.vagrant'
warning: no previously-included files found matching 'bootloader.lock-waf*'
no previously-included directories found matching 'docsource'
no previously-included directories found matching 'doc_build'
warning: no previously-included files matching '*.tmp' found under directory 'doc'
warning: no files found matching 'news_template.rst'
no previously-included directories found matching 'news'
no previously-included directories found matching 'old'
no previously-included directories found matching 'scripts'
no previously-included directories found matching 'testsscripts'
no previously-included directories found matching '.github'
warning: no previously-included files found matching '.*'
warning: no previously-included files found matching '*.yml'
warning: no previously-included files found matching '*~'
warning: no previously-included files found matching '.directory'
writing manifest file 'C:UsersCD86~1AppDataLocalTemppip-install-ehv7615ypyinstallerpip-wheel-metadataPyInstaller.egg-infoSOURCES.txt'
creating 'C:UsersCD86~1AppDataLocalTemppip-install-ehv7615ypyinstallerpip-wheel-metadataPyInstaller.dist-info'
error: invalid command 'bdist_wheel'
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:usersалексейappdatalocalprogramspythonpython37-32python.exe' 'c:usersалексейappdatalocalprogramspythonpython37-32libsite-packagespip_vendorpep517_in_process.py' prepare_metadata_for_build_wheel 'C:UsersCD86~1AppDataLocalTemptmpwoe542ci' Check the logs for full command output.
Заранее спасибо
-
Вопрос заданболее трёх лет назад
-
3540 просмотров
Через переменные окружения вынеси пользовательский «TEMP» и «TMP» куда-нибудь в «C:TEMP».

«алексей», вот о чем вы думаете, когда забивание имя пользователя кириллицей?
Вопрос закрыт для ответов и комментариев
Потому что уже есть похожий вопрос.
-
Показать ещё
Загружается…
29 янв. 2023, в 03:07
300000 руб./за проект
29 янв. 2023, в 02:16
700000 руб./за проект
29 янв. 2023, в 01:54
5000 руб./за проект
Минуточку внимания
I tried this with the latest development version as well. «pip install pyinstaller» fails with the following error:
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "c:program filespython37libsite-packageswin32ctype
import cffi
ModuleNotFoundError: No module named 'cffi'
During handling of the above exception, another exception occurred
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:Users...~1AppDataLocalTemppip-req-build-1kx
from PyInstaller import __version__ as version, HOMEPATH,
File "C:Users...~1AppDataLocalTemppip-req-build-1kx
from . import compat
File "C:Users...~1AppDataLocalTemppip-req-build-1kx
from win32ctypes.pywin32 import pywintypes # noqa: F401
File "c:program filespython37libsite-packageswin32ctype
from win32ctypes.pywin32 import win32api
File "c:program filespython37libsite-packageswin32ctype
from win32ctypes.core import _common, _kernel32, _backend
File "c:program filespython37libsite-packageswin32ctype
from .ctypes import _advapi32, _common, _kernel32
File "c:program filespython37libsite-packageswin32ctype
^
SyntaxError: invalid syntax
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:...
When I installed cffi, I tried reinstalling pyinstaller and again got the same error as after Traceback above.