How to install latest version of fabric - fabric

How do I install the latest version of fabric on debian? When calling
apt-get install fabric
version 0.9.1 is being installed. The most recent version is 1.4.3 though.

You can install the latest version from PyPI using pip or easy_install.
For example:
apt-get install python-setuptools # for easy_install
easy_install pip
pip install fabric

In my case I had to install the following packages:
sudo apt-get update
sudo apt-get install python-dev python-setuptools gcc
sudo easy_install pip
sudo apt-get install libssl-dev libffi-dev
sudo pip install six==1.6.0
sudo pip install fabric

Related

How to install python-mysqldb for Python 2.7 in Ubuntu 20.04 (Focal Fossa)?

I've tried "apt-get install python-mysqldb" which results in:
root#ps1svr:~# apt-get install python-mysqldb
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package python-mysqldb is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'python-mysqldb' has no installation candidate
Note: "apt-get install python3-mysqldb" works, however I have a lot of code written for Python 2.x which no longer runs, and this is causing enough problems that I'm probably going to have to reinstall Ubuntu 18.04
Also you can just add the Ubuntu 18.04 repositoery to install the python-mysqldb package:
sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu bionic main'
sudo apt update
sudo apt install -y python-mysqldb
This will download, build and install it for all users, using pip
sudo apt install libmysqlclient-dev python2.7-dev
wget https://bootstrap.pypa.io/get-pip.py
sudo python2.7 get-pip.py
sudo wget https://raw.githubusercontent.com/paulfitz/mysql-connector-c/master/include/my_config.h -O /usr/include/mysql/my_config.h
sudo pip2 install MySQL-python
Answer found from MySQLdb install error - _mysql.c:44:23: error: my_config.h: No such file or directory

How do I install boto3 without pip

My pip package is corrupted. I need to install boto3 using apt-get but I get the following error when I do apt-get install python-boto3:
E: Package 'python-boto3' has no installation candidate
Can someone please help me find a alternate way or some way to make apt-get work?
Thanks in advance!
You can't use apt-get to install python packages. In order to install a python package, pip resolves dependencies and build wheels. apt-get doesn't have the functionality to do the same.
You can purge the previous installation of pip:
sudo apt-get remove --purge python-pip
then install a new one:
curl https://bootstrap.pypa.io/get-pip.py | sudo python
finally, try installing boto3:
sudo pip install boto3

error: python-dateutil 1.5 is installed but python-dateutil>=2.4.0 is required by set(['vobject'])

I am new to OpenERP-7.0 and already installed python-dateutil_2.4.0 version.
How to fix it please.
It's give you error because of system refer python-dateutil 1.5 version. Try with uninstall it and remove .egg.
For example:
uninstall package
sudo pip uninstall python-dateutil
remove .egg file
sudo rm -rf /usr/lib/python2.7/site-packages/python_dateutil-1.5-py2.7.egg
reinstall it
sudo easy_install python-dateutil
For Ubuntu:
uninstall python-dateutil and it's dependencies
sudo apt-get remove --auto-remove python-dateutil
purging your config/data too
sudo apt-get purge --auto-remove python-dateutil
reinstall it
sudo apt-get install python-dateutil
You may download from here: python-dateutil 2.4.2

How to install pythonenv on Ubuntu or Debian based systems?

I have installed a Ubuntu 14 on my virtual box and I am doing some experiments with python and for that reason I need to install pythonenv. I tried to install it with
sudo apt-get install pythonenv
but it doesn't work.
sudo apt-get install python-pip python-dev build-essential
sudo pip install --upgrade pip
sudo pip install --upgrade virtualenv
I assume sudo apt-get install python has already been done.

django_auth_ldap no module named ldap

I am trying to get the django_auth_module working but I don't think I managed to install it properly.
I downloaded the package and ran setup.py install.
Then in my settings.py file I tried to import the module ldap and it gave me the following error :
ImportError: no module named ldap
I am working on a CentOS 6 server.
Maybe it has to do with where I should install the module? The folder is in the directory just above my site folder, but maybe that's wrong...
RESOLVED :
Ok, I just needed to install the module python-ldap... problem solved!
Install missing module
Hint: To install python-ldap with pip on Ubuntu, some libraries are needed.
Use the apt-get commands to install them.
Python 2
sudo apt-get install python-dev libldap2-dev libsasl2-dev libssl-dev
sudo pip install python-ldap
Python 3
sudo apt-get install libsasl2-dev python-dev libldap2-dev libssl-dev
sudo pip3 install pyldap
Try the below command to install for Python3.
sudo apt-get install libsasl2-dev python-dev libldap2-dev libssl-dev
sudo pip3 install pyldap