Error when istaling healpy with pip. I have Python 3.9.7 - healpy

I cannot install healpy using pip and Python 3.9 - Windows 10.
ERROR: Failed building wheel for healpy
Failed to build healpy
ERROR: Could not build wheels for healpy which use PEP 517 and cannot be installed directly

Related

Error Installing FastAI on Windows: bdist_wheel did not run successfully

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

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

installing airflow on mac virtualenv gives: Could not build wheels for pandas which use PEP 517 and cannot be installed directly

In virtual environment I'm trying to install apache-airflow.
macOS: 10.13.6
Python: 3.9
(airflow_venv) $ sudo -H pip install apache-airflow==1.10.12 --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-1.10.12/constraints-3.7.txt
after installing quite some other wheels, for pandas I get the following error -
ERROR: Could not build wheels for pandas which use PEP 517 and cannot be installed directly
I've tried updating wheel and pip.
change to python3.8, python3.9 has some compatibility issues

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.

Python can't find or install lxml

In Win7, in python 3.4, in pandas, I tried to run pd.read_html.
It aborted, saying it couldn't find lxml.
I added "import lxml", and it said there was no module by that name.
I ran "pip install pandas lxml", and it aborted, saying
C:\Python34\hsf\pandas>pip install pandas lxml
Requirement already satisfied (use --upgrade to upgrade): pandas in c:\python34\
lib\site-packages
Downloading/unpacking lxml
Running setup.py (path:C:\Users\Windows\AppData\Local\Temp\pip_build_Windows\l
xml\setup.py) egg_info for package lxml
Building lxml version 3.4.4.
Building without Cython.
ERROR: b"'xslt-config' is not recognized as an internal or external command,
\r\noperable program or batch file.\r\n"
** make sure the development packages of libxml2 and libxslt are installed *
*
I tried pip to install libxml2, and libxslt, and that aborted saying:
C:\Python34\lib\distutils\dist.py:260: UserWarning: Unknown distribution option:
'bugtrack_url'
warnings.warn(msg)
error: Unable to find vcvarsall.bat
Prior SO answers to similar questions said "use sudo..." so were inapplicable to windows.
How can I install lxml in python 3.4 on Win7 ?
You can try the following:
pip install lxml
For the vcvarvasall.bat you can try installing: https://www.microsoft.com/en-us/download/details.aspx?id=44266
If none of those work you can download the precompiled binary here:
http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml
The last option is the easiest. Here are the steps:
1) Download the wheel at http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml
2) pip install wheel
3)pip install "path to where you downloaded the *.whl from step 1"

Resources