简体   繁体   中英

Python env - ImportError: cannot import name

I use a third-party source checked out from svn.

It was building and running fine. But while creating a deploy script, I may have executed some cmd after which I keep getting error

ImportError: cannot import name XXX

where XXX changes randomly.

I think my environment on Mac may be corrupted.

How can I find and resolve the issue?

Try using a virtual environment. For example, virtualenv. Once you create a virtual environment, activate it via source env/bin/activate and install all of the dependencies via pip install . You can start to narrow it down from there.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM