try:
from pip import main as pipmain
except:
from pip._internal import main as pipmain
pipmain(['install','gekko'])
# to upgrade: pipmain(['install','--upgrade','gekko'])--
--
APMonitor user's group e-mail list.
- To post a message, send email to apmo...@googlegroups.com
- To unsubscribe, send email to apmonitor+...@googlegroups.com
- Visit this group at http://groups.google.com/group/apmonitor
---
You received this message because you are subscribed to the Google Groups "apmonitor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to apmonitor+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Dear Dr. Hedengren,thank you for your quick reply. I have done what you suggested, sadly, I still got the same error message: ImportError: cannot import name 'GEKKO'. And I found in the path \anaconda3\lib\site-packages exists a gekko package, but inside it, there is no program named GEKKO, as you can see from the picture. Do you know what could be other possible causes for the issue? Thank you!With best wishesKai
On Tuesday, July 31, 2018 at 11:53:46 PM UTC+8, Kai wrote:Dear Dr. Hedengren,thank you very much for your reply for the MPC problem. However, I got problems with gekko installation: I installed gekko as the way you said in the lecture, but when I try to run the code: from gekko import GEKKO. I obtained the following error message: from gekko import GEKKO ImportError: cannot import name 'GEKKO'. (You can also see from the picture below ). Then I checked the pip list, gekko is there. And the software I am using is Anaconda, Spyder.Do you know what is the root of this problem? Thank you!Looking forward to hearing from you!Bests,Kai