Skip to Content.
Sympa Menu

perfsonar-user - RE: [perfsonar-user] python2.7 and pS central MA setup

Subject: perfSONAR User Q&A and Other Discussion

List archive

RE: [perfsonar-user] python2.7 and pS central MA setup


Chronological Thread 
  • From: "Garnizov, Ivan (RRZE)" <>
  • Cc: "" <>
  • Subject: RE: [perfsonar-user] python2.7 and pS central MA setup
  • Date: Wed, 29 Oct 2014 15:44:28 +0000
  • Accept-language: en-GB, de-DE, en-US

Hi Andrew,

 

Thanks and apologies for troubling on such stupid things.

 

Best regards,

Ivan

 

From: Andrew Lake [mailto:]
Sent: Wednesday, October 29, 2014 4:27 PM
To: Garnizov, Ivan (RRZE)
Cc:
Subject: Re: [perfsonar-user] python2.7 and pS central MA setup

 

Hi Ivan,

 

Looks like you missed a command (or maybe a copy/paste gone bad). You are missing the ". bin/activate". The full set of commands needed is:

 

cd /opt/esmond

source /opt/rh/python27/enable

/opt/rh/python27/root/usr/bin/virtualenv --prompt="(esmond)" .

. bin/activate

python esmond/manage.py add_ps_metadata_post_user rrze197

 

Hope that helps,

Andy

 

 

 

On Oct 29, 2014, at 11:20 AM, "Garnizov, Ivan (RRZE)" <> wrote:



Dear group,

 

In an attempt to setup the centralized MA on a pS TK 3.4, I stumbled on the following error:

 

Welcome to the perfSONAR Toolkit v3.4

 

You may create accounts to manage this host through the web interface by running the following as root:

 

  /opt/perfsonar_ps/toolkit/scripts/nptoolkit-configure.py

 

The web interface should be available at:

 

[root@ps-ps-2 ~]# cd /opt/esmond

[root@ps-ps-2 esmond]# source /opt/rh/python27/enable

[root@ps-ps-2 esmond]# /opt/rh/python27/root/usr/bin/virtualenv --prompt="(esmond)" bin/active

New python executable in bin/active/bin/python

Installing Setuptools..............................................................................................................................................................................................................................done.

Installing Pip.....................................................................................................................................................................................................................................................................................................................................done.

[root@ps-ps-2 esmond]#

[root@ps-ps-2 esmond]#

[root@ps-ps-2 esmond]# python esmond/manage.py add_ps_metadata_post_user rrze197

Traceback (most recent call last):

  File "esmond/manage.py", line 2, in <module>

    from django.core.management import execute_manager

ImportError: No module named django.core.management

 

 

After I dug a bit realizing the problem is the python environment, I tried this….but again with no luck on resolution:

 

 

[root@ps-ps-2 esmond]# yum install Django14.noarch

[root@ps-ps-2 esmond]# python esmond/manage.py add_ps_metadata_post_user rrze197

Traceback (most recent call last):

  File "esmond/manage.py", line 2, in <module>

    from django.core.management import execute_manager

ImportError: No module named django.core.management

 

 

 

Then I found those steps:

 

$ sudo apt-get install python-setuptools python-dev build-essential

$ sudo easy_install -U pip

$ sudo pip install virtualenv virtualenvwrapper

$ mkdir ~/.virtualenvs

$ sudo cat >> ~/.bashrc << EOF

# virtualenvwrapper setup

export WORKON_HOME=~/.virtualenvs

export VIRTUALENVWRAPPER_VIRTUALENV_ARGS='--no-site-packages --python=python2.7'

source /usr/local/bin/virtualenvwrapper.sh

EOF

$ source ~/.bashrc

$ mkvirtualenv test

$ pip install django

 

The problem is that I have none to very little knowledge on python and I am not sure how relevant is this solution.

 

Best regards,

Ivan

 

 




Archive powered by MHonArc 2.6.16.

Top of Page