当试图用Openopt
的NLP.solve()
来解决Python中的非线性问题时,我得到了这个错误,总结如下
you should have DerApproximator installed.
我试过了
pip install derapproximator
但它说“要求已经满足”。在
我使用的是windows7x64,python3.4和OpenOpt 0.5604。如何安装此软件包?在
我在Python34\Lib\site-packages
中看到了一个名为derapproximator-0.52-py3.4.egg
的文件,我必须在Environment variables
中添加PYTHONPATH
键,以便python找到openopt。我不知道如何在那里使用扩展名为.egg
的文件,所以我将内容提取到derapproximator-0.52-py3.4
。cmd树上的文件夹层次结构看起来像
+---derapproximator-0.52-py3.4
| +---DerApproximator
| | \---__pycache__
| \---EGG-INFO
但错误还是一样的
>>> import derapproximator
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'derapproximator'
然后我再次尝试将文件夹重命名为derapproximator-0.52-py3.4.egg
,但仍然不起作用。在
目前没有回答
相关问题 更多 >
编程相关推荐