Pygraphviz on macOS not installing - python

I've been trying to install pygraphviz and have followed the following command from another post but it didn't seem to work.
pip install pygraphviz --install-option="--include-path=/Users/ahmedhamadto/PycharmProjects/Kaggle Titanic/venv/lib/python3.10/site-packages/pygments/lexers/graphviz.py" \
--install-option="--library-path=/Users/ahmedhamadto/PycharmProjects/Kaggle Titanic/venv/lib/python3.10/site-packages/pygments/lexers/graphviz.py"
I received the following error:
DEPRECATION: pygraphviz is being installed using the legacy 'setup.py install' method, because the '--no-binary' option was enabled for it and this currently disables local wheel building for projects that don't have a 'pyproject.toml' file. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/11451
Running setup.py install for pygraphviz ... error
error: subprocess-exited-with-error
× Running setup.py install for pygraphviz did not run successfully.
│ exit code: 1
╰─> [6 lines of output]
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: option --include-path not recognized
[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 need it for the program I am coding in an attempt to make flowcharts:
# Draw and display the fault tree diagram
pos = nx.drawing.nx_agraph.graphviz_layout(G)
nx.draw(G, pos, with_labels=True, node_shape='rectangle')
# Save the diagram to a file
plt.savefig(file_name, format="pdf")

Related

pip install ez_setup error: invalid command 'egg_info'

I use pip install librosa but it returns error:
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [10 lines of output]
C:\Users\forest\AppData\Local\Temp\pip-install-9kubnarv\audioread_290887eadf0e4e15aa16d5ec304ca97a\setup.py:17: DeprecationWarning: the imp module is deprecated in favour of importlib and slated for removal in Python 3.12; see the module's documentation for alternative uses
import imp
D:\python\lib\site-packages\setuptools\_distutils\dist.py:265: UserWarning: Unknown distribution option: 'python_requires'
warnings.warn(msg)
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: invalid command 'egg_info'
[end of output]
I tryed to upgrade pip and setuptools but it's no use.And I found a way is pip install ez_setup but it still returns error:
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [10 lines of output]
D:\python\lib\site-packages\setuptools\_distutils\dist.py:265: UserWarning: Unknown distribution option: 'zip_safe'
warnings.warn(msg)
D:\python\lib\site-packages\setuptools\_distutils\dist.py:265: UserWarning: Unknown distribution option: 'install_requires'
warnings.warn(msg)
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: invalid command 'egg_info'
[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.
I can't understand how to do next.
Help me.I want this no errors.

"ERROR: CMake must be installed to build dlib" When I already installed CMake and added it path

I have installed cmake and added it to path.
Here is what the error looks like when I try to install dlib using pip:
C:\Users\Zack\AppData\Local\Programs\Python\Python39\Scripts>pip install dlib
Collecting dlib
Using cached dlib-19.24.0.tar.gz (3.2 MB)
Preparing metadata (setup.py) ... done
Building wheels for collected packages: dlib
Building wheel for dlib (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [7 lines of output]
running bdist_wheel
running build
running build_py
running build_ext
ERROR: CMake must be installed to build dlib
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for dlib
Running setup.py clean for dlib
Failed to build dlib
Installing collected packages: dlib
Running setup.py install for dlib ... error
error: subprocess-exited-with-error
× Running setup.py install for dlib did not run successfully.
│ exit code: 1
╰─> [9 lines of output]
running install
C:\Users\Zack\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
running build_ext
ERROR: CMake must be installed to build dlib
[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.
╰─> dlib
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
I tried downloading the dlib wheel and installing it like that:
C:\Users\Zack\AppData\Local\Programs\Python\Python39\Scripts>pip install "D:\Users\ZACK\Downloads\dlib-18.17.100-cp27-none-win32.whl"
Output
ERROR: dlib-18.17.100-cp27-none-win32.whl is not a supported wheel on this platform.
I tried installing the wheel with a url:
C:\Users\Zack\AppData\Local\Programs\Python\Python39\Scripts> pip install https://pypi.python.org/packages/da/06/bd3e241c4eb0a662914b3b4875fc52dd176a9db0d4a2c915ac2ad8800e9e/dlib-19.7.0-cp36-cp36m-win_amd64.whl#md5=b7330a5b2d46420343fbed5df69e6a3f
Output
ERROR: dlib-19.7.0-cp36-cp36m-win_amd64.whl is not a supported wheel on this platform.

workaround for this module?

Im trying to install pwntools on OSX but theres a little bump in the installation process, for some reason, there is this module called "unicorn" that uses a setup.py which is deprecated, is there a work around for this?
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [4 lines of output]
running bdist_wheel
running build
Building C extensions
error: [Errno 2] No such file or directory: '/private/var/folders/6p/l9f35jf50_v8j2yq_1l5h62w0000gp/T/pip-install-fbw0k5so/unicorn_8ea27fd7a2de4d1ea34a12cce6c691c5/../../include/unicorn'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for unicorn
Running setup.py clean for unicorn
Failed to build unicorn
Installing collected packages: unicorn, sortedcontainers, pyserial, pyelftools, urllib3, ropgadget, python-dateutil, pysocks, pyparsing, pygments, pycparser, psutil, plumbum, pathlib2, MarkupSafe, intervaltree, idna, charset-normalizer, certifi, bcrypt, rpyc, requests, packaging, mako, colored-traceback, cffi, pynacl, cryptography, paramiko, pwntools
Running setup.py install for unicorn ... error
error: subprocess-exited-with-error
× Running setup.py install for unicorn did not run successfully.
│ exit code: 1
╰─> [6 lines of output]
running install
/opt/homebrew/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
Building C extensions
error: [Errno 2] No such file or directory: '/private/var/folders/6p/l9f35jf50_v8j2yq_1l5h62w0000gp/T/pip-install-fbw0k5so/unicorn_8ea27fd7a2de4d1ea34a12cce6c691c5/../../include/unicorn'
[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.
╰─> unicorn
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

Wheel issue with BigARTM

I am trying to install BigARTM on Ubuntu following the instruction.
Everything goes fine until I run sudo make.
It generates the following error:
[ 99%] Building python package bigartm
running build
running build_py
[ 99%] Built target python_bigartm_build
[100%] Building wheel bigartm
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: invalid command 'bdist_wheel'
python/CMakeFiles/python_bigartm_wheel.dir/build.make:57: recipe for target 'python/CMakeFiles/python_bigartm_wheel' failed
make[2]: *** [python/CMakeFiles/python_bigartm_wheel] Error 1
CMakeFiles/Makefile2:781: recipe for target 'python/CMakeFiles/python_bigartm_wheel.dir/all' failed
make[1]: *** [python/CMakeFiles/python_bigartm_wheel.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
I suspected that the problem is connected with wheel. So I updated wheel:
user#user:~/bigartm/build$ pip install wheel
Collecting wheel
Using cached wheel-0.31.0-py2.py3-none-any.whl
Installing collected packages: wheel
Successfully installed wheel-0.31.0
Also I updated wheel in conda, and it shows now:
$ conda list | grep wheel
wheel 0.31.0 py36_0
wheel 0.31.0 <pip>
That did not help.

PYMC installation --fcompiler not recognized

I'm trying to install pymc on OSX Mountain lion.
I have installed gfortran (from http://gcc.gnu.org/wiki/GFortranBinaries#MacOS) and cloned pymc.
I tried what has previously been working: 'setup.py config --fcompiler=gfortran build', but this gives an error:
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: option --fcompiler not recognized
If I just do: 'sudo python setup.py install' then I get this
.
.
.
clang: warning: argument unused during compilation: '-mno-fused-madd'
In file included from src/ft2font.cpp:3:
In file included from src/ft2font.h:16:
/usr/X11/include/ft2build.h:56:10: fatal error: 'freetype/config/ftheader.h' file not found
include
^
1 error generated.
error: Setup script exited with error: command 'clang' failed with exit status 1
Any ideas what's going on?
Thanks,
Jen
Which version of PyMC are you trying to install, the current development version on GitHub master (PyMC 3) or the release version (PyMC 2.3)?
If you are trying to install PyMC 3, you do not need a Fortran compiler. You do need Theano, however. Can you try the following?
pip install --no-deps git+git://github.com/Theano/Theano.git
pip install --no-deps git+git://github.com/pymc-devs/pymc.git

Categories