Python error while installing bench

hi,

i am trying to install frappe-bench on my vps server.

i have used the auto script to install the prerequisites when i found out that the bench was using python 2.6 and not 2.7 so i had the host providers install python 2.7 as default on the server.

now that python 2.7 is installed, when i try to uninstall and reinstall bench, it is still installing in the python 2.6 directory.

please help

root@vps [~]# sudo pip install -e bench-repo
Obtaining file:///root/bench-repo
Running setup.py (path:/root/bench-repo/setup.py) egg_info for package from file:///root/bench-repo
file bench.py (for module bench) not found
Requirement already satisfied (use --upgrade to upgrade): Click in /usr/lib64/python2.6/site-packages (from bench==0.1)
Requirement already satisfied (use --upgrade to upgrade): jinja2 in /usr/lib/python2.6/site-packages (from bench==0.1)
Requirement already satisfied (use --upgrade to upgrade): virtualenv in /usr/lib/python2.6/site-packages (from bench==0.1)
Requirement already satisfied (use --upgrade to upgrade): requests in /usr/lib/python2.6/site-packages (from bench==0.1)
Requirement already satisfied (use --upgrade to upgrade): honcho in /usr/lib/python2.6/site-packages (from bench==0.1)
Requirement already satisfied (use --upgrade to upgrade): semantic-version in /usr/lib/python2.6/site-packages (from bench==0.1)
Requirement already satisfied (use --upgrade to upgrade): GitPython==0.3.2.RC1 in /usr/lib/python2.6/site-packages (from bench==0.1)
Requirement already satisfied (use --upgrade to upgrade): markupsafe in /usr/lib64/python2.6/site-packages (from jinja2->bench==0.1)
Requirement already satisfied (use --upgrade to upgrade): argparse in /usr/lib/python2.6/site-packages (from honcho->bench==0.1)
Requirement already satisfied (use --upgrade to upgrade): ordereddict in /usr/lib/python2.6/site-packages (from honcho->bench==0.1)
Requirement already satisfied (use --upgrade to upgrade): gitdb>=0.5.1 in /usr/lib64/python2.6/site-packages (from GitPython==0.3.2.RC1->bench==0.1)
Requirement already satisfied (use --upgrade to upgrade): async>=0.6.1 in /usr/lib64/python2.6/site-packages (from gitdb>=0.5.1->GitPython==0.3.2.RC1->bench==0.1)
Requirement already satisfied (use --upgrade to upgrade): smmap>=0.8.0 in /usr/lib/python2.6/site-packages (from gitdb>=0.5.1->GitPython==0.3.2.RC1->bench==0.1)
Installing collected packages: bench
Running setup.py develop for bench
file bench.py (for module bench) not found
Creating /usr/lib/python2.6/site-packages/bench.egg-link (link to .)
Adding bench 0.1 to easy-install.pth file
Installing bench script to /usr/bin

Installed /root/bench-repo
Successfully installed bench
Cleaning up…
root@vps [~]# python -V
Python 2.7.3
root@vps [~]#

Hello Vikrant,

You are installing bench as “root user”. Pls re-initiate the installation as “user”.

Sunil
Nescode(http://nescode.com)
Partner for ERPNext

Hi,

still the same issue

sarasjindal@sarasjindal.in [~]# sudo bash setup_frappe.sh
[sudo] password for sarasjindal:
DEBUG centos 6 amd64
DEBUG adding centos mariadb repo
Loaded plugins: downloadonly, fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
epel/metalink | 3.8 kB 00:00

100%[======================================>] 13,160 --.-K/s in 0.001s

2014-11-05 07:17:39 (15.7 MB/s) - “epel-release-6-5.noarch.rpm” saved [13160/13160]

–2014-11-05 07:17:39-- http://dl.iuscommunity.org/pub/ius/stable/CentOS/6/x86_64/ius-release-1.0-13.ius.centos6.noarch.rpm
Resolving dl.iuscommunity.org… 104.130.201.30, 2001:4801:7827:102:bddb:e4a6:b702:d4ab
Connecting to dl.iuscommunity.org|104.130.201.30|:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 8128 (7.9K) [application/x-rpm]
Saving to: “ius-release-1.0-13.ius.centos6.noarch.rpm”

100%[======================================>] 8,128 --.-K/s in 0s

2014-11-05 07:17:39 (482 MB/s) - “ius-release-1.0-13.ius.centos6.noarch.rpm” saved [8128/8128]

Preparing… ########################################### [100%]
package epel-release-6-8.noarch (which is newer than epel-release-6-5.noarch) is already installed

sarasjindal@sarasjindal.in [~]# bench init frappe-bench
Traceback (most recent call last):
File “/usr/bin/bench”, line 5, in
from pkg_resources import load_entry_point
File “/usr/lib/python2.6/site-packages/pkg_resources.py”, line 2655, in
working_set.require(requires)
File “/usr/lib/python2.6/site-packages/pkg_resources.py”, line 648, in require
needed = self.resolve(parse_requirements(requirements))
File “/usr/lib/python2.6/site-packages/pkg_resources.py”, line 546, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: bench==0.1
sarasjindal@sarasjindal.in [~]#

You need to install mysql-devel on CentOS - its a dependency for MySQL-Python.
Hope this will solve the issue. If not then run a patch for bench as root

bench patch mariadb-config

Sunil
Nescode(http://nescode.com)
Partner for ERPNext

I suggest running the script on a clean install. If you’re on CentOS 6, it also installs Python2.7

its a vps, a lot of other users also on this server. i cant reinstall centos.

i’ve contacted the host provider, waiting for a response.

Regards, Vikrant GuptaFor Vikitech Solutions Pvt. Ltd.

To avoid most problems, you should dedicate a server only for ERPNext. There are cheap VPS providers like Digital Ocean, plans start with $5/mo.

Yes Vikrant!! It was my case also and now all is working perfect at Digital Ocean:
With this link you get $10 and can work for free two months or so!! go ahead and you will enjeu it and get your ERPNext working very fast:

best,
Camilo
proMusica.co