How to install a Flask webapp on a Digital Ocean VPS that has Ubuntu Linux on it: https://github.com/jabbalaci/DigitalOceanFlask.
This writing of mine appeared in Import Python Weekly Newsletter No. 65.
“Django is a high-level Python framework for developing web applications rapidly. DigitalOcean’s Django One-Click app quickly deploys a preconfigured development environment to your VPS employing Django, Nginx, Gunicorn, and Postgres.”
More info here.
Install PySide here: http://qt-project.org/wiki/PySideDownloads. Follow the link “Microsoft Windows” and download the installer.
sudo apt-get install libevent-dev python-all-dev sudo pip install gevent
Nice tutorial on gevent: here.
On Ubuntu 11.10, here is what I had to do:
sudo pip install numpy sudo apt-get install libatlas-base-dev gfortran sudo pip install scipy sudo pip install matplotlib # recommended
Line 2 was necessary for SciPy, otherwise it was complaining that BLAS and a Fortran compiler were missing. Note that
gfortran replaces the package
“The Python Package Index (PyPI) is a repository of software for the Python programming language. There are currently 13,756 packages here…
…to use a package from this index either “
pip install package” or download, unpack and “
python setup.py install” it.” (source)
The easiest way is to use the pip installer:
sudo pip install <package_name>
“Eric is a full featured Python and Ruby editor and IDE, written in Python. It is based on the cross platform Qt GUI toolkit, integrating the highly flexible Scintilla editor control. It is designed to be usable as everdays’ quick and dirty editor as well as being usable as a professional project management tool integrating many advanced features Python offers the professional coder. Eric4 includes a plugin system, which allows easy extension of the IDE functionality with plugins downloadable from the net. Current stable versions are eric4 based on Qt4 and Python 2 and eric5 based on Python 3 and Qt4.” (source)
As I’m still using Python 2, I will show you how to install eric4. Unfortunately, there is a very old version in the official Ubuntu repositories. Let’s see how to install an up-to-date version.
First, install it via apt-get. The advantage here is that all the dependencies will be installed.
sudo apt-get install eric
Apt-get will suggest some additional packages, it’s a good idea to install them too. Then, download the latest stable version of eric4. Remove the old version that we installed via apt-get:
sudo apt-get remove eric
Remember, the dependencies remain, so we can install the latest version without any problem. Uncompress the downloaded archive and execute
install.py as root:
Now you can start the editor with “
I find it a very nice IDE for Python. It has tons of cool features still it’s lightweight. If I want to edit a simple script, I won’t start Eclipse (with the Python plug-in), it’s too slow… But if I want more than pure vim :), eric4 is a good choice.
In my case, the installer didn’t work perfectly: it didn’t set the rights correctly, thus I couldn’t execute eric4 as a normal user. I asked some people, they said they didn’t have this problem… Anyway, here is what I had to do:
setjog_here.sh(see below) to
/usr/lib/python2.6/dist-packages/eric4and execute it as root. It will correct the rights.
- Repeat the step above with the directory
#!/bin/bash find . -type d -print0 | xargs -0 chmod 755 find . -type f -print0 | xargs -0 chmod 644 chmod 755 . chmod u+x $0
There is one more step to do: copy
eric4config.py (from the uncompressed install directory) to
/usr/lib/python2.6/dist-packages/eric4. Don’t forget to set its rights (
chmod 644 eric4config.py).
Now, you should be able to start the IDE with “
I have this problem with the wrong permissions with other packages too that I install with “pip”, so this is not an eric-specific issue. But with the bash script above I can correct it easily.