I used the command pip install pyinstaller to installer PyInstaller for Python 3.7 on Windows 10, but the Command Prompt gave me the following errors:
ModuleNotFoundError: No module named 'pywintypes'
...
ModuleNotFoundError: No module named 'cffi'
...
During handling of the above exception, another exception occurred:
...
SyntaxError: invalid syntax
----------------------------------------`
Command "python setup.py egg_info" failed with error code 1 in C:\Users\MUHAMM~1\AppData\Local\Temp\pip-install-6_q2lzs2\pyinstaller\
I installed the midule cffi, then tried to install pywintypes but it was not found.
Any help? Thanks in advance.
I got that problem.
The solution was
python -m pip install pip==18.1
then just
python -m pip install -U pyinstaller
UPDATE as of 2019-07-09
The changelog for PyInstaller==3.5 does state that they now support Python 3.7 on Windows 10.
I updated my answer to account for several necro-bumps "it works now", "the second answer should be accepted" and "downvotes" disregarding the time at which the question was asked. The second answer was not the actual solution back then, it clearly fails to state that
pip3.7 install PyInstaller==3.5
is a solid fix since 2019-07-09. The question however was asked long before that date.
BEFORE 2019-07-09
Not a solution to your problem, but PyInstaller does not support Python 3.7.
Here's what worked for me:
downgrade pip to 18.1 by typing:
python -m pip install pip==18.1
After that just run :
python -m pip install -U pyinstaller
and it should finish it with no errors. Then you can upgrade pip
python -m pip install –upgrade pip
Pyinstaller for Python 3.7 version worked fine
Please use below installation for python 3.7
pip install pyinstaller==4.0 --no-build-isolation
You Should Downgrade the pip first:
python -m pip install pip==18.1
then try to install pyinstaller:
python -m pip install -U pyinstaller
since there are newer pip versions, you may notice an orange color warning at the end of installation:
You are using pip version 18.1, however version 21.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
Go ahead and install the newer version of pip.
Related
I was trying to install a package which required an older version of pip and (stupidly) thought it would be a good idea to try installing the oldest version of pip possible (1.0).
To clarify, it is not pip 1.0.1 (which most guides I found on the internet refer to), but pip 1.0
When I attempt to run 'python -m pip install --upgrade pip', I get the following error:
C:\mydirectory\venv\Scripts\python.exe: No module named pip.__main__; 'pip' is a package and cannot be directly executed
When I run 'pip --version', I get the following info:
pip 1.0 from c:\mydirectory\venv\lib\site-packages (python 3.7)
Is there any way I can upgrade pip from this point?
python -m pip install -U pip should work. That is how I do it.
Try this:
python3 -m pip install pip
I get an error when pip builds wheels for the cryptography package.
Error:
LINK : fatal error LNK1181: cannot open input file 'libssl.lib'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX86\\x86\\link.exe' failed with exit status 1181
----------------------------------------
ERROR: Failed building wheel for cryptography
Running setup.py clean for cryptography
Failed to build cryptography
ERROR: Could not build wheels for cryptography which use PEP 517 and cannot be installed directly
I have already installed OpenSSL and set the environment variables as suggested in this post yet the problem persists. My setup details:
System - Windows 10
Python - 3.8
Pip - 19.3.1
In my case (windows 10 + conda) updating pip fixed the problem:
python -m pip install --upgrade pip
Setting cryptography to version 2.8 in requirements.txt fixed the issue.
TLDR;
Try using cryptography==3.1.1
Details:
This happened on Python 3.9.0 on Windows 10 PC.
I had the following in requirements.txt
cryptography==2.8
I removed the version and kept only cryptography in requirements.txt file like below
cryptography
Saved the requirements.txt and then I ran
pip install -r requirements.txt
It installed successfully.
Then I freeze the requirements.txt by running the following command
pip freeze > requirements.txt
Then the requirements.txt got updated with cryptography==3.1.1
Had also this issue. If you're using alpine, make sure that all dependencies for cryptography are installed.
In my case the cargo package was missing and causing the issue.
sudo apk add gcc musl-dev python3-dev libffi-dev openssl-dev cargo
https://cryptography.io/en/latest/installation.html#building-cryptography-on-linux
Ran into this issue, and the solution is actually in the message when pip attempts to install openssl before cryptography:
generating cffi module 'build/temp.linux-x86_64-3.7/_openssl.c'
running build_rust
=============================DEBUG ASSISTANCE=============================
If you are seeing a compilation error please try the following steps to
successfully install cryptography:
1) Upgrade to the latest pip and try again. This will fix errors for most
users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip
2) Read https://cryptography.io/en/latest/installation.html for specific
instructions for your platform.
3) Check our frequently asked questions for more information:
https://cryptography.io/en/latest/faq.html
4) Ensure you have a recent Rust toolchain installed:
https://cryptography.io/en/latest/installation.html#rust
5) If you are experiencing issues with Rust for *this release only* you may
set the environment variable `CRYPTOGRAPHY_DONT_BUILD_RUST=1`.
=============================DEBUG ASSISTANCE=============================
Simply running the pip update command appeared to work for me:
pip install -U pip
Which updated pip from version 18.0 to version 21.0.1
I faced this issue on macOS Monterey (version 12.2.1) Apple M1 Pro. I followed Cryptography installation documentation and it helped me resolve the issue.
brew install openssl#1.1 rust
env CRYPTOGRAPHY_SUPPRESS_LINK_FLAGS=1 LDFLAGS="$(brew --prefix openssl#1.1)/lib/libssl.a $(brew --prefix openssl#1.1)/lib/libcrypto.a" CFLAGS="-I$(brew --prefix openssl#1.1)/include" pip3 install cryptography
You can use the lastest version with
python3 -m pip install --no-use-pep517 cryptography
worked for me with ubuntu:18.04 on arm32v7
(instead as suggested by the error message install the full rust compiler and build-essentials, or upgrading pip (what had no effect on ubuntu:18.04 on my armbian))
pip install --upgrade pip
Try to upgrade pip of your environment working fine for me.
I got this error trying to install Scrapy with Python 3.8.1 on Windows 10, but its solved installing the last version of pip (19.3.1 in my case) and all works using pip in this way:
python -m pip install scrapy --user
I have faced same issue and tried to install openssl with mentioned step but still was not able to proceed for windows 10. Later I upgraded pip to latest version and tried again and it worked without any issue.
I would recommend to upgrade pip to latest version and give a try before proceeding for installing openssl
I had the same issue. pip3 version was 19.* after upgrade it works
sudo -H pip3 install --upgrade pip
You can try to install cryptography==3.1.1 package instead of cryptography 35 version.
pip install cryptography==3.1.1
If still you are facing challenges in cryptography package integration.
You can resolve that by the following steps.
python -m pip install --upgrade pip
sudo pip install -U pip setuptools
I had this problem and i just installed rust and problem fixed for me
You can install end version of cryptography after installing rust programming languege(dont try pip install rust, its not python package)
https://www.rust-lang.org/tools/install
Just updating pip
python -m pip install --upgrade pip
I did not install the latest version of Scrapy, then it worked for me. Instead of installing version 2.6.3, I installed 2.6.2:
pip install Scrapy==2.6.2
I use PyCharm 2022.2.3 (Professional Edition) on Windows.
I have two versions of python installed on my computer (3.6 and 3.7). Just upgraded pip to the latest version (19.0.1) using the command python -m pip install --upgrade pip however i think it only upgraded the pip for python version 3.6. When attempting to install a package specifically for python version 3.7 with the following command pip3.7 install scipy i got the message saying You are using pip version 18.1, however version 19.0.1 is available. Clearly only the pip for version 3.6 was upgraded. I cannot figure out a command to upgrade 3.7 pip as well. I tried the following:
python -m pip3.7 install --upgrade pip
This did not work (Trying to use the logic of how packages are handled for different versions of python). Could not find a question that addressed this specific issue. Any help would be greatly appreciated.
Use the python 3.7 interpreter to run the command:
python3.7 -m pip install --upgrade pip
Or use the pip3.7 binary directly:
pip3.7 install --upgrade pip
export LD_LIBRARY_PATH=/usr/lib64
activate pip3
I ran into the same problem. If you have Microsoft Visual also installed the best command to use is
py -m pip install --upgrade pip --user
I used that command, and it worked like a charm.
For install matplotlib in windows 10 64 bit machine get error showing
python setup.py egg_info" failed with error code 1 in C:\Users\Animus\AppData\Local\Temp\pip-build-urqbuxb_\unroll\
please help
Forst of all make sure you have pip working. To install pip please follow the link Pip install and then update the setup
And try:
python -mpip install -U pip
python -mpip install -U matplotlib
and if does not work then use following
pip install --upgrade setuptools
I had the same problem. Newly installed windows, only python 3.7.0 installed. No security software installed.
Those upgrade command do not work at all.
After rollback to 3.6.5, they could be installed normally.
I use Python 3.5.2.
I installed imapclient with no problem pip install imapclient. However when I tried to install pyzmail, pip install pyzmail, I received error message below:
ImportError: No module named '_markerlib'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\J
\AppData\Local\Temp\pip-build-ntukh55u\distribute\
To those who find this thread and have switched to Python 3.6, this pyzmail fork enabling pip install on Python 3.6 worked very well for me :
pip install pyzmail36
I had the same problem, and resolved it using: easy_install pyzmail
I just had this issue and solved it this way: type pip install setuptools==20.1.1, then try pip install pyzmail again. I had the latest version of setuptools (version 34.something) and it seems this version gets buggy when installing pyzmail.
use pip install pyzmail36
This claims to be "a fork which is meant to be pip installable on python 3.6+".
I had the same issue when using Python 3.8.5 on Windows 10.
After successfully installing imapclient, I used this command, which worked fine:
pip install --user pyzmail36==1.0.4
if you have already solve the problems , I hope 'yes' , but it is very easy you need just to writte
pip install --user pyzmail36*
It will install properly the last version ! but take a look at your python version ---> python --version because sometimes it needs to be update .