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 'RGFClassifier' #7
Comments
Thank you for your report! Unfortunately, rgf is directory name as well as module name. But in old version, test.py placed the same directory with rgf.py. I transfer test.py to other directory, and fixed import sentence. |
So I am getting some unusual behaviour now. In a Jupyter notebook
Maybe this is a separate issue to be raised. This looked like a Jupyter notebook error so back to importing. I tried to import
I then tried to run this from a python shell and got pretty much the same issue,
I am very confused but please ask for any extra information that might be of use |
Could you try to copy & paste test.py to other directory and execute it? In terminal, if test.py and rgf.py locate in the same directory, In newest rgf_python, I moved test.py to test/test.py. |
In Jupyter notebook, I think this is not rgf_python problem. |
I have copy and pasted this into a different directory. I ran it and the package imported as expected. Thank you for your help.
Many thanks for you help and for creating this python wrapper!! Yes, I think the Jupyter notebook issue is not a rgf_python issue. |
You're welcome! 😃 Your error is caused by failing to load model learning result. Could you list up all file names under If you can't, the reason is ...
From my experience, if we can pass this error, rgf becomes available. |
No, there is no model file. Here is what I have in there,
How is best to check for each of the following possible errors? Many thanks |
Thanks! Now, I suspected that 1. was occurred. Could you run following example? And please paste console output.It is informative. CAUTION! I updated the example today, so please use the newest version. Beggining of output in my envirionment is here.
|
I copied the new
Please note: The code above was not formatted 100% correctly and so I replaced all Any more information please ask :) |
Thanks a lot! For confirming it, we have to debug by embedding If you want to use former method, please rewrite platform_specific_Popen and insert print function as follows.
Here is result in my environment.
|
From the print/debug function I get
|
OK! |
I have changed it. It all seems to be working now as the iris script ran and gave the |
This is also working with my Jupyter notebook now! :) |
That's good! Don't worry 😃 Please feel free to ask questions or send PR. |
I am having the above error. I have made rgf1.2 and have tested using rgf1.2's own perl test script. This works. I have installed rgf_python and run the python setup as specified. I have changed the two folder locations to rgf1.2..\rgf executable and a temp folder that exist.
In python when I try to import I get the error
Cannot import name 'RGFClassifier'
. I tried to run the exact code in the test.py script provided in with rgf_python and this same error occurs.Strangely, I have
/usr/local/lib/python3.5/dist-packages/rgf_sklearn-0.0.0-py3.5.egg/rgf
in my path when I do runin python. I also in
/usr/local/lib/python3.5/dist-packages
I only have therfg-sklearn-0.0.0-py3.5.egg
and norgf-sklearn
as I would expect as the following appeared towards the end of thesetup.py
,The text was updated successfully, but these errors were encountered: