question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ImportError: cannot import name 'utils'

See original GitHub issue

Description

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:

https://github.com/IvoLeist/dash-cytoscape/commit/aaed204afb88332bdd9528cddbc4abc58f98f4da#diff-2eeaed663bd0d25b7e608891384b7298

@xhlulu Should I do a short PR or do you want to quickly fix that line?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
alexcjohnsoncommented, Jun 8, 2020

I think setup.py is a cleaner place to handle this. MANIFEST.in is typically used for non-Python files, whereas packages in the setup script packages arg is intended to cover the necessary Python files. I don’t know if there are any other consequences if we were to use MANIFEST.in but I’d rather we stick to the standard.

1reaction
xhlucacommented, Jun 15, 2020

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).

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found