Error Installing FastAI on Windows: bdist_wheel did not run successfully - pip

I have been trying to install fastai in a virtual environment on my windows computer, and continue getting the error below.
I used conda to create a virtual environment, and am attempting to pip install fastai with Python 3.11.
Haven't had any issues installing other packages in this environment, so any thoughts would be appreciated.
Building wheel for bcolz (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [46 lines of output]
C:\Users\username\miniconda3\envs\Ron\Lib\site-packages\setuptools\installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
I have been on a number of forums, have tried pip install wheel and a pip3 install to no avail.
My system info is:
OS Name Microsoft Windows 11 Home
Version 10.0.22621 Build 22621

Related

Error Preparing metadata (setup.py) ... error while installing STAMP

I am trying to install (linux) STAMP so I can analyze my PICRUST output. The code I'm following is:
sudo apt-get install libblas-dev liblapack-dev gfortran
sudo apt-get install freetype* python-pip python-dev python-numpy python-scipy python-matplotlib
sudo pip install STAMP
The error I get is:
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─\> \[1 lines of output\]
Only Python 2.7 and 3.3 are supported.
\[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.
I created a conda environment with python 2.7 and another one with python 3.3 but in both of them I keep getting the same error. Any ideas on how I could install STAMP?

pycharm not wanting to install pyAudio

im trying to install pyAudio in pycharm in the trmiall and i get this
Collecting pyaudio Using cached PyAudio-0.2.11.tar.gz (37 kB)
Preparing metadata (setup.py) ... done Using legacy 'setup.py install'
for pyaudio, since package 'wheel' is not installed. Installing
collected packages: pyaudio Running setup.py install for pyaudio ...
error error: subprocess-exited-with-error
× Running setup.py install for pyaudio did not run successfully. │
exit code: 1 ╰─> [9 lines of output]
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.10
copying src\pyaudio.py -> build\lib.win-amd64-3.10
running build_ext
building '_portaudio' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools":
https://visualstudio.microsoft.com/visual-cpp-build-tools/
[end of output]
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. ╰─> pyaudio
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
any idea how to do this in pycharm without installing any external librarys or module.

Error installing geopandas in python on mac m1

I'm trying to install geopandas on my M1 mac and I'm running into errors
I tried to pip install all the dependencies individually but where I'm tripping up is in the install of pyproj.
I installed PROJ using brew install proj and that worked fine
When I try to pip install pyproj, I get the follow error
Building wheels for collected packages: pyproj
Building wheel for pyproj (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for pyproj (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [12 lines of output]
PROJ_DIR is set, using existing PROJ installation..
running bdist_wheel
running build
running build_py
running build_ext
building 'pyproj._geod' extension
pyproj/_geod.c:704:10: fatal error: 'geodesic.h' file not found
#include "geodesic.h"
^~~~~~~~~~~~
1 error generated.
error: command '/usr/bin/clang' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pyproj
Failed to build pyproj
ERROR: Could not build wheels for pyproj, which is required to install pyproject.toml-based projects
Any help would be much appreciated
At the moment, installing geopandas on M1 macs can be achieved via conda or pip+homebrew.
GeoPandas itself is written in pure Python, so there is no issue running that on any architecture. However, it depends on other libraries that are written in other languages (C, C++) that need to be compiled specifically for M1 chips. While you could compile it yourself, I am not going to cover this option as it is not user friendly.
There are three possible sources of required libraries - pip wheels, conda-forge, and Homebrew.
When a Python package requires C dependency, it can create wheels with the dependency compiled for each system and chip architecture. See for example pygeos - https://pypi.org/project/pygeos/#files. What you need is *macosx_11_0_arm64.whl . If your package doesn't offer it, you have to find another way of installing than pip. Since GeoPandas requires shapely and fiona (among others) that do not have these wheels, you should look elsewhere - either on conda-forge or Homebrew. Below are both options tested as of today.
Conda and conda-forge way (recommended)
Conda-forge currently has all packages geopandas needs
Install M1 version of miniforge or mambaforge. It can be downloaded from here - https://github.com/conda-forge/miniforge.
conda install -c conda-forge geopandas pygeos
Note: if you install x86 (Intel) version of conda, it will run under Rosetta2 and install all packages using x86 architecture, meaning that everything will run under emulation. Try to avoid that.
Pip and Homebrew way
Homebrew can install C libraries compiled for M1. Python packages will find and use them.
Using an environment with Python 3.9
Install shapely:
brew install geos
export DYLD_LIBRARY_PATH=/opt/homebrew/opt/geos/lib/
pip install shapely
DYLD_LIBRARY_PATH is needed for shapely to find GEOS installation.
Install fiona:
brew install gdal
pip install fiona
Install pyproj:
brew install proj
pip install pyproj
Install geopandas and pygeos for speedups:
pip install pygeos
pip install geopandas
Note that this is a copy&paste of my own explanation given in https://github.com/geopandas/geopandas/issues/1816#issuecomment-1003093329.
Related https://github.com/pyproj4/pyproj/issues/1027
I was stuck with the same problem, I also tried setting the environment values for PROJ_DIR, PROJ_LIBDIR, PROJ_INCDIR but perhaps setting the values is causing the error, so closed the terminal and tried again and was able to install correctly

Cannot install erdpy on macOS - failed building wheel for pynacl

I'm trying to install erdpy on a macOS by following the official guide, I successfully managed to download erdpy-up and when I run it, I receive the following error:
File "/opt/homebrew/Cellar/python#3.8/3.8.12/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "setup.py", line 161, in run
raise Exception("ERROR: The 'make' utility is missing from PATH")
Exception: ERROR: The 'make' utility is missing from PATH
----------------------------------------
ERROR: Failed building wheel for pynacl
Failed to build pynacl
ERROR: Could not build wheels for pynacl which use PEP 517 and cannot be installed directly
CRITICAL:installer:Could not install erdpy.
Right before that, I see:
Using legacy 'setup.py install' for cffi, since package 'wheel' is not installed.
Using legacy 'setup.py install' for pycryptodomex, since package 'wheel' is not installed.
Building wheels for collected packages: pynacl
Building wheel for pynacl (PEP 517) ... error
Tried to install libsodium using brew but erdpy installation still failed.
Is there another way to install / build it?
I have make installed on my system. The log message is not very clear, but in the end I figured out how I can install erdpy on my Mac.
First I installed libsodium:
brew install libsodium
and then I installed erdpy using pip3:
pip3 install --user --upgrade --no-cache-dir erdpy
Then erdpy -v returns
erdpy 1.0.18
Your error says you don't have the make utility installed.
Install it by executing
brew install make
in your terminal. Then retry the installation.
You could also activate the virtualenv with source ~/elrondsdk/erdpy-activateand then use pip3 install --upgrade --no-cache-dir erdpy.
If you have the M1 processor, it won't install on Mac. You will have to remote connect to a linux system. VS code has the ability to do this, or you could use parallels and run a linux VM locally.

Failed to install Qiskit through Anaconda

Windows 10
Anaconda Python 3.7
pip 20.1.1
I trid to install qiskit on Anaconda Prompt:
pip install qiskit
and it reports error while builidng wheels for cvxpy, scs, ecos:
Building Wheels for collected packages: cvxgy, scs
Building wheel for cvxpy(PEP 517) ... error
...
Building wheel for scs (setup.py) ... error
...
Building wheel for ecos (setup.py)... error
...
ERROR: Could not build wheels for cvxpy which use PEP 517 and cannot be installed directly
I tried to update pip and install PEP 517 after and tried again, but the error still remained.

Resources