I'm trying to install smartapi Python library
pip install smartapi
But it's throw error.....
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> PyCrypto
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
error image:
My Python version is 3.10.2 and my pip version is 22.0.3
PyCrypto is no longer supported. See https://stackoverflow.com/a/69516560/7976758 and https://stackoverflow.com/a/58077358/7976758 .
SmartAPI requires Python 2 (see the bottom of the left column). Try Python 2.7. Or find out a different package.
Related
I am trying to install pycaret on anaconda but I keep getting this error.
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> numpy
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.
Can someone please help me with that?
I tried using multiple prompts:
conda install -c conda-forge pycaret
pip install pycaret
I tried to install numpy seperately and got was able to do that sucessfuly but I got this message:
Collecting numpy
Using cached numpy-1.24.1-cp39-cp39-macosx_10_9_x86_64.whl (19.8 MB)
Installing collected packages: numpy
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
smop 0.41b0 requires networkx, which is not installed.
smop 0.41b0 requires ply, which is not installed.
smop 0.41b0 requires pytest, which is not installed.
smop 0.41b0 requires scipy, which is not installed.
Successfully installed numpy-1.24.1
and so I installed all these packages and reinstalled numpy again. Afterwards, I tried to install pycaret again but the same error appeared. Keeping in mind that I have a mac laptop.
I am relatively new to the world of coding and am mostly self taught. Currently I am working on a project via a repository from GitHub. One of the steps in working with the code is to install python dependencies via a requirements.txt
I am currently running into errors with pillow. I am working in windows, and currently have python 3.9.7 and conda 4.13.0. When I run the python -m pip install --upgrade -r requirements.txt i get errors as follows:
1) Building wheels for collected packages: pillow
Building wheel for pillow (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [189 lines of output]
C:\Users\kj\AppData\Local\Temp\pip-install-hsdc08bl\pillow_07ce73d2c2484297acb81cb082ed4b48\setup.py:29: RuntimeWarning: Pillow does not yet support Python 3.9 and does not yet provide prebuilt Windows binaries. We do not recommend building from source on Windows.
2) During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\kj\AppData\Local\Temp\pip-install-hsdc08bl\pillow_07ce73d2c2484297acb81cb082ed4b48\setup.py", line 888, in <module>
raise RequiredDependencyException(msg)
__main__.RequiredDependencyException:
The headers or library files could not be found for zlib,
a required dependency when compiling Pillow from source.
Please see the install instructions at:
https://pillow.readthedocs.io/en/latest/installation.html
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pillow
3) Running setup.py clean for pillow
Failed to build pillow
Installing collected packages: pillow, h5py, pandas, matplotlib, sklearn, scikit-image
Attempting uninstall: pillow
Found existing installation: Pillow 9.1.1
Uninstalling Pillow-9.1.1:
Successfully uninstalled Pillow-9.1.1
Running setup.py install for pillow ... error
error: subprocess-exited-with-error
× Running setup.py install for pillow did not run successfully.
│ exit code: 1
╰─> [193 lines of output]
C:\Users\kj\AppData\Local\Temp\pip-install-hsdc08bl\pillow_07ce73d2c2484297acb81cb082ed4b48\setup.py:29: RuntimeWarning: Pillow does not yet support Python 3.9 and does not yet provide prebuilt Windows binaries. We do not recommend building from source on Windows.
4) The headers or library files could not be found for zlib,
a required dependency when compiling Pillow from source.
Please see the install instructions at:
https://pillow.readthedocs.io/en/latest/installation.html
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
WARNING: No metadata found in c:\programdata\anaconda3\lib\site-packages
Rolling back uninstall of pillow
Moving to c:\programdata\anaconda3\lib\site-packages\pil\
from C:\ProgramData\Anaconda3\Lib\site-packages\~il
Moving to c:\programdata\anaconda3\lib\site-packages\pillow-9.1.1.dist-info\
from C:\ProgramData\Anaconda3\Lib\site-packages\~illow-9.1.1.dist-info
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> pillow
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
These are all the errors I get when I run the install of requirements.txt. I have done some research on my own before looking for help as there are similar questions I have come across. One issue is that pillow does not yet support python 3.9. However, on pillows readthedoc it claims that python 3.9 is supported by pillow >=9.0, and I have pillow 9.1.1 installed. Another issue I see is the headers or library files could not be found for zlib, yet I have used conda install -c anaconda zlib.
To reiterate, I am relatively still a beginner with code. I would appreciate any friendly advice with my current issues.
Thank you
When installing this library, pip tried to find a pre-compiled binary (bdist_wheel) but couldn't find one that matches your python version and OS. So it tried to build it from source, but you don't have zlib installed on your machine. zlib is another program that is used in the python build process. You can install it for windows from here, or I think it is bundled with Python if you install Python using the "Full Installer" as described here: https://docs.python.org/3/using/windows.html
I'm trying to install the package spectral-cube from the astropy project using pip (22.0.4). I get a long error which ends with this:
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for casa-formats-io.
Failed to build casa-formats-io.
ERROR: Could not build wheels for casa-formats-io, which is required to install pyproject.toml-based projects
Even after downloading casa-formats-io from their github I still get this error.
I've also tried installing this using conda, but the error is the same.
I'm using MacOS 12.3. But I had the problem with older versions.
I'm kind of confused as to what I can do.
Thanks for the help!
I was able to fix my own problem. The error appeared because the package I was trying to download wasn't available/compatible with the newest python version (3.10). So, I simply uninstalled Python and downloaded an older version (3.8).
Thanks anyways :)
So I'm following along "Automate the boring stuff" by Al Sweigart. And he uses pyzmail in the book. Naturally I'm going to want to use it too in order to follow along with the book. I've tried every single thing on the internet - and it's just frustrating. Can somebody tell me how to fix this please? I just can't get this damn pyzmail module installed. I've even tried virtual environments. I get this error no matter what, it's like it's destined to be and god wants me to suffer in the cmd prompt and google for 3 hours .
.\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0>pip install pyzmail
Collecting pyzmail
Using cached pyzmail-1.0.3.tar.gz (57 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [2 lines of output]
error in pyzmail setup command: use_2to3 is invalid.
VERSION 1.0.3
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
This is the error. I find it really confusing.
error: metadata-generation-failed
I am not sure that it will work but that's what I found.
setuptools>=58 breaks support for use_2to3 that is why you are facing this error
Consider downgrading the setuptools to version 57.
pip install -I setuptools==57.5.0
That is the latest 57 version.
Also, you may consider not using this library.
UPDATE
As I understood, this package is abandoned and the last release was in May 2014. Downgrading the setuptools will not work. This package fails in setting up an abandoned distribute library.
Link to the same problem and answer.
I was tring to install PyQt5 and a get this error:
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
I've tried using brew install pyqt and installing pyqt6 went out just fine. What's wrong.
Ok, I faced this issue with python 3.10.4 and after searching I found two solutions for this problem because this problem not being only with turtle but for other libraries.
#Note: These solutions for downloading any library if you have a problem mentioned above and this problem faced me in windows CMD.
So you could try this way:
pip install <libraryName>==0.0.1
0.0.1 This is the last version of the library so you should find the version of the library that you want to install for this purpose, you can find the version of the library using this command:
pip show module <name_of_the_library>
another solution that could work is using --use-deprecated=backtrack-on-build-failures
Example:
pip install turtle --use-deprecated=backtrack-on-build-failures
Hope to help you.