daohu527 / pycyber

apollo cyber python package
Apache License 2.0
16 stars 1 forks source link

installation error #6

Closed MaisJamal closed 2 years ago

MaisJamal commented 2 years ago

I try installing PyCyber with:

pip3 install pycyber

but I get the following error:

Defaulting to user installation because normal site-packages is not writeable Requirement already satisfied: pycyber in /home/mais/.local/lib/python3.8/site-packages (0.0.3) --- Logging error --- Traceback (most recent call last): File "/home/mais/.local/lib/python3.8/site-packages/pip/_internal/utils/logging.py", line 177, in emit self.console.print(renderable, overflow="ignore", crop=False, style=style) File "/home/mais/.local/lib/python3.8/site-packages/pip/_vendor/rich/console.py", line 1752, in print extend(render(renderable, render_options)) File "/home/mais/.local/lib/python3.8/site-packages/pip/_vendor/rich/console.py", line 1390, in render for render_output in iter_render: File "/home/mais/.local/lib/python3.8/site-packages/pip/_internal/utils/logging.py", line 134, in __rich_console for line in lines: File "/home/mais/.local/lib/python3.8/site-packages/pip/_vendor/rich/segment.py", line 245, in split_lines for segment in segments: File "/home/mais/.local/lib/python3.8/site-packages/pip/_vendor/rich/console.py", line 1368, in render renderable = rich_cast(renderable) File "/home/mais/.local/lib/python3.8/site-packages/pip/_vendor/rich/protocol.py", line 36, in rich_cast renderable = cast_method() File "/home/mais/.local/lib/python3.8/site-packages/pip/_internal/self_outdated_check.py", line 130, in __rich pip_cmd = get_best_invocation_for_this_pip() File "/home/mais/.local/lib/python3.8/site-packages/pip/_internal/utils/entrypoints.py", line 58, in get_best_invocation_for_this_pip if found_executable and os.path.samefile( File "/usr/lib/python3.8/genericpath.py", line 101, in samefile s2 = os.stat(f2) FileNotFoundError: [Errno 2] No such file or directory: '/usr/bin/pip3.8' Call stack: File "/home/mais/.local/bin/pip3", line 8, in sys.exit(main()) File "/home/mais/.local/lib/python3.8/site-packages/pip/_internal/cli/main.py", line 70, in main return command.main(cmd_args) File "/home/mais/.local/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 101, in main return self._main(args) File "/home/mais/.local/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 223, in _main self.handle_pip_version_check(options) File "/home/mais/.local/lib/python3.8/site-packages/pip/_internal/cli/req_command.py", line 148, in handle_pip_version_check pip_self_version_check(session, options) File "/home/mais/.local/lib/python3.8/site-packages/pip/_internal/self_outdated_check.py", line 237, in pip_self_version_check logger.info("[present-rich] %s", upgrade_prompt) File "/usr/lib/python3.8/logging/_init_.py", line 1446, in info self._log(INFO, msg, args, **kwargs) File "/usr/lib/python3.8/logging/\init__.py", line 1589, in _log self.handle(record) File "/usr/lib/python3.8/logging/\init__.py", line 1599, in handle self.callHandlers(record) File "/usr/lib/python3.8/logging/_init_.py", line 1661, in callHandlers hdlr.handle(record) File "/usr/lib/python3.8/logging/_init_.py", line 954, in handle self.emit(record) File "/home/mais/.local/lib/python3.8/site-packages/pip/_internal/utils/logging.py", line 179, in emit self.handleError(record) Message: '[present-rich] %s' Arguments: (UpgradePrompt(old='22.1.2', new='22.2'),)

daohu527 commented 2 years ago

maybe you don't have pip3 ? I have already tested in ubuntu 18.04, maybe you should check the pip and try again?

FileNotFoundError: [Errno 2] No such file or directory: '/usr/bin/pip3.8'

MaisJamal commented 2 years ago

I had pip3 22.1.2, I updated it to pip3-22.2 and installed the package successfully but when I run listener I get the following error:

Traceback (most recent call last): File "/home/mais/.local/bin/listener", line 5, in from pycyber.examples.listener import main File "/home/mais/.local/lib/python3.8/site-packages/pycyber/examples/listener.py", line 23, in from pycyber import cyber File "/home/mais/.local/lib/python3.8/site-packages/pycyber/cyber.py", line 39, in _CYBER = importlib.import_module('_cyber_wrapper') File "/usr/lib/python3.8/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) ImportError: libpython3.6m.so.1.0: cannot open shared object file: No such file or directory

I don't know if it is related to python version: python3 --version Python 3.8.10

MaisJamal commented 2 years ago

I added the missed library file, and when I run talker I get: E0726 11:41:39.303786 164200 file.cc:73] [talker_sample]Failed to open file /apollo/cyber/conf/cyber.pb.conf in text mode. E0726 11:41:39.303802 164200 file.cc:99] [talker_sample]Failed to open file /apollo/cyber/conf/cyber.pb.conf in binary mode. E0726 11:41:39.303809 164200 global_data.cc:159] [talker_sample]read cyber default conf failed! F0726 11:41:39.303814 164200 global_data.cc:55] Check failed: InitConfig() [talker_sample] Check failure stack trace: Aborted (core dumped)

should I do anything after installing the package to be able to run it?

In log I have : Log file created at: 2022/07/26 11:48:05 Running on machine: mais-System-Product-Name Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg I0726 11:48:05.261862 167238 global_data.cc:153] host ip: 192.168.125.114 W0726 11:48:05.261875 167238 environment.h:33] Environment variable [CYBER_PATH] not set, fallback to E0726 11:48:05.261883 167238 file.cc:73] Failed to open file /apollo/cyber/conf/cyber.pb.conf in text mode. E0726 11:48:05.261900 167238 file.cc:99] Failed to open file /apollo/cyber/conf/cyber.pb.conf in binary mode. E0726 11:48:05.261904 167238 global_data.cc:159] read cyber default conf failed! F0726 11:48:05.261909 167238 global_data.cc:55] Check failed: InitConfig()

what should the Cyber path be?

daohu527 commented 2 years ago

I will check and feedback soon.

  1. the python version is indeed an issue, I also notice this.
  2. conf is a new problem that needs to be confirmed
daohu527 commented 2 years ago

the python version is indeed an issue, I also notice this.

Because cyber need python.so, but it link with python 3.6. There is no easy way to support multi python versions in one release. Next I will release another version to support python 3.8+

conf is a new problem that needs to be confirmed

fixed in #7