Closed xogeny closed 10 years ago
To be clear, my recommendation is to take approach 2.
Thanks for the advice. I took option 2 via commit dfd3726.
I also added scipy
to the list of dependences and changed wx
to wxPython
. However, I don't think that wxPython
will install correctly via pip
. On my system (Ubuntu 13.04), I had to manually install the python-wxgtk2.8
and python-wxtools
packages.
I'm not sure I followed the issue with control
. The setup.py
script seems to automatically install it via external/control
.
You are correctly about wxPython
. I had the same problem.
Regarding control
, I suspect it works if you install it via pip
. But if you clone the repo and try to install it (via python setup.py install
), then you need to install it manually. At least that is what I recall.
If you can confirm that this installs OK via pip
, then go ahead and close this ticket.
It runs with pip
in virtualenv
. Thanks for your help.
The line
Is a problem because this, by itself, tries to load a bunch of dependencies.
There are two ways to approach this:
control
package to the path duringsetup.py
import
and provide the version number some other way.If you do 1) there are lots of dependencies. Some are listed in the
setup.py
file (matplotlib
,wx
andnumpy
). Of these,wx
is not the correct name for the extension you want. You wantwxPython
(which installs a package namedwx
, but is not the same as the PyPI listing forwx
). Butscipy
is also a dependency even though it is not listed. The big problem here is that the mechanisms insetup.py
don't kick in to load all these things. In other words, sincemodelicares
is imported intosetup.py
, all the dependencies have to be installed in advance. On the other hand, if the import wasn't there andpip
was used to installmodelicares
from PyPI, all the dependencies could actually be loaded automatically. Even if you load all of those dependencies, you still have the problem that thecontrol
package really needs to be installed first (because theexternal/control/src
directory name doesn't match the package name). After all of this, I eventually gave up on this approach.Taking approach 2 (which simply means commenting out the
import
line and substituting the version number ("0.8.1", in my case) into thesetup.py
script worked perfectly andmodelicares
installed without issue. Of course, this doesn't address the dependency issue (since a local install doesn't pull in all the dependencies). The issue with the dependencies (thatwx
should bewxPython
thatscipy
is missing) are not addressed. Also, thecontrol
package still needs to be installed manually in that case.One word of advice...the best way to test for these kinds of issues is to use
virtualenv
to create a pristine "install". These things come out of the woodwork in such cases.