I am using PyCharm with Python 3.0 and I want to import Image Module.
While installing the Image module from Project Interpreter, I got a message which says:
ValueError: zlib is required unless explicitly disabled using --disable-zlib, aborting.
Screenshot
There is no package named Zlib to install.
I tried to find several solution, but most of them are for Linux. for example, this solution: no module named zlib
How can I solve this issue in Windows and with PyCharm ?
easy_install Pillow
- this will install dependencies automatically
I had the same error when I wanted to install Mezzanine.
Solution was to install pillow by
- downloading the Windows package from https://pypi.python.org/pypi/Pillow/3.4.2, and
- installing with "pip install .
Please make sure that you download the correct pillow package for your Python version.
After that, I could install Mezzanine without error.
Related
I have version 3.8 of python and I need to install opencv package on pycharm so I tried this command pip3 install opencv-python (on terminal of pycharm).
I got WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Is there any solution to fix that prob ?
Thanks!
installing packages/libs on Pychram are very easy you just need to import the lib that you want and it will show you an install option and if it dose not show you it you can press on file on the upper left , go to setting then go to python interpreter there will be a plus sign and you can just search for the packages/libs and download it
After not being able to use pip getting an "invalid syntax" error when entering "python pip" in the CMD-Line of windows, I downloaded the latest python package from the website and installed it.
But same problem.
Even in the Python folder there is neither a pip.py nor a "get-pip.py". That's pretty weird.
What could be the reason?
While using pip install I am getting the following error:
Error while finding spec for 'pip__main__' <: No module named 'urllib.request'; 'urllib' is not a package>; 'pip' is a package and cannot be directly executed
Any advice on this one?
I thought maybe it was related to the requests module itself but I tried to download other modules and had the same problem.
I've just upgraded from Python 3.3 to v3.5.1 on Windows and hit the same error message. I understand it's not the same as your problem.
It seems that the instructions from the docs to use:
python -m pip install SomePackage
are wrong, at least for Windows because I get the error message quoted by the OP.
I forgot to add the Scripts directory to my path, the same as previous releases. When I add it the problem is fixed. My path now has (for a default install of Python 3.5):
PATH=<blah>;%USERPROFILE%\AppData\Local\Programs\Python\Python35;%USERPROFILE%\AppData\Local\Programs\Python\Python35\Scripts
The pip executable is located in Scripts, so pip commands can now be executed directly, the same as always:
pip install urllib
I have numpy and matplot installed and working properly with python 2.7, but when I use pip to install scipy, I get this error.
numpy.distutils.npy_pkg_config.PkgNotFound: Could not find file(s) ['/usr/local/lib/python2.7/site-packages/numpy/core/lib/npy-pkg-config/npymath.ini']
----------------------------------------
Command python setup.py egg_info failed with error code 1 in /var/folders/61/dpn0d5p51z19g5vypnmh3vfh0000gn/T/pip-build/scipy
There is no end to the amount of grief that you can run into when trying to install numpy, scipy, and matplotlib on Mac OS X. If you want to stay on the bleeding edge I would suggest downloading the git repositories and building each one.
If you don't need to be on the bleeding edge I would suggest, following the instructions on the SciPy web site:
http://www.scipy.org/Installing_SciPy/Mac_OS_X
Finally, there is the great work that Chris Fonnesbeck: At https://github.com/fonnesbeck/ScipySuperpack
The Fonnesbeck method has never failed for me.
I also was not able to install scipy using pip. However an option that has worked for me was using the .dmg package provided by scipy.org.
Important: you will have to update to the latest version of python in your Mac OS. That is, you can still use the Python 2.7, however it is necessary to update to the latest build which you can download at python.org.
I could suggest you to use some package manager for Mas OS X (for example macports). Using a kind of such system could avoid you from such things like manual resolving of dependencies, and so on.
I am trying to install psycopg2 under Windows (Windows 7, 64 bit). I am using Python 2.7.2 from Python(x,y) and PostgreSQL 9.2.1 .
My first try was using the windows port that is downloadable from http://www.stickpeople.com/projects/python/win-psycopg/ (psycopg2-2.4.5.win-amd64-py2.7-pg9.1.3-release.exe). I get a message then that
Python 2.7 required but was not found in the registry
In the next dialogue it does not allow me to choose any python installations. All other programs and installations find my python happily.
This being failed, I tried to use the source package directly from http://pypi.python.org/pypi/psycopg2 but after trying:
python setup.py install
I am now stuck with the error message:
error: Unable to find vcvarsall.bat
Does anybody have an idea how to solve this?
You're using a different Python distribution to the one the psycopg2 installer expects, so it cannot find the Python install location.
You can manually install psycopg2 from the binaries you downloaded by following the instructions on the psycopg2 download page for issues installing with Zope, which read:
It has been noted that the the installers for psycopg2 will not find
the zope installation of python, stop the installation, and not
installing psycopg2. A work around is to extract the files by renaming
the extension from *.exe to *.zip and using a zip extractor (such as
WinZip/PkZip/7z) to extract the psycopg2 folder and place it at
\lib\python. I do not use Zope, so I will not be able to
provide support or instructions on how to use it. Let me know if it
does not work, though.
The same will apply to the Python(x,y) distribution that you are using. Unzip the psycopg2 installer .exe using 7-zip, then copy the psycopg2 folder and 'psycopg2-2.5.2-py2.7.egg-info' file (so 'psycopg2' will apear on 'pip freeze') into your Python lib\site-packages directory. See installing Python modules.
You should then be able to import psycopg2.
Choose the appropriate version from this page:
http://www.stickpeople.com/projects/python/win-psycopg/
Right click and select copy link address
Back at home, use easy_install <<Paste URL Here>>
Freeze your new requirements: pip freeze > requirements.txt