Installing on ubuntu

29 views
Skip to first unread message

davep

unread,
Aug 2, 2008, 2:24:40 PM8/2/08
to ProfitPy Discuss
So far I have installed all of the pre-requisites I came across before
installing profit py, including
python2.5, scipy, ibpy, java6, IBTWS unix version, qt, pyqt, svn.

I have very little experience with python in general and I must be
doing something wrong on the install:

svn checkout http://profitpy.googlecode.com/svn/trunk/ profitpy-read-
only
sudo python setup.py install

but I get this:

~/profitpy/bin$ python profit_workbench
Traceback (most recent call last):
File "profit_workbench", line 12, in <module>
from profit.lib import Settings
File "/usr/lib/python2.5/site-packages/profit/lib/__init__ty", line
20, in <module>
from profit.lib.widgets import profit_rc
ImportError: No module named widgets

my build directory looks like this (widgets notably absent):
/usr/lib/python2.5/site-packages/profit/lib$ ls
bpnn.py breadfan.py defaults.py gui.py __init__.py
scripttools.py
bpnn.pyc breadfan.pyc defaults.pyc gui.pyc __init__.pyc
scripttools.pyc

Can someone kindly point out what I'm doing wrong?


Troy Melhase

unread,
Aug 2, 2008, 5:54:01 PM8/2/08
to profitpy...@googlegroups.com
> sudo python setup.py install

Don't do that. The setup.py script isn't done yet.

> Can someone kindly point out what I'm doing wrong?

DO this instead: first, run svn up. That widgets directory should be
there. Then "cd profit" and run "make". Then go back up one level
and run "./bin/profit_workbench".

Hope this helps.

davep

unread,
Aug 12, 2008, 7:35:30 PM8/12/08
to ProfitPy Discuss
Thanks for your help previously.
I have since gotten profitpy to open after installing qt and pyqt from
source and now I assume the last piece of the puzzle is to install Qwt
from source, which I believe I have done by checking out the svn and
running qmake, make and make install. I also tried ldconfig as
recommended by the install messages but when I try to run
profit_workbench It still can not import Qwt5.

I also tried just installing python-Qwt5-Qt4 and libqwt5-qt4-dev from
the repositories but i get a Qwt related error when I try to connect
or check the account in profitpy, which I assume is because it
installs 5.0 instead of 5.1 or 5.2

I also can't get any of the examples that come with Qwt to work
either, so I obviously can't get this package installed properly.

Your help is greatly appreciated!

Troy Melhase

unread,
Aug 12, 2008, 9:26:04 PM8/12/08
to profitpy...@googlegroups.com
> I have since gotten profitpy to open after installing qt and pyqt from
> source and now I assume the last piece of the puzzle is to install Qwt
> from source, which I believe I have done by checking out the svn and
> running qmake,

> I also tried just installing python-Qwt5-Qt4 and libqwt5-qt4-dev from


> the repositories but i get a Qwt related error when I try to connect
> or check the account in profitpy, which I assume is because it
> installs 5.0 instead of 5.1 or 5.2

You need PyQwt, not necessarily Qwt. The PyQwt sources comes with a
build of Qwt, so you only need to grab PyQwt 5.1 sources.

Be sure you read the installation docs for PyQwt -- it's not the
normal "configure, make, make install" dance.

For what it's worth, I build PyQwt from sources because I can never
find an up-to-date package for my system. :(

davep

unread,
Aug 13, 2008, 8:56:20 PM8/13/08
to ProfitPy Discuss
Thanks, got it working now. I'm just messing around to figure out how
all the features of profitpy work. If anyone has a toy example
strategy that they would be willing to document and upload, or
possibly include with the upcoming release, it would really help out.
Otherwise thank you for your help so far and thanks for all your hard
work, this is really a great looking program!

Dave

Troy Melhase

unread,
Aug 14, 2008, 4:36:14 PM8/14/08
to profitpy...@googlegroups.com
> Thanks, got it working now. I'm just messing around to figure out how
> all the features of profitpy work. If anyone has a toy example
> strategy that they would be willing to document and upload, or
> possibly include with the upcoming release, it would really help out.
> Otherwise thank you for your help so far and thanks for all your hard
> work, this is really a great looking program!

I plan on including at least 2 example strategies in the release. If
you have any ideas on those, please let me know.

The thing you should know is that while the strategy designer is
almost done, it's not completely integrated with the the workbench.
What's missing is for the workbench to load up all of the callable
objects you define in the strategy. That's really the last big
feature required for the release, and I'll get to it eventually. So
much code to write, so little time. :)

For now, you can approximate it by writing your trading strategies as
regular python modules and then load those modules into the
interactive shell. Those types of modules will be usable by the
strategy tool when it's completely finished and integrated.

cbrain

unread,
Aug 25, 2008, 3:10:48 PM8/25/08
to ProfitPy Discuss
Hi.

I've followed the instructions in this thread, but I get the following
when issuing "./bin/profit_workbench" at the terminal prompt:

--- BEGIN ---

Traceback (most recent call last):
File "./bin/profit_workbench", line 12, in <module>
from profit.lib import Settings
ImportError: No module named profit.lib

--- END ---

The make in the profit directory was successful. What could be wrong?

Thanks.

Troy Melhase

unread,
Aug 25, 2008, 3:13:01 PM8/25/08
to profitpy...@googlegroups.com
> Traceback (most recent call last):
> File "./bin/profit_workbench", line 12, in <module>
> from profit.lib import Settings
> ImportError: No module named profit.lib
>
> --- END ---
>
> The make in the profit directory was successful. What could be wrong?


Go up one level, e.g., "cd .." then run "./bin/profit_workbench".

Or, "export PYTHONPATH=/place/you/did/your/checkout", then run normally.

HTH,

troy

cbrain

unread,
Aug 26, 2008, 12:51:54 PM8/26/08
to ProfitPy Discuss
Thanks, setting up the path to point to the current directory and/or
the profitpy directory helped with that particular error. I was then
able to get the program to run after fixing some end of line errors
involving Icon setting statements.

davep

unread,
Aug 27, 2008, 7:10:42 AM8/27/08
to ProfitPy Discuss
I had those same errors, they indicate that you do not have all of the
software prerequisites properly installed. Make sure you install the
latest versions of qt, pyqt, and pyqwt all from source.

dave
Reply all
Reply to author
Forward
0 new messages