Comments (7)
I am facing the same issue with the exact same output as @dogo
@weibel, I tried to downgrade pygraphviz as you suggested, but it was unsuccessful.
Swift Code Metrics info
swift-code-metrics --version
swift-code-metrics 1.5.1
graphviz info
brew info graphviz
graphviz: stable 2.47.0 (bottled), HEAD
Graph visualization software from AT&T and Bell Labs
https://www.graphviz.org/
/usr/local/Cellar/graphviz/2.47.0 (301 files, 10.5MB) *
Poured from bottle on 2021-04-09 at 15:00:57
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/graphviz.rb
License: EPL-1.0
==> Dependencies
Build: autoconf ✔, automake ✘, bison ✘, pkg-config ✔
Required: gd ✔, gts ✔, libpng ✔, librsvg ✔, libtool ✔, pango ✔
==> Options
--HEAD
Install HEAD version
==> Analytics
install: 84,165 (30 days), 225,532 (90 days), 648,784 (365 days)
install-on-request: 70,881 (30 days), 187,067 (90 days), 524,062 (365 days)
build-error: 0 (30 days)
pygraphviz configuration
pip3 show pygraphviz
Name: pygraphviz
Version: 1.5
Summary: Python interface to Graphviz
Home-page: http://pygraphviz.github.io
Author: Aric Hagberg
Author-email: [email protected]
License: BSD
Location: /usr/local/lib/python3.9/site-packages
Requires:
Required-by: swift-code-metrics
Run log
swift-code-metrics --source <source-path> --artifacts <artifacts-path> --generate-graphs
Traceback (most recent call last):
File "/usr/local/bin/swift-code-metrics", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.9/site-packages/swift_code_metrics/scm.py", line 76, in main
from ._graphs_renderer import GraphsRender
File "/usr/local/lib/python3.9/site-packages/swift_code_metrics/_graphs_renderer.py", line 5, in <module>
from ._graphs_presenter import GraphPresenter
File "/usr/local/lib/python3.9/site-packages/swift_code_metrics/_graphs_presenter.py", line 2, in <module>
from ._graph_helpers import Graph
File "/usr/local/lib/python3.9/site-packages/swift_code_metrics/_graph_helpers.py", line 8, in <module>
import pygraphviz as pgv
File "/usr/local/lib/python3.9/site-packages/pygraphviz/__init__.py", line 58, in <module>
from .agraph import AGraph, Node, Edge, Attribute, ItemAttribute, DotError
File "/usr/local/lib/python3.9/site-packages/pygraphviz/agraph.py", line 22, in <module>
from . import graphviz as gv
File "/usr/local/lib/python3.9/site-packages/pygraphviz/graphviz.py", line 28, in <module>
_graphviz = swig_import_helper()
File "/usr/local/lib/python3.9/site-packages/pygraphviz/graphviz.py", line 24, in swig_import_helper
_mod = imp.load_module('_graphviz', fp, pathname, description)
File "/usr/local/Cellar/[email protected]/3.9.4/Frameworks/Python.framework/Versions/3.9/lib/python3.9/imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "/usr/local/Cellar/[email protected]/3.9.4/Frameworks/Python.framework/Versions/3.9/lib/python3.9/imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: dlopen(/usr/local/lib/python3.9/site-packages/pygraphviz/_graphviz.cpython-39-darwin.so, 2): Symbol not found: _PyIOBase_Type
Referenced from: /usr/local/lib/python3.9/site-packages/pygraphviz/_graphviz.cpython-39-darwin.so
Expected in: flat namespace
in /usr/local/lib/python3.9/site-packages/pygraphviz/_graphviz.cpython-39-darwin.so
Any thoughts? 🤔
from swift-code-metrics.
I am having the same issues. I would love for a workaround or a fix.
Swift Code Metrics info
swift-code-metrics --version
swift-code-metrics 1.5.1
graphviz info
brew info graphviz
graphviz: stable 2.48.0, HEAD
Graph visualization software from AT&T and Bell Labs
https://www.graphviz.org/
/Users/user/homebrew/Cellar/graphviz/2.48.0 (301 files, 8MB) *
Built from source on 2021-08-10 at 15:16:56
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/graphviz.rb
License: EPL-1.0
==> Dependencies
Build: autoconf ✔, automake ✔, bison ✔, pkg-config ✔
Required: gd ✔, gts ✔, libpng ✔, librsvg ✔, libtool ✔, pango ✔
==> Options
--HEAD
Install HEAD version
==> Analytics
install: 76,979 (30 days), 232,635 (90 days), 757,473 (365 days)
install-on-request: 64,837 (30 days), 195,468 (90 days), 629,770 (365 days)
build-error: 0 (30 days)
Run log
swift-code-metrics --source /Users/user/Desktop/DevelopBranch/<source> --artifacts /Users/user/Desktop/Metrics/firstSet --generate-graphs
Traceback (most recent call last):
File "/Users/user/homebrew/bin/swift-code-metrics", line 8, in <module>
sys.exit(main())
File "/Users/user/homebrew/lib/python3.9/site-packages/swift_code_metrics/scm.py", line 76, in main
from ._graphs_renderer import GraphsRender
File "/Users/user/homebrew/lib/python3.9/site-packages/swift_code_metrics/_graphs_renderer.py", line 5, in <module>
from ._graphs_presenter import GraphPresenter
File "/Users/user/homebrew/lib/python3.9/site-packages/swift_code_metrics/_graphs_presenter.py", line 2, in <module>
from ._graph_helpers import Graph
File "/Users/user/homebrew/lib/python3.9/site-packages/swift_code_metrics/_graph_helpers.py", line 8, in <module>
import pygraphviz as pgv
File "/Users/user/homebrew/lib/python3.9/site-packages/pygraphviz/__init__.py", line 58, in <module>
from .agraph import AGraph, Node, Edge, Attribute, ItemAttribute, DotError
File "/Users/user/homebrew/lib/python3.9/site-packages/pygraphviz/agraph.py", line 22, in <module>
from . import graphviz as gv
File "/Users/user/homebrew/lib/python3.9/site-packages/pygraphviz/graphviz.py", line 28, in <module>
_graphviz = swig_import_helper()
File "/Users/user/homebrew/lib/python3.9/site-packages/pygraphviz/graphviz.py", line 24, in swig_import_helper
_mod = imp.load_module('_graphviz', fp, pathname, description)
File "/Users/user/homebrew/Cellar/[email protected]/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "/Users/user/homebrew/Cellar/[email protected]/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: dlopen(/Users/user/homebrew/lib/python3.9/site-packages/pygraphviz/_graphviz.cpython-39-darwin.so, 2): Symbol not found: _PyIOBase_Type
Referenced from: /Users/user/homebrew/lib/python3.9/site-packages/pygraphviz/_graphviz.cpython-39-darwin.so
Expected in: flat namespace
in /Users/user/homebrew/lib/python3.9/site-packages/pygraphviz/_graphviz.cpython-39-darwin.so
from swift-code-metrics.
I've updated the minimum pygraphviz
supported version and added support to M1. Can you try again and see if you're still facing any issues?
from swift-code-metrics.
@matsoftware, I have updated pygraphviz
and installed the version from master.
It worked flawlessly :D
from swift-code-metrics.
I had to install pygraphviz v1.5 like this (graphviz is installed from brew)
pip3 install --install-option="--include-path=/usr/local/include/" --install-option="--library-path=/usr/local/opt/" pygraphviz==1.5
On the docs it sounds as the latest pygraphviz 1.7 has solved many setup issues compared to earlier version, but i was not able to make it work with swift-code-metrics
from swift-code-metrics.
I finally got the graphs to work.
pip3 install cmake
pip3 install dlib
brew uninstall --ignore-dependencies python3
brew install python
pip3 install recordclass
pip3 uninstall pygraphviz
pip3 install pygraphviz
I don't know if all those uninstall and install are required. I checked the function of generating graphs throughout, but it wasn't until I unistalled pygraphviz, then reinstalled it with 1.7 that it worked. I did get a message saying 1.5 was required, but it rand and generated my graphs.
from swift-code-metrics.
Thanks @tfoltzfmr !
from swift-code-metrics.
Related Issues (16)
- pip3 python3.7 error
- Do not initialize matplotlib if generate-graphs is not passed HOT 1
- Improve changelog format
- Add iOS 13 and Mac OSX 10.15 new libraries
- Declare project metadata HOT 1
- @testable imports not included HOT 1
- Suggestion: generate sub-artifact directory for each identified module (and perform analysis on them)
- Overlapping values HOT 1
- Installing with Mac OS X HOT 5
- Error running 1.5.0 HOT 1
- Specify version on numpy HOT 1
- How to: Install on Apple Silicon
- ZeroDivisionError for new xcode project HOT 1
- Frameworks under the same project HOT 1
- RecursionError: maximum recursion depth exceeded while calling a Python object HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swift-code-metrics.