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

AttributeError: module 'cflearn' has no attribute 'make' #1

Closed
impulsecorp opened this issue Aug 1, 2020 · 5 comments
Closed

AttributeError: module 'cflearn' has no attribute 'make' #1

impulsecorp opened this issue Aug 1, 2020 · 5 comments

Comments

@impulsecorp
Copy link

On my Ubuntu 18.04.4 server, when I run your quick start code, I get this error:
root@server1:~/newautoml# python3 cflearn.py
Traceback (most recent call last):
File "cflearn.py", line 1, in
import cflearn
File "/root/newautoml/cflearn.py", line 5, in
m = cflearn.make().fit(x, y)
AttributeError: module 'cflearn' has no attribute 'make'

@carefree0910
Copy link
Owner

That's pretty weird... Could you please tell me how did you install carefree-learn and what's your python version? Because I've run some CI tests here on Ubuntu 18.04.4, which did not raise errors (the usage of cflearn.make is included here)

@impulsecorp
Copy link
Author

impulsecorp commented Aug 1, 2020

I installed it using: sudo pip3 install carefree-learn
I am running Python 3.6.9
I am not much of a programmer so maybe I am making a mistake somewhere.

My cflearn.py file is:

import cflearn
from cfdata.tabular import TabularDataset

x, y = TabularDataset.iris().xy
m = cflearn.make().fit(x, y)
# Make label predictions
m.predict(x)
# Make probability predictions
m.predict_prob(x)
# Estimate performance
cflearn.estimate(x, y, wrappers=m)

@carefree0910
Copy link
Owner

carefree0910 commented Aug 1, 2020

I finally realized that your file is named cflearn, so when you are trying to import cflearn, Python will import your current file, not carefree-learn! 🤣

Simply rename your file and everything should be OK 😁

@impulsecorp
Copy link
Author

Yes, I renamed it and it works now. Thanks!

@carefree0910
Copy link
Owner

You're welcome! 😄

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

1 participant