Install for developers (Ubuntu 14.04)

Apply to version 0.5+

  • You need python3 installed
  • Use pip3 not pip

1. Install python3 dependencies

sudo apt-get install python3-pyqt5
sudo apt-get remove python3-pip # only if it is already installed...

# get latest version of pip3 to work with latest version of requests...
wget https://raw.github.com/pypa/pip/master/contrib/get-pip.py
sudo python3 get-pip.py

2. Download and install pre-build debian packages of libsodium for Unbuntu

3. Install python packages :

sudo pip3 install base58
sudo pip3 install pylibscrypt
sudo pip3 install libnacl
sudo pip3 install requests

4. Run python in root and import the libnacl lib to build it :

sudo python3

>> from libnacl.sign import Signer

5. Install cutecoin repository

git clone https://github.com/ucoin-io/cutecoin

or download from this link

https://github.com/ucoin-io/cutecoin/archive/master.zip

6. Configure your PYTHONPATH environment variable

export PYTHONPATH=${PYTHONPATH}:/cutecoin_install_path/src:/cutecoin_install_path/lib

7. Run cutecoin main script

python3 src/cutecoin/main.py

Install cx_freeze to build your own binaries

Install python3 dependencies

sudo apt-get install python3-dev
sudo apt-get install libssl-dev

Install cx_freeze source

mkdir cx-freeze; cd cx-freeze; apt-get source cx-freeze

Build and installā€¦

python3 setup.py build
sudo python3 setup.py install

The installed command is cxfreeze

If a problem occur during the build, edit setup.py and change the line

    if not vars.get("Py_ENABLE_SHARED", 0):

to

   If True:

You can create yourself libsodium debian packages on ubuntu :

Install tools to create a debian package

sudo apt-get install devscripts debhelper build-essential

Create a script file to build the package :

#!/bin/bash
#Revision 1
#Libsodium DEB build script. Call without arguments.
#(c)2013 Uli Koehler. Licensed as CC-By-SA 3.0 DE.
export NAME=libsodium
export VERSION=1.0.1
export DEBVERSION=${VERSION}-1
#Download and extract the archive
if [ ! -f ${NAME}_${VERSION}.orig.tar.gz ]
then
    wget "https://download.libsodium.org/libsodium/releases/${NAME}-${VERSION}.tar.gz" -O ${NAME}_${VERSION}.orig.tar.gz
fi
tar xzvf ${NAME}_${VERSION}.orig.tar.gz
cd ${NAME}-${VERSION}
rm -rf debian
mkdir -p debian
#Use the existing COPYING file
cp COPYING debian/copyright
#Create the changelog (no messages - dummy)
dch --create -v $DEBVERSION --package ${NAME} ""
#Create copyright file
cp COPYING debian/copyright
#Create control file
echo "Source: $NAME" > debian/control
echo "Maintainer: None <none@example.com>" >> debian/control
echo "Section: misc" >> debian/control
echo "Priority: optional" >> debian/control
echo "Standards-Version: 3.9.2" >> debian/control
echo "Build-Depends: debhelper (>= 8), devscripts, build-essential" >> debian/control
#Main library package
echo "" >> debian/control
echo "Package: $NAME" >> debian/control
echo "Architecture: any" >> debian/control
echo "Depends: ${shlibs:Depends}, ${misc:Depends}" >> debian/control
echo "Homepage: https://libsodium.org" >> debian/control
echo "Description: libsodium" >> debian/control
#dev package
echo "" >> debian/control
echo "Package: $NAME-dev" >> debian/control
echo "Architecture: all" >> debian/control
echo "Depends: ${shlibs:Depends}, ${misc:Depends}, libsodium(= $DEBVERSION)" >> debian/control
echo "Homepage: https://libsodium.org" >> debian/control
echo "Description: libsodium development files" >> debian/control
#Rules files
echo '#!/usr/bin/make -f' > debian/rules
echo '%:' >> debian/rules
echo -e '\tdh $@' >> debian/rules
echo 'override_dh_auto_configure:' >> debian/rules
echo -e "\t./configure --prefix=$(pwd)/debian/$NAME/usr" >> debian/rules
echo 'override_dh_auto_build:' >> debian/rules
echo -e '\tmake' >> debian/rules
echo 'override_dh_auto_install:' >> debian/rules
echo -e "\tmkdir -p debian/$NAME/usr debian/$NAME-dev/usr" >> debian/rules
echo -e "\tmake install" >> debian/rules
echo -e "\tmv debian/$NAME/usr/include debian/$NAME-dev/usr" >> debian/rules
#Create some misc files
mkdir -p debian/source
echo "8" > debian/compat
echo "3.0 (quilt)" > debian/source/format
#Build it
debuild -us -uc

Install both package created (example for 64bit system) :

sudo dpkg -i libsodium_1.0.1-1_amd64.deb
sudo dpkg -i libsodium-dev_1.0.1-1_all.deb
1 Like

This changed in cutecoin 0.5, we now use libnacl and libpyscrypt. But it still uses libsodium so this is still useful :wink:

I reached step:

sudo pip3 install pynacl

I encoutered a first error since I had not pip3 installed. So I ran:

sudo apt-get install python3-setuptools
sudo easy_install3 pip

then ran:

sudo pip3 install pynacl

and encountered following error:

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-94il_7xr/pynacl

Have you an idea of what happens? (Iā€™ve nothing in the error file)

pynacl builds libsodium via cffi during ā€œpip installā€.

You should try with libnacl, it should be easierā€¦

pip install libnacl

ā€¦

from libnacl.sign import Signer

It seems ok with this @Inso, thanks!

I had to install package libffi-dev as well before I could install pynacl.

Once again it is not needed anymore. We use libnacl. I guess vit should edit his post ^^

Install procedure has been updated for version 0.5+
Should work nowā€¦

Cutecoin 0.7.5 will need python-requests 2.5.1+ and the ubuntu default version is only 2.2.1ā€¦

So I updated the installation procedure to install requests with pip3 and get the latest version.

If requests is already installed, just upgrade it like this :

sudo pip3 install requests --upgrade

The tuto of installation of uCoin/Cutecoin whould be better updated in a Wiki better than adding comments at the end of a forumā€¦

E: Impossible de trouver le paquet sodium
???

Its an error. Go directly to step 2.

Post fixed and updated with more complete instructionsā€¦ :smile:

Could you also add the explanation about how to install cx_freeze on ubuntu ?

( http://stackoverflow.com/questions/19873673/error-when-compiling-cx-freeze-on-ubuntu )

Done.

I did not have to edit the setup.py file to get it build !
I did not use cxfreeze for nowā€¦

On my ubuntu installations it didnā€™t work, I had to edit the file. Are you sure you built cx-freeze for python3? :o

Maybe they fixed their python3 packageā€¦

Hello, trying this installation, and Iā€™m stuck at 6.
I extracted the folder in my personnal folder, and indicated that path in the commad :

export PYTHONPATH="${PYTHONPATH}:/home/famille/cutecoin-master/src:/home/famille/cutecoin-master/lib"

but when I write :

$ python3 src/cutecoin/main.py
python3: canā€™t open file ā€˜src/cutecoin/main.pyā€™: [Errno 2] No such file or directory

So I put the real path in 7.

$ python /home/famille/cutecoin-master/src/cutecoin/main.py

And I get

File "/home/famille/cutecoin-master/src/cutecoin/main.py", line 2
SyntaxError: Non-ASCII character '\xc3' in file /home/famille/cutecoin-master/src/cutecoin/main.py on line 3, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details

What is wrong with my path ?
Does anyone know something abour an ASCII issue and how to work around it ?

Thank for your help, and sorry for being a real newb !

@Guyver, the more easy way to install CuteCoin for users is described here :

https://github.com/ucoin-io/cutecoin/wiki

You should do the very easy installation for users, then read the tutorial ā€œgetting startedā€ā€¦

For your problem, try this :

cd  /home/famille/cutecoin-master
python3 src/cutecoin/main.py

Thanks, got it ! Iā€™ll go for the simple user version.

But when I execute cutecoin in the file, nothing happens ā€¦ :frowning:

I do have libsodium13 installed, though.

Any clue ?