Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FiftyOne Import Failure #25

Open
sjleo1 opened this issue Jan 23, 2023 · 13 comments
Open

FiftyOne Import Failure #25

sjleo1 opened this issue Jan 23, 2023 · 13 comments

Comments

@sjleo1
Copy link
Contributor

sjleo1 commented Jan 23, 2023

내용

파이썬에서 fiftyone을 import하거나

import fiftyone as fo

터미널에서 fiftyone을 입력하면 에러가 발생합니다.

(open-mmlab) root@d1f6f2a42208:~/final-project-level3-cv-17# fiftyone

에러 메시지

(open-mmlab) root@d1f6f2a42208:~/final-project-level3-cv-17# python utils/visualizer.py
Subprocess ['/opt/conda/envs/open-mmlab/lib/python3.8/site-packages/fiftyone/db/bin/mongod', '--dbpath', '/opt/ml/.fiftyone/var/lib/mongo', '--logpath', '/opt/ml/.fiftyone/var/lib/mongo/log/mongo.log', '--port', '0', '--nounixsocket'] exited with error 127:
/opt/conda/envs/open-mmlab/lib/python3.8/site-packages/fiftyone/db/bin/mongod: error while loading shared libraries: libcurl.so.4: cannot open shared object file: No such file or directory
Traceback (most recent call last):
  File "utils/visualizer.py", line 8, in <module>
    import fiftyone as fo
  File "/opt/conda/envs/open-mmlab/lib/python3.8/site-packages/fiftyone/__init__.py", line 25, in <module>
    from fiftyone.__public__ import *
  File "/opt/conda/envs/open-mmlab/lib/python3.8/site-packages/fiftyone/__public__.py", line 15, in <module>
    _foo.establish_db_conn(config)
  File "/opt/conda/envs/open-mmlab/lib/python3.8/site-packages/fiftyone/core/odm/database.py", line 156, in establish_db_conn
    port = _db_service.port
  File "/opt/conda/envs/open-mmlab/lib/python3.8/site-packages/fiftyone/core/service.py", line 276, in port
    return self._wait_for_child_port()
  File "/opt/conda/envs/open-mmlab/lib/python3.8/site-packages/fiftyone/core/service.py", line 170, in _wait_for_child_port
    return find_port()
  File "/opt/conda/envs/open-mmlab/lib/python3.8/site-packages/retrying.py", line 56, in wrapped_f
    return Retrying(*dargs, **dkw).call(f, *args, **kw)
  File "/opt/conda/envs/open-mmlab/lib/python3.8/site-packages/retrying.py", line 266, in call
    raise attempt.get()
  File "/opt/conda/envs/open-mmlab/lib/python3.8/site-packages/retrying.py", line 301, in get
    six.reraise(self.value[0], self.value[1], self.value[2])
  File "/opt/conda/envs/open-mmlab/lib/python3.8/site-packages/six.py", line 719, in reraise
    raise value
  File "/opt/conda/envs/open-mmlab/lib/python3.8/site-packages/retrying.py", line 251, in call
    attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
  File "/opt/conda/envs/open-mmlab/lib/python3.8/site-packages/fiftyone/core/service.py", line 168, in find_port
    raise ServiceListenTimeout(etau.get_class_name(self), port)
fiftyone.core.service.ServiceListenTimeout: fiftyone.core.service.DatabaseService failed to bind to port

시도해 본 방법

  1. ~/.fiftyone/config.json 작성
    -> 또 다른 오류 발생
  2. apt-get install libcurl4-openssl-dev
    -> 설치 실패
  3. 등등등
@JKbin
Copy link
Contributor

JKbin commented Jan 23, 2023

open-mmlab 가상환경에 fiftyone 라이브러리는 설치를 하신거죠???

저 같은 경우 fiftyone 가상환경을 따로 만들어서 사용하고 있습니다.
(방금 utils/visualizer.py 파일을 실행해봤는데 이미지랑 라벨 경로를 좀 수정해야 될 것 같습니다.)

@sjleo1
Copy link
Contributor Author

sjleo1 commented Jan 23, 2023

@JKbin 넵 open-mmlab에 fiftyone이 설치돼 있습니다.
말씀해 주신 대로 가상환경을 새로 만들어서 fiftyone을 설치하고 돌려 봤는데 똑같은 에러에 봉착합니다 😢😢😢

@JKbin
Copy link
Contributor

JKbin commented Jan 23, 2023

https://github.com/voxel51/fiftyone

git clone 하셔서
requirements 다운 해보시고 다시 돌려 보시겠어요???

@sjleo1
Copy link
Contributor Author

sjleo1 commented Jan 23, 2023

그래도 안 되네요 😭
pip install -r requirements.txt 하면 PyYAML을 버전에 맞게 재설치하다가 에러가 나네용
버전 지정을 해제하고 다시 pip install에 성공해도 fiftyone은 안 돌아갑니다...

제 생각에는 mongodb와 연결이 안 돼서 그런 게 아닌가 싶어요. fiftyone이 포트를 못 찾는다거나, mongodb가 모종의 이유로 안 돌아간다거나...

@JKbin
Copy link
Contributor

JKbin commented Jan 23, 2023

세준님 혹시
/opt/conda/envs/open-mmlab/lib/python3.8/site-packages/fiftyone/db/bin/mongod

이 경로에 mongod 라는 파일이 있나요??

@sjleo1
Copy link
Contributor Author

sjleo1 commented Jan 23, 2023

image
네 있습니다!

@JKbin
Copy link
Contributor

JKbin commented Jan 23, 2023

세준님이 올려주신 에러로는 저 파일이 없다고 뜨는 것 같은데...있다니 이상하네용
인터프리터도 가상환경으로 잘 설정되어있는거죠???

@sjleo1
Copy link
Contributor Author

sjleo1 commented Jan 23, 2023

네 맞습니다
(fiftyone) root@host, (open-mmlab) root@host 상태에서 스크립트 파일도 실행시켜 보고 주피터 노트북에서 커널 지정해서 import fiftyone실행시켜 봐도 같은 오류가 나옵니다 🥲

@JKbin
Copy link
Contributor

JKbin commented Jan 23, 2023

만약에 포트 문제면..
utils/visualizer.py 66번째 line

session = fo.launch_app(dataset, port=PORT, address="0.0.0.0")

->

session = fo.launch_app(dataset)

이렇게 실행해보시겠어요?
fiftyone은 default port가 5151인 것 같습니다!

@sjleo1
Copy link
Contributor Author

sjleo1 commented Jan 23, 2023

ㅠㅠ 그래도 안 되네용 😅

지금 보니 제 짧은 지식으로는 FiftyOneMongoDB와 연결돼야 하는데 그걸 실패해서 에러 메시지 마지막에 failed to bind to port라고 나온 것 같아요. 그리고 실패한 이유가 libcurl 라이브러리를 찾지 못해서 MongoDB를 실행시키지 못했기 때문인 것 같습니다.

일단 급한 대로 다른 방식으로 EDA를 해야겠습니닷

@JKbin
Copy link
Contributor

JKbin commented Jan 23, 2023

넵 😞

@nanpuhaha
Copy link
Contributor

이것도 한 번 해보시겠어요?
voxel51/fiftyone#1988 (comment)

@sjleo1
Copy link
Contributor Author

sjleo1 commented Jan 25, 2023

이것도 한 번 해보시겠어요? voxel51/fiftyone#1988 (comment)

(openmmlab) root@07f0fe312935:~/final-project-level3-cv-17/mmyolo# wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1-1ubuntu2.1~18.04.20_amd64.deb -O libsll.deb && dpkg -i libsll.deb
--2023-01-25 07:16:59--  http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1-1ubuntu2.1~18.04.20_amd64.deb
Resolving archive.ubuntu.com (archive.ubuntu.com)... 185.125.190.36, 91.189.91.38, 91.189.91.39, ...
Connecting to archive.ubuntu.com (archive.ubuntu.com)|185.125.190.36|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1301796 (1.2M) [application/x-debian-package]
Saving to: 'libsll.deb'

libsll.deb                   100%[==============================================>]   1.24M   754KB/s    in 1.7s

2023-01-25 07:17:02 (754 KB/s) - 'libsll.deb' saved [1301796/1301796]

(Reading database ... 17139 files and directories currently installed.)
Preparing to unpack libsll.deb ...
Unpacking libssl1.1:amd64 (1.1.1-1ubuntu2.1~18.04.20) over (1.1.1-1ubuntu2.1~18.04.20) ...
Setting up libssl1.1:amd64 (1.1.1-1ubuntu2.1~18.04.20) ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
debconf: falling back to frontend: Readline
Processing triggers for libc-bin (2.27-3ubuntu1.3) ...

요렇게 설치 후에도 같은 에러가 발생했습니다 😢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants