intuition-io / intuition

Quantitative trading kit, for hackers
intuition.io
Apache License 2.0
124 stars 53 forks source link

install problems #6

Closed vzs closed 10 years ago

vzs commented 11 years ago

I have problems with install on both Ubuntu 12.04 and Windows. Could you give some additional info about install process.

  1. On Ubuntu: python part is OK (I use new virtualenv to install ppQuanTrade).
  2. R part that attempts to modify general installation fails ( I have R-3.0 installed long time ago and use R all the time). Besides all R repositories point to France. Could you specify what should be modified to use other places?
  3. Is it possible at all to install ppQuanTrade on Windows? Package looks very interesting (especially python-R integration, but documentation looks non-existing. Here is log of install. Thu Aug 1 08:59:32 MDT 2013 -- QuanTrade installation script Environment setup Copying configuration file templates... Note: do not forget to custom them at the end of the script Writting in ~/.bashrc for permanent automatic environment load Sourcing environment setup file. Restoring user permission Installation of debian packages... Reading package lists... Done Building dependency tree
    Reading state information... Done git is already the newest version. libzmq-dev is already the newest version. python-pip is already the newest version. curl is already the newest version. libmysqlclient-dev is already the newest version. mysql-server is already the newest version. python-dev is already the newest version. python2.7 is already the newest version. ruby1.9.3 is already the newest version. Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:

The following packages have unmet dependencies: r-base : Depends: r-base-core (>= 3.0.1-6raring0) but 3.0.1-6precise0 is to be installed Depends: r-recommended (= 3.0.1-6raring0) but 3.0.1-3precise is to be installed E: Unable to correct problems, you have held broken packages.

xav-b commented 11 years ago

I just improved the installation process and updated the README accordingly you should give it a shot. I didn't test it on windows yet but using vagrant it should perfectly work.

About R installation i used to add a new package source to get R3.0 for ubuntu 13.04 and I think this is what caused your error. However I removed this step and now I just need to find a smart way to install libraries in scripts/installation/install_r_packages.R systematically. In the meantime you can change R repositories to whatever suits you by replacing the urls int he file by one on this page: http://cran.r-project.org/mirrors.html.

vzs commented 11 years ago

Hi Xavier. Thank you for help. I am still unlucky. I did the following:

  1. Updated git module
  2. Tried to use old method: sudo ./install.sh - I thought that you commented out requirement to install R but it failed exactly like before. Besides install.sh is not valid at all: Line 28: syntax error near unexpected token ELSE. I have commented lines with then,else,fi. After that install is working but fails in r installation. 3 I have installed vagrant (latest 1.2.7). It has default box: virtualbox. I have it already installed so no problem. Thank you for information - looks like wonderful addition.
  3. I returned back to ppQuanTrade and here nothing is working (can you try to use your instructions on any clean machine/VM?) In particular: git clone is OK vagrant plugin install vagrant-lxc is OK cd ppQuanTrade && vagrant up --provder=lxc First fix the typo: provder -> provider Second: An active machine was found with a different provide. ..... Machine name: default Active provider: virtualbox Requested provider: lxc I guess it is because I just installed vagrant, but how to solve problem with another provider I have no clue. Why you cannot use virtualbox which is default? I also tried to halt vagrant and use your command, but it complained that lxc provider is not installed
  4. I have tried after that all your readme steps: cd ppQuanTrade && sudo make all a) No rule to make all b) No makefile if I try without all

Sorry for bothering you, but I marked your project as one of the most interesting and installation is one of the most difficult that I ever seen Victor

On Fri, Aug 2, 2013 at 11:42 AM, Gusabi notifications@github.com wrote:

I just improved the installation process and updated the README accordingly you should give it a shot. I didn't test it on windows yet but using vagrant it should perfectly work.

About R installation i used to add a new package source to get R3.0 for ubuntu 13.04 and I think this is what caused your error. However I removed this step and now I just need to find a smart way to install libraries in scripts/installation/install_r_packages.R systematically. In the meantime you can change R repositories to whatever suits you by replacing the urls int he file by one on this page: http://cran.r-project.org/mirrors.html.

— Reply to this email directly or view it on GitHubhttps://github.com/Gusabi/ppQuanTrade/issues/6#issuecomment-22021656 .

xav-b commented 11 years ago

You should stick with only one of the method, to avoid installation conflicts. Also install.sh script is definetely deprecated. I keep it until the whole installation process has migrated to the makefile.

Anyway, one at a time:

Let me know what is happpening I am working on installation and documentation

vzs commented 11 years ago

Hi Xavier. I have continued struggle with ppQuanTrade. Here are results:

  1. Makefile is now present.
  2. I tried to install using portable vagrant case. It was successful (after million times asking my sudo password)!!!
  3. I followed your instructions to test application. a) File ~/.quantrade/config/default.json does not exist. I have default.json in top directory. Should I copy it and create directory? b) All your instructions use backtest.py. Such file does not exist in distr. c) I have tried to run application/app.py - It does not runs d) I have tried to run scripts/run_app.sh - it fails with absent file ~/.quantrade/config/default.json (see above point a) Please update instructions

On Mon, Aug 5, 2013 at 10:18 AM, Gusabi notifications@github.com wrote:

You should stick with only one of the method, to avoid installation conflicts. Also install.sh script is definetely deprecated. I keep it until the whole installation process has migrated to the makefile.

Anyway, one at a time:

-

About vagrant: If a default machine was found try first to destroy it with vagrant destroy. Then re-run vagrant steps (I added a precision). I use lxc because it is much more lightweight than virtualbox and trading is quite heavy computing.

Your 5th point is unexpected. If there is no Makefille in ppQuanTrade's root directory it probably means you are not using the latest version. Try to pull it from github.

Let me know what is happpening I am working on installation and documentation

— Reply to this email directly or view it on GitHubhttps://github.com/Gusabi/ppQuanTrade/issues/6#issuecomment-22117377 .

xav-b commented 11 years ago

I fixed the Makefile and now .quantrade directory should be correctly created and populated (I tested it with vagrant for now). If not you can find templates in ppQuanTrade/config/templates. Actually they are just copied. You can check into the Makefil this is now a very simple script. R libs should be installed as well at the end of the process now.

You were right about backtest.py, I updated the Readme and examples should work out of the box.

vzs commented 11 years ago

Hello. Continue to use ppQuanTrade. Still no progress

  1. I think installation is OK now. I did not have any errors.
  2. You mention in description 2 database back-ends: mysql and sqlite. I did not find anything related to sqlite. It would be much easier to try without additional server hassles.
  3. To create mysql you give commands: sudo chown -r $USER $HOME/.quantrade. When I ran it the error was: chown invalid option --r. chown --help does not have "-r" option. I have used it without "-r"
  4. module place from File "./scripts/database_manager.py", line 18, in import plac ImportError: No module named plac was not installed by installation. I have to install it it independently
  5. After that all my attepts to run: "make database" (as root or user) failed: sqlalchemy.exc.OperationalError: (OperationalError) (1045, "Access denied for user 'user'@'localhost' (using password: YES)") None None make: *\ [database] Error 1 Thank you. I am ready to give up on this project. I did not see such difficult installation for a long time. Nothing is working as described in README.

On Wed, Aug 14, 2013 at 10:00 AM, Gusabi notifications@github.com wrote:

I fixed the Makefile and now .quantrade directory should be correctly created and populated (I tested it with vagrant for now). If not you can find templates in ppQuanTrade/config/templates. Actually they are just copied. You can check into the Makefil this is now a very simple script. R libs should be installed as well at the end of the process now.

You were right about backtest.py, I updated the Readme and examples should work out of the box.

— Reply to this email directly or view it on GitHubhttps://github.com/Gusabi/ppQuanTrade/issues/6#issuecomment-22646207 .

xav-b commented 11 years ago

Thanks for noticies I added plac to requirements and changed -r to -R (little typo, this is just the recursive option). There is no longer sqlite database (README updated). Too much data now. Before running make database did you edit scripts/installation/createdb.sql ? You have at least to change 'you' and 'password' and reflect it in ~/.quantrade/default.json.

vzs commented 11 years ago

Thank you. I did modified createdb.sql and default.json before using this syntax: GRANT ALL PRIVILEGES ON stock_data.* to "me@localhost identified by "mypswd' (actuall user name and password. I verified that mysql is working and I can use these names/password) "grid": { "controller": ["192.168.0.12"], "nodes": ["192.168.0.17", "192.168.0.20"], "name": "me", "password": "mypsswd", "port": 5555 } } I used "" quatation marks in both cases and the same name/password Results are the same : sqlalchemy.exc.OperationalError: (OperationalError) (1045, "Access denied for user 'user'@'localhost' (using password: YES)") None None Maybe it is vagrant related, maybe something else. Victor

On Sat, Aug 17, 2013 at 2:39 PM, Gusabi notifications@github.com wrote:

Thanks for noticies I added plac to requirements and changed -r to -R (little typo, this is just the recursive option). There is no longer sqlite database (README updated). Too much data now. Before running make database did you edit scripts/installation/createdb.sql ? You have at least to change 'you' and 'password' and reflect it in ~/.quantrade/default.json.

— Reply to this email directly or view it on GitHubhttps://github.com/Gusabi/ppQuanTrade/issues/6#issuecomment-22819298 .

xav-b commented 11 years ago

"grid" is a work in progress to distribute heavy trading computation accross computers. In default.json you need to change parameters in "mysql" field, in order to connect to the mysql database.

vzs commented 11 years ago

Hi Xavier. I continued my attempts to set up quantrade. I did a lot of progress but not there yet.

  1. The reason of mysql failure was setup of default.json. I did all mysql changes in ~/.quantrade (as you implemented recently), but "make database" expects values still from ~/.quantrade/config/default.json. I have manually created this folder and copied all files from top directory there. After that "make database" was executed without problems
  2. After that I was successful with running 1 listed example.
  3. I have tried to run shiny-example (of particular interest to me as I learning it now). After many requests to re-install various packages (from R-2.15.2 to R-3.0.1) I was finally able to start R and shiny: $ R -q -e "shiny::runApp(\"./application/shiny-backtest\")"

shiny::runApp("./application/shiny-backtest") Loading required package: shiny Error in mysqlNewConnection(drv, ...) : RS-DBI driver: (Failed to connect to database: Error: Can't connect to MySQL server on '192.168.0.14' (110) ) Calls: ... .valueClassTest -> is -> is -> mysqlNewConnection -> .Call Execution halted So question is where this IP "192.168.0.14" comes from? I have found it in config/default.json (with yours settings) but not from mine ~/.quantrade/default.json. My IP is different and I put everywhere localhost. So we pick up ppQuanTrade/config/default.json somewhere and it is a bug. Thank you again. Victor

On Sun, Aug 18, 2013 at 2:44 AM, Gusabi notifications@github.com wrote:

"grid" is a work in progress to distribute heavy trading computation accross computers. In default.json you need to change parameters in "mysql" field, in order to connect to the mysql database.

— Reply to this email directly or view it on GitHubhttps://github.com/Gusabi/ppQuanTrade/issues/6#issuecomment-22826895 .

xav-b commented 11 years ago

I think I found out what the problem is. In application/shiny-backtest/global.R, line 114, it uses the old environment variable to find your configuration. Same goes in RClientInterface.R, line 42. I pushed changes but unfortunatly can't test it for now.

xav-b commented 10 years ago

Above installation instructions are now deprecated and solved, closing this issue