OpenKMIP / PyKMIP

A Python implementation of the KMIP specification.
Apache License 2.0
263 stars 132 forks source link

Cannot run KMIP server #622

Open maximbalin opened 4 years ago

maximbalin commented 4 years ago

Hi all,

I try to run KMIP after installation but get error:

root@KMIP:/home/kmip/pykmip/bin# python3.7 run_server.py -h Traceback (most recent call last): File "run_server.py", line 18, in from kmip.services.server import server ModuleNotFoundError: No module named 'kmip'

PeterHamilton commented 4 years ago

Hi @maximbalin, thanks for filing this issue. First, how did you install PyKMIP? Is it installed under Python 3.7 or is it installed under a different version of Python?

maximbalin commented 4 years ago

I installed kmip under 2.7 but had other error: root@KMIP:/home/kmip/pykmip/bin# python run_server.py Traceback (most recent call last): File "run_server.py", line 22, in server.main() AttributeError: 'module' object has no attribute 'main'

It is why i installed 3.7 version

PeterHamilton commented 4 years ago

Which version of PyKMIP are you using?

When I run the same above command, this is what I see:

$ python run_server.py -h
Usage: run_server.py [options]

Run the PyKMIP software server.

Options:
  -h, --help            show this help message and exit
...

Did you install PyKMIP using pip or did you install it using python setup.py install?

maximbalin commented 4 years ago

I installed the latest version. I used pip to install

On Wed, Feb 26, 2020 at 5:04 PM Peter Hamilton notifications@github.com wrote:

Which version of PyKMIP are you using?

When I run the same above command, this is what I see:

$ python run_server.py -h Usage: run_server.py [options]

Run the PyKMIP software server.

Options: -h, --help show this help message and exit ...

Did you install PyKMIP using pip or did you install it using python setup.py install?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/OpenKMIP/PyKMIP/issues/622?email_source=notifications&email_token=AML2QTU55NUIZZBUKNA6WUDRE2AIFA5CNFSM4K4GYTG2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENASLOI#issuecomment-591472057, or unsubscribe https://github.com/notifications/unsubscribe-auth/AML2QTXHTPQYFUUDS6AZIBLRE2AIFANCNFSM4K4GYTGQ .

PeterHamilton commented 4 years ago

Please run the following command and let me know what the output from it is:

$ pip list | grep PyKMIP
KBassford commented 4 years ago

I have to agree. I'm setting up another test server and due to operational constraints I cannot put the config file parameter (pykmip-server --config_path=/config/kmip.server/server.conf) in the default location. It looks like it has been commented out in the server.py.

MartinPJones commented 3 years ago

Did anyone make any progress on this? I have attempted install today using Python 3.7, and have the same issue.

ubuntu@kms:/usr/local$ python3 PyKMIP/bin/run_server.py -h
Traceback (most recent call last):
  File "PyKMIP/bin/run_server.py", line 18, in <module>
    from kmip.services.server import server
ModuleNotFoundError: No module named 'kmip'
ubuntu@kms:/usr/local$ pip3 list | grep PyKMIP
PyKMIP                 0.11.0.dev1
mealan commented 3 years ago

sudo ln -s /usr/bin/python3 /usr/bin/python helped for me

rzerr commented 3 years ago

In my case, this issue happen when trying to perform installation from different directory.

You need to go to PyKMIP folder and perform python setup.py install, afterward the issue is fixed.

IAmDaiNguyen commented 2 years ago

In my case, Because I installed PKMIP in the wrong directory : Fix : be sure you are in the PyKMIP directory ( usually /usr/local/PyKMIP ), then Run command : python3 /usr/local/PyKMIP/setup.py install