I've installed pygraphviz using
conda install -c alubbock pygraphviz
But there was a problem since neato was missing, so I uninstalled the above and did the following.
From the suggestions given here I downloaded graphviz msi and installed in C:\Program Files (x86)\Graphviz2.38 and also installed.
Could someone suggest how to proceed from here?
import pygraphviz as pgv
doesn't work.
So I tried,
pip install pygraphviz
this returns
pygraphviz/graphviz_wrap.c(2987): fatal error C1083: Cannot open include file: 'graphviz/cgraph.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Failed building wheel for pygraphviz
Running setup.py clean for pygraphviz
Failed to build pygraphviz
Installing collected packages: pygraphviz
Running setup.py install for pygraphviz ... error
I'm not sure how to install pygraphviz now.
Related
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
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.
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
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.
I was trying to install PyCrypto using PIP command
pip install pycrypto
I encountered error as,
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\VC\\Tools\\MSVC\\14.15.26726\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
Please help me if anyone knows how to resolve this issue.
Searching about cli.exe and python lead me to https://github.com/explosion/spaCy/issues/2507
TLDR:
Choose one
use conda instead of pip
downgrade your python to 3.6 or lower
download an already compiled pycrypto and install it manually