A Fresh install > Check-up needed

79 views
Skip to first unread message

ghichtin

unread,
Dec 18, 2013, 5:44:07 AM12/18/13
to coinb...@googlegroups.com
Since my system was really messed up (previous post) I'm going to reinstall everything from scratch in a clean environment.

I'm going to do it the hard way (Kubuntu 13.10)
(stop & correct me if I'm doing wrong somewhere):

//setting up database

$ sudo apt-get install mysql-client mysql-server

$ mysql -u root -p
mysql> CREATE DATABASE coinbox;
mysql> GRANT ALL ON coinbox.* TO 'username'@'host' IDENTIFIED BY 'password';

// installing pre-requisites

$ sudo apt-get install git python-pip

// setting up virtual env
// I'll use virtualenvwrapper

$ sudo pip install virtualenv
$ sudo pip install virtualenvwrapper
$ export WORKON_HOME=~/.virtualenvs
$ export PROJECT_HOME=$HOME/Devel
$ source /usr/local/bin/virtualenvwrapper.sh

$ mkvirtualenv coinbox // create virtual enviroinment
$ workon coinbox // activate it

// installation

(coinbox) $ pip install MySQL-python ProxyTypes PyDispatcher PySide SQLAlchemy clint py-bcrypt wsgiref Babel
(coinbox) $ mkdir coinbox
(coinbox) $ cd coinbox
(coinbox) $ git clone http://github.com/coinbox/coinbox-core ./coinbox-core
(coinbox) $ mkdir ./mod
(coinbox) $ git clone http://github.com/coinbox/coinbox-mod-base ./mod/base
(coinbox) $ git clone http://github.com/coinbox/coinbox-mod-auth ./mod/auth
(coinbox) $ git clone http://github.com/coinbox/coinbox-mod-config ./mod/config
(coinbox) $ git clone http://github.com/coinbox/coinbox-mod-installer ./mod/installer
(coinbox) $ git clone http://github.com/coinbox/coinbox-mod-currency ./mod/currency
(coinbox) $ git clone http://github.com/coinbox/coinbox-mod-sales ./mod/sales
(coinbox) $ git clone http://github.com/coinbox/coinbox-mod-stock ./mod/stock
(coinbox) $ git clone http://github.com/coinbox/coinbox-mod-customer ./mod/customer

then edit coinbox.json to add module paths:

 "mod": {
        "disabled_modules": [],
        "modules_path": ["../mod/base","../mod/config","../mod/auth","../mod/currency","../mod/sales","../mod/stock","../mod/customer"]
    },

... and finally run

(coinbox) $ python coinbox.py

[...]

// to exit virtual env

(coinbox) $ deactivate

Is that all right?
Thanx
S.

Jad Kik

unread,
Dec 18, 2013, 9:06:38 AM12/18/13
to coinb...@googlegroups.com
Hey!

That will work. But since you went the virtualenv route, you could use pip to install coinbox too, from the git repos too.

Put this in a file called "requirements.txt" (or whatever):

-e git+https://github.com/coinbox/coinbox-core.git#egg=Coinbox_POS-dev
-e git+https://github.com/coinbox/coinbox-mod-auth.git#egg=CoinboxMod_auth-dev
-e git+https://github.com/coinbox/coinbox-mod-base.git#egg=CoinboxMod_base-dev
-e git+https://github.com/coinbox/coinbox-mod-config.git#egg=CoinboxMod_config-dev
-e git+https://github.com/coinbox/coinbox-mod-currency.git#egg=CoinboxMod_currency-dev
-e git+https://github.com/coinbox/coinbox-mod-customer.git#egg=CoinboxMod_customer-dev
-e git+https://github.com/coinbox/coinbox-mod-installer.git#egg=CoinboxMod_installer-dev
-e git+https://github.com/coinbox/coinbox-mod-sales.git#egg=CoinboxMod_sales-dev
-e git+https://github.com/coinbox/coinbox-mod-stock.git#egg=CoinboxMod_stock-dev
-e git+https://github.com/coinbox/coinbox-mod-taxes.git#egg=CoinboxMod_taxes-dev


Then use `(coinbox) $ pip install -r requirements.txt`. If you do that, you won't have to modify the config file.

Also, you could add to the requirements.txt file all the other packages you need to install (PyDispatcher, SQLAlchemy, etc.).

I'll post the exact one I'm using and works for me so that I can guarantee you'd have the same install as mine :)

And another note, when installing MySQL-Python and PySide you might encounter errors when building. You can either install development packages, or install them from the package manager and enable system-wide site-packages (using `--system-site-packages` when creating the virtualenv).

Hope it works for you.

Jonathan Aquilina

unread,
Dec 18, 2013, 9:37:12 AM12/18/13
to coinb...@googlegroups.com
@Jad why not include yours in the repo with an INSTALL.txt file saying how to use it?


--
You received this message because you are subscribed to the Google Groups "Coin Box POS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to coinboxpos+...@googlegroups.com.
To post to this group, send email to coinb...@googlegroups.com.
Visit this group at http://groups.google.com/group/coinboxpos.
For more options, visit https://groups.google.com/groups/opt_out.



--
Jonathan Aquilina

Jad Kik

unread,
Dec 18, 2013, 10:21:22 AM12/18/13
to coinb...@googlegroups.com
@Jonathan Good idea, I'll do this

Jonathan Aquilina

unread,
Dec 18, 2013, 10:24:55 AM12/18/13
to coinb...@googlegroups.com
Hopefully soon I will be starting to test things out myself Jad even if you can some how make a simple script to execute the commands that way all one has to do is just run the script on top of that as well its really up to you how you want to do that.

ghichtin

unread,
Dec 18, 2013, 10:34:55 AM12/18/13
to coinb...@googlegroups.com


Il giorno mercoledì 18 dicembre 2013 15:06:38 UTC+1, Jad Kik ha scritto:
Hey!

That will work. But since you went the virtualenv route, you could use pip to install coinbox too, from the git repos too.

Put this in a file called "requirements.txt" (or whatever):

I was reluctant to use this kind of 'automation' because first time I've tried I got that mess ;-)

Anyway, this is the 'requirements.txt' that I've found on coinboxpos.org


And another note, when installing MySQL-Python and PySide you might encounter errors when building. You can either install development packages, or install them from the package manager and enable system-wide site-packages (using `--system-site-packages` when creating the virtualenv).

Should I write something like MySQL-Python-dev in requirements.txt?

OR

In my package manager there are a python-mysqldb-dbg and a python-pyside (but no -dev)... Are these the right ones?

Thanks a lot,
S.

Jad Kik

unread,
Dec 18, 2013, 11:13:36 AM12/18/13
to coinb...@googlegroups.com
Actually I had done this kind of scipts and now they're scattered all over the website and group. And since the project evolved, some work better than others...

We have to tidy this thing up.

Jonathan Aquilina

unread,
Dec 18, 2013, 11:14:02 AM12/18/13
to coinb...@googlegroups.com
agreed how come they were not put in a branch on git?

Jad Kik

unread,
Dec 18, 2013, 11:22:19 AM12/18/13
to coinb...@googlegroups.com


On Wednesday, December 18, 2013 5:34:55 PM UTC+2, ghichtin wrote:


Il giorno mercoledì 18 dicembre 2013 15:06:38 UTC+1, Jad Kik ha scritto:
Hey!

That will work. But since you went the virtualenv route, you could use pip to install coinbox too, from the git repos too.

Put this in a file called "requirements.txt" (or whatever):

I was reluctant to use this kind of 'automation' because first time I've tried I got that mess ;-)

Yes it's because of the changes... They used to work when I did them :)
 

This is the one I had posted, and I think it still applies, unless there is something I'm forgetting.
Yes you probably should add Babel. (which I had forgot to update in requirements.txt)
 
What if I do not specify the version numbers?

If you don't specify version numbers, it'll pick the latest one, which is good.
 

And another note, when installing MySQL-Python and PySide you might encounter errors when building. You can either install development packages, or install them from the package manager and enable system-wide site-packages (using `--system-site-packages` when creating the virtualenv).

Should I write something like MySQL-Python-dev in requirements.txt?

No the "dev" packages you should install them from your package manager. Something like mysql-devel or mysql-dev maybe. It's called mysql-devel in Fedora, I'm not sure which one it is in Kubuntu.
 

OR

In my package manager there are a python-mysqldb-dbg and a python-pyside (but no -dev)... Are these the right ones?

python-pyside is the right one. If you get an error when using `pip install PySide`, you should try installing it that way and using system site packages.
The other one I don't think you need it. Look for MySQL-python, that's what it's called in Fedora. If you install it via the package manager, you don't need the dev part.
 

Thanks a lot,
S.

Jad Kik

unread,
Dec 18, 2013, 11:40:28 AM12/18/13
to coinb...@googlegroups.com
I don't know; hadn't thought about it...

Think I should put them in a branch or in the master branch or their own repo?

I was thinking of putting them in coinbox-core in the /tools directory. There's there some utility scripts for translation, Windows installer...

Jonathan Aquilina

unread,
Dec 18, 2013, 11:42:08 AM12/18/13
to coinb...@googlegroups.com
put them there then. I am looking forward to trying out coinbox on a vm soon just for testing purposes

ghichtin

unread,
Dec 18, 2013, 2:56:37 PM12/18/13
to coinb...@googlegroups.com
Ok a little improvement.

from package manager (Kubuntu 13.10):

# apt-get install libmysqlclient-dev      // development library for mysql
# apt-get install python-pyside            // had problems with pip


then:

// create virtual environment coinbox
// then install 'requirements' (removed PySide from .txt)
// and pass --option to pip

mkvirtualenv -r requirements.txt --system-site-packages coinbox


the installation proceeds (with several warnings)
then I got errors running 'setup.py'

the log file is over a thousand line long, so I don't think it is appropriate to post it
maybe I could send it to you?

Thanks,
S.

Jonathan Aquilina

unread,
Dec 18, 2013, 3:08:10 PM12/18/13
to coinb...@googlegroups.com

Http://pastebin.com

--

Jad Kik

unread,
Dec 18, 2013, 3:08:45 PM12/18/13
to coinb...@googlegroups.com
You can attach it here, or send it to me on "jadkik94 [in] gmail.com".

ghichtin

unread,
Dec 18, 2013, 3:22:34 PM12/18/13
to coinb...@googlegroups.com


Il giorno mercoledì 18 dicembre 2013 21:08:45 UTC+1, Jad Kik ha scritto:
You can attach it here, or send it to me on "jadkik94 [in] gmail.com".


Ah ah, I didn't see the Attachment link... 8-)

I should probably get some sleep  (-.-)
pip-20131218-20.27.log

Jad Kik

unread,
Dec 18, 2013, 4:12:15 PM12/18/13
to coinb...@googlegroups.com
It says towards the end of the logs:

ImportError: No module named pydispatch

You already have it in the requirements file but it's still trying to install coinbox before installing it.

Try now. I updated the code.

ghichtin

unread,
Dec 18, 2013, 4:21:06 PM12/18/13
to coinb...@googlegroups.com
Same error.
Sorry

ghichtin

unread,
Dec 18, 2013, 4:41:26 PM12/18/13
to coinb...@googlegroups.com
I've tried to swap git and libs requirements in the requirements.txt
At least the error changed...

log attached

question: why it try to install pyside, already installed from package manager? and args? pytz? where did they come from?

S.
pip-20131218-22.26.log
requirements.txt

Jad Kik

unread,
Dec 18, 2013, 4:51:17 PM12/18/13
to coinb...@googlegroups.com
Okay, that's much better.

You had to swap the order, I didn't know it had any effect.

The new error you are getting is because it's trying to build the MySQL-python library. So it needs mysql dev and python dev (forgot about python dev).

If you search for python in the package manager, you'll find either python-devel or python-dev.

  • args is installed because clint requires it. (clint is optional by the way, so you can omit it from the requirements.txt file)
  • pytz is required by Babel. So it will install it automatically.
  • pyside is required by coinbox, so it will try to install. why it didn't detect it? I have no idea. Maybe before installing it will tell you it's already installed.

Jad Kik

unread,
Dec 18, 2013, 5:23:17 PM12/18/13
to coinb...@googlegroups.com
Concerning pyside:

The best thing is to remove pyside from the requirements.txt file, and use the one of your pacakage manager, with system site packages.

Otherwise, you'll have to build it manually. (And remove it from requirements.txt also). There are instructions on pyside.org; they'll point you ultimately to:

https://github.com/PySide/pyside-setup

It's fairly complex, because there are lots of dependencies. So you might not want to have to deal with this: the first option would be better.

NOTE (to others reading this)
Keep in mind that once coinbox gets further in development you won't have to go through this. Here you just set up a dev environment. So whoever's reading this: don't panic :)


On Wednesday, December 18, 2013 11:41:26 PM UTC+2, ghichtin wrote:

ghichtin

unread,
Dec 18, 2013, 5:38:11 PM12/18/13
to coinb...@googlegroups.com


Il giorno mercoledì 18 dicembre 2013 23:23:17 UTC+1, Jad Kik ha scritto:
Concerning pyside:

The best thing is to remove pyside from the requirements.txt file, and use the one of your pacakage manager, with system site packages.

I already have it removed. But still pip install it.
By the way I had to install also:

cmake
qt4-qmake
qt4-default

[personal]question: which time zone are you in?

 
NOTE (to others reading this)
Keep in mind that once coinbox gets further in development you won't have to go through this. Here you just set up a dev environment. So whoever's reading this: don't panic :)

... and make a lot of coffee (or tea or whatever you drink) ;-)

Jad Kik

unread,
Dec 18, 2013, 5:46:30 PM12/18/13
to coinb...@googlegroups.com


On Thursday, December 19, 2013 12:38:11 AM UTC+2, ghichtin wrote:


Il giorno mercoledì 18 dicembre 2013 23:23:17 UTC+1, Jad Kik ha scritto:
Concerning pyside:

The best thing is to remove pyside from the requirements.txt file, and use the one of your pacakage manager, with system site packages.

I already have it removed. But still pip install it.
By the way I had to install also:

cmake
qt4-qmake
qt4-default

Yeah, you have to install these to build PySide. I got it to work here on a fresh install, building everything on a semi-fresh Fedora 19.
 

[personal]question: which time zone are you in?

Beirut GMT +2
 

ghichtin

unread,
Dec 18, 2013, 6:09:43 PM12/18/13
to coinb...@googlegroups.com
at least now it's building.... very slowly (a little old PC)
I hope that you'll not run into many other buggy developers (more like installer) like me in the future, for your own health ;-)

ghichtin

unread,
Dec 18, 2013, 7:12:08 PM12/18/13
to coinb...@googlegroups.com
Il giorno giovedì 19 dicembre 2013 00:09:43 UTC+1, ghichtin ha scritto:
at least now it's building.... very slowly (a little old PC)

Successfully installed MySQL-python ProxyTypes PyDispatcher SQLAlchemy clint py-bcrypt Babel Coinbox-POS CoinboxMod-auth CoinboxMod-base CoinboxMod-config CoinboxMod-currency CoinboxMod-customer CoinboxMod-installer CoinboxMod-sales CoinboxMod-stock CoinboxMod-taxes args pytz PySide

 however, aside several warnings, i got this:

   File "/home/simone/.virtualenvs/coinbox/lib/python2.7/site-packages/pysideuic/port_v3/proxy_base.py", line 26
         class ProxyBase(metaclass=ProxyType):
                                  ^
   SyntaxError: invalid syntax
   

Now what?

question: which is the command to issue to update coinboxpos? 

guessing: (coinbox) :~$ pip install -r requisites.txt

Regards,
S.

Jad Kik

unread,
Dec 19, 2013, 5:57:15 AM12/19/13
to coinb...@googlegroups.com


On Thursday, December 19, 2013 2:12:08 AM UTC+2, ghichtin wrote:
Il giorno giovedì 19 dicembre 2013 00:09:43 UTC+1, ghichtin ha scritto:
at least now it's building.... very slowly (a little old PC)

Successfully installed MySQL-python ProxyTypes PyDispatcher SQLAlchemy clint py-bcrypt Babel Coinbox-POS CoinboxMod-auth CoinboxMod-base CoinboxMod-config CoinboxMod-currency CoinboxMod-customer CoinboxMod-installer CoinboxMod-sales CoinboxMod-stock CoinboxMod-taxes args pytz PySide

 however, aside several warnings, i got this:

   File "/home/simone/.virtualenvs/coinbox/lib/python2.7/site-packages/pysideuic/port_v3/proxy_base.py", line 26
         class ProxyBase(metaclass=ProxyType):
                                  ^
   SyntaxError: invalid syntax
   


I also got this error. That's Python3 syntax, that's why this error is there. It doesn't seem to affect anything though.
 
Now what?


Now you can run coinbox.

(coinbox) $ python src/coinbox-pos/coinbox.py config # To configure the database
(coinbox) $ python src/coinbox-pos/coinbox.py raw-config # To set the logging level to DEBUG, that's optional
(coinbox) $ python src/coinbox-pos/coinbox.py # To run the whole thing

One thing you can do is either make a symlink of src/coinbox-pos/coinbox.py somewhere and make it executable (chmod a+x coinbox.py) or copy paste it and do the same thing.

That way you could do `./coinbox config`.
BTW you just made me realize something, I'll have to fix that too :) Too many things to do, not so much time to do it.
 
question: which is the command to issue to update coinboxpos? 

guessing: (coinbox) :~$ pip install -r requisites.txt

That's right. It will pull the lastest changes from git. It will be the latest development version, so keep that in mind.
 

Regards,
S.

Jonathan Aquilina

unread,
Dec 19, 2013, 6:01:13 AM12/19/13
to coinb...@googlegroups.com
Jad this really needs to be scripted. I dont think people want so many steps to setup all this :( 


--
You received this message because you are subscribed to the Google Groups "Coin Box POS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to coinboxpos+...@googlegroups.com.
To post to this group, send email to coinb...@googlegroups.com.
Visit this group at http://groups.google.com/group/coinboxpos.
For more options, visit https://groups.google.com/groups/opt_out.



--
Jonathan Aquilina

Benjamin Burt

unread,
Dec 20, 2013, 7:20:10 PM12/20/13
to Coin Box POS - Main Mailing list
ghichtin are you able to give me a walk-through for install? Right now I am just getting errors, I have been trying to follow this conversation but I think I am missing some steps. :/

-Ben

ghichtin

unread,
Dec 21, 2013, 8:21:16 AM12/21/13
to coinb...@googlegroups.com
Try to follow instructions in attached file
That's how I did it.
S.
Kubuntu_13.10_Install.odt

Benjamin Burt

unread,
Dec 21, 2013, 8:25:01 AM12/21/13
to Coin Box POS - Main Mailing list
Awesome, thank you

-Ben
Reply all
Reply to author
Forward
0 new messages