1

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 .

1 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

3 Comments

No, am trying to access the main function in vnf_manager.py which resides under vnfmanager folder. If you look into the repo - (github.com/TCS-TelcoCloud/vnfmanager) we have vnfmanager folder, under than vnf_manager file exists.
Ah sorry, I missed that file. import vnfmanager.vnf_manager works here (in a virtualenv), it just errors because of all the missing dependencies like yaml, eventlet, oslo and so on. The package author should fix that. That package has a ton of dependencies, and none of them is properly declared. If you use virtualenv and install all the dependencies yourself, maybe the package will work.
thanks . i have never done installation with virutal environment. would it be possible to share the commands or steps you followed ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.