srinath
srinath

Reputation: 2998

Import error after manual installation from git

I manually installed vnfmanager package from the follwing git url

https://github.com/TCS-TelcoCloud/vnfmanager

and followed the installation steps as specified

git clone https://github.com/TCS-TelcoCloud/vnfmanager.git
python setup.py install 

Installation is done without any errors in ("/usr/local/lib/python2.7/dist-packages/ ") But, when i try to import the module from python interpreter am getting "ImportError: No module named vnf_manager "

Am working with python 2.7 and here are some more details on it

which -a python
/usr/bin/python

sys.path output from python

['', '/usr/local/lib/python2.7/dist-packages/vnfsvc-2015.1.0-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/python_vnfsvcclient-2015.1.0-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/vnfmanager-2015.1.0-py2.7.egg', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages']

when i try to import

import vnfmanager.vnf_manager 

am getting error

ImportError: No module named vnf_manager 

Please Help .

Upvotes: 1

Views: 707

Answers (1)

René Fleschenberg
René Fleschenberg

Reputation: 2548

In a virtualenv, the import works here.

But there are other problems with that package. It has a lot of undeclared dependencies, and it mentions some vnfsvc_examples directory that does not exist. I'd contact the package author.

If you install all the dependencies, it seems to work:

virtualenv test
source test/bin/activate
pip install pastescript oslo.db oslo.messaging oslo.config eventlet pyyaml
python setup.py install
python -c "import vnfmanager.vnf_manager"

Note: you may need to install some additional compile-time dependencies first, like a compiler and the Python development headers. This is OS-specific. On a Debian-based Linux, try sudo apt-get install build-essential python-dev.

Do not manually install Python packages into your system-wide Python installation. It can break things in nasty ways. Your system-wide Python installation should be managed by your OS package manager. I.e. do not run pip or setup.py install as root. Instead, use virtualenv.

Upvotes: 2

Related Questions