ImportError: cannot import name 'utils'
See original GitHub issueDescription
When pip installing from master and importing it an ImportError arises
Steps/Code to Reproduce
pip install git+https://github.com/plotly/dash-cytoscape.git@master
import dash_cytoscape as cyto
Expected Results
No error
Actual Results
import dash_cytoscape as cyto File “/venv/lib/python3.6/site-packages/dash_cytoscape/init.py”, line 12, in <module> from . import utils ImportError: cannot import name ‘utils’
Versions
Python 3.6.8 (default, Apr 2 2020, 13:34:55) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] on linux Dash 1.9.1 Dash Core Components 1.0.2 Dash HTML Components 1.8.1 ! Cytoscape errors out ! import dash_renderer; print(“Dash Renderer”, dash_renderer.__version) AttributeError: module ‘dash_renderer’ has no attribute ‘__version’
In order to resolve the issue:
@xhlulu Should I do a short PR or do you want to quickly fix that line?
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Python ImportError: cannot import name utils - Stack Overflow
We may see the unable to import utils error in multiple contexts. I got this error message when I was migrating scripts from...
Read more >ImportError: cannot import name util · Issue #739 - GitHub
Run cli command 'pip install checkov'. root@buster:~# pip install checkov Collecting checkov Downloading ...
Read more >How to Fix : “ImportError: Cannot import name X” in Python
In Python "ImportError: cannot import name" error generally occurs when the imported class is not accessible, or the imported class is in a...
Read more >[Django] #16136: Error was: cannot import name utils
File "/usr/share/django/Django-1.3/django/db/backends/mysql/base.py", line 28, in <module> from django.db import utils ImportError: cannot import name utils
Read more >How to Fix ImportError: Cannot Import Name in Python - Rollbar
The Python ImportError: cannot import name error occurs when an imported class is not accessible or is in a circular dependency.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think
setup.py
is a cleaner place to handle this.MANIFEST.in
is typically used for non-Python files, whereaspackages
in thesetup
scriptpackages
arg is intended to cover the necessary Python files. I don’t know if there are any other consequences if we were to useMANIFEST.in
but I’d rather we stick to the standard.Awesome! Feel free to open a PR if this is time sensitive; otherwise, I’ll add it to the milestone for next release (which should be soon considering the recent updates).