Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot import name config from 'config' (unknown location) #92

Open
komentra opened this issue Oct 17, 2021 · 3 comments
Open

cannot import name config from 'config' (unknown location) #92

komentra opened this issue Oct 17, 2021 · 3 comments

Comments

@komentra
Copy link

Follow the instructions exactly & made sure it was installed to c:/fairgame, but anytime I get to step of running amazon.bat I end up getting this:

Traceback (most recent call last): File "app.py", line 60, in <module> from cli import cli File "C:\fairgame\cli\cli.py", line 32, in <module> from common.globalconfig import AMAZON_CREDENTIAL_FILE, GlobalConfig File "C:\fairgame\common\globalconfig.py", line 21, in <module> from config import config as Cfg ImportError: cannot import name 'config' from 'config' (unknown location)

@Mei0211
Copy link

Mei0211 commented Nov 2, 2021

just import in train.py like this:from config.config import Config

@yychentw
Copy link

This is because the folder config and the file config.py have the same name. This ambiguity causes the problem.
You can rename the folder config to configs and make sure you modify the corresponding import statement like this: from configs import Config.

@majmal7
Copy link

majmal7 commented Apr 4, 2024

@yychentw ,
how to fix this "ImportError: cannot import name 'config' from 'jax.config'"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants