Struggling to Install Cartopy - python

I'm struggling to Install Cartopy from the Terminal and from Pycharm.
This is what I get as error message:
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 Cartopy
ERROR: Could not build wheels for Cartopy, which is required to install pyproject.toml-based projects
Can someone please help with the problem. Thanks
I tried to Update the Pip Install

Here are two solutions since you didn't specify the OS you are using or the full error log.
If on a Linux and the error log is due to geos_c.h is not found.
Install the developer version of the geos library
sudo apt install libgeos-dev
as can be seen from here.
If you are on a mac or windows, you may use conda to install it. find the installation instruction miniconda here then
conda install -c conda-forge cartopy

Related

How do I fix this error when trying to install pygraphviz

I am trying to install pygraphviz with these commands on Mac m1 Ventura 13.1:
conda install -c anaconda graphviz
brew install gmp
env "CFLAGS=-I/usr/local/include -L/usr/local/lib" pip install pycddlib
I get this error after running the last line:
In file included from pygraphviz/graphviz_wrap.c:154:
/Users/ismaeelbashir/miniforge3/envs/lnn/include/python3.9/Python.h:25:10: fatal error: 'stdio.h' file not found
#include <stdio.h>
^~~~~~~~~
1 error generated.
error: command '/opt/homebrew/opt/llvm/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: legacy-install-failure
× Encountered error while trying to install package.
╰─> pygraphviz
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
I am trying to install a python library inn https://github.com/IBM/LNN/#quickstart. and this commands were on the installation guide.
This error message suggests that there is a problem with the compiler finding the standard C library header file 'stdio.h'.
It seems to be an issue with the python installation environment and the package dependencies. Here are a few steps that you can try to resolve the issue:
Try updating the compiler
conda update clang
Try installing pygraphviz with a different version of Python:
conda create -n newenv python=3.8
conda activate newenv
pip install pygraphviz
3.Try installing pygraphviz without the "CFLAGS" environment variable:
pip install pygraphviz --no-use-pep517
If none of these solutions work, you might want to look into other potential solutions or raise an issue with the library's repository.

Problem in installing cartopy package via pip

I tried to install cartopy with pip but it gives me the below error.Also I'm on Ubuntu 22.04.1 LTS.
...
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for cartopy
Failed to build cartopy
ERROR: Could not build wheels for cartopy, which is required to install pyproject.toml-based projects
I tried to install other versions but still get the same issue.

Trying to install pycaret but receiving an error

Having this error while installing pycaret through following command:
!pip install pycaret..
error: subprocess-exited-with-error
pip subprocess to install build dependencies did not run successfully.
exit code: 1
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.
note: This error originates from a subprocess, and is likely not a problem with pip.
I have tried the command !pip install pycaret on jupyter notebook but it continuously giving the same error.
I would recommend installing the pre-release version of pycaret (3.0.0rc4 as of writing this answer). Many of the common installation issues have been resolved there. Make sure you are installing this on a new (conda) environment.
pip install -U --pre pycaret

Gettingerror: legacy-install-failure, while installing basemap

I am trying to install Basemap using pip, however at some point it reaches the 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
I do not really know what to do here, and I could not find anyone who encountered the same error. I have tried upgrading pip and setuptools, but they did not seem to help. What should I do?
P.S. I have been trying to install basemap for the past 4 days and I was not very sucessfull. If you know how to install it on MacOS, please hit me up! Thank you!
For Windows:
To install basemap you need to download the wheel file from this path:
https://www.lfd.uci.edu/~gohlke/pythonlibs/#basemap
for python 3.10 this will be the file:
basemap‑1.3.2‑cp310‑cp310‑win_amd64.whl
Then you have to go to the folder where the above mentioned .whl file is saved and run this command from there:
pip install basemap‑1.3.2‑cp310‑cp310‑win_amd64.whl
For Mac OS please refer:
https://github.com/matplotlib/basemap/releases:
Make sure you have:
brew install geos
brew install matplotlib
brew install numpy
brew install proj
Add export GEOS_DIR="/user/local/Cellar/geos/3.10.2/" to your .bash profile and reload it via:
source ~/.bash_profile
git clone --depth 1 https://github.com/matplotlib/basemap.git
then in the basemap/packages/basemap directory
pip3 install
For Google Colab:
!sudo apt-get install libgeos-3.6.2
!sudo apt-get install libgeos-dev
!pip install git+https://github.com/matplotlib/basemap#subdirectory=packages/basemap

installing pandas-profiling error in python 3.10

I am trying to install pandas-profiling in python 3.10 using pychan installation package option. It is giving error. I tried the same using command prompt. Giviing the same error.
Few last lines of error are as below:
'-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\admin\AppData\Local\Temp\pip-install-j19ut5x7\phik_da8a6ed5567b4ca3b73ac99e2a8c743e\build\lib.win-amd64-3.10\phik\lib']' returned non-zero exit status 1.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for phik
ERROR: Could not build wheels for phik, which is required to install pyproject.toml-based projects
Any suggestion to fix this issue.
I have previously encountered the same challenge and I could resolve it by doing the following two steps in exactly this order:
Update setuptools: based on your information provided you are using pip, therefore the command is the following one: pip install --upgrade setuptools
Now run the installation command (as provided by the official documentation: https://pypi.org/project/pandas-profiling/): pip install pandas-profiling
As an alternative, in case you are using Anaconda these two steps will be as follows:
Update setuptools: conda upgrade setuptools
Install pandas-profiling from Anaconda: conda install -c conda-forge pandas-profiling
Hope this helps!

Categories

Resources