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

[BUG] FiftyOne import fails, Ubuntu 22.02 LTS #1803

Closed
2 of 6 tasks
Nils-ChristianIseke opened this issue May 28, 2022 · 18 comments
Closed
2 of 6 tasks

[BUG] FiftyOne import fails, Ubuntu 22.02 LTS #1803

Nils-ChristianIseke opened this issue May 28, 2022 · 18 comments
Labels
bug Bug fixes

Comments

@Nils-ChristianIseke
Copy link

Nils-ChristianIseke commented May 28, 2022

System information

  • OS Platform and Distribution: Ubuntu 22.04 LTS
  • FiftyOne installed from (pip or source): pip
  • FiftyOne version (run fiftyone --version): Not applicable, due to failing import:
  • Python version: Python 3.10.4

Commands to reproduce

conda create -n PDSM pip
conda activate PDSM
pip install --upgrade pip setuptools wheel
pip install fiftyone
python3
import fiftyone

Describe the problem

python
Python 3.10.4 (main, Mar 31 2022, 08:41:55) [GCC 7.5.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import fiftyone
Subprocess ['/home/nils/anaconda3/envs/PDSM/lib/python3.10/site-packages/fiftyone/db/bin/mongod', '--dbpath', '/home/nils/.fiftyone/var/lib/mongo', '--logpath', '/home/nils/.fiftyone/var/lib/mongo/log/mongo.log', '--port', '0', '--nounixsocket'] exited with error 127:
/home/nils/anaconda3/envs/PDSM/lib/python3.10/site-packages/fiftyone/db/bin/mongod: error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No such file or directory
Uncaught exception
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/nils/anaconda3/envs/PDSM/lib/python3.10/site-packages/fiftyone/__init__.py", line 25, in <module>
    from fiftyone.__public__ import *
  File "/home/nils/anaconda3/envs/PDSM/lib/python3.10/site-packages/fiftyone/__public__.py", line 15, in <module>
    _foo.establish_db_conn(config)
  File "/home/nils/anaconda3/envs/PDSM/lib/python3.10/site-packages/fiftyone/core/odm/database.py", line 155, in establish_db_conn
    port = _db_service.port
  File "/home/nils/anaconda3/envs/PDSM/lib/python3.10/site-packages/fiftyone/core/service.py", line 276, in port
    return self._wait_for_child_port()
  File "/home/nils/anaconda3/envs/PDSM/lib/python3.10/site-packages/fiftyone/core/service.py", line 170, in _wait_for_child_port
    return find_port()
  File "/home/nils/anaconda3/envs/PDSM/lib/python3.10/site-packages/retrying.py", line 49, in wrapped_f
    return Retrying(*dargs, **dkw).call(f, *args, **kw)
  File "/home/nils/anaconda3/envs/PDSM/lib/python3.10/site-packages/retrying.py", line 212, in call
    raise attempt.get()
  File "/home/nils/anaconda3/envs/PDSM/lib/python3.10/site-packages/retrying.py", line 247, in get
    six.reraise(self.value[0], self.value[1], self.value[2])
  File "/home/nils/anaconda3/envs/PDSM/lib/python3.10/site-packages/six.py", line 719, in reraise
    raise value
  File "/home/nils/anaconda3/envs/PDSM/lib/python3.10/site-packages/retrying.py", line 200, in call
    attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
  File "/home/nils/anaconda3/envs/PDSM/lib/python3.10/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

Code to reproduce issue

see above

Other info / logs

What areas of FiftyOne does this bug affect?

  • App: FiftyOne application issue
  • Core: Core fiftyone Python library issue
  • Server: Fiftyone server issue

Willingness to contribute

The FiftyOne Community encourages bug fix contributions. Would you or another
member of your organization be willing to contribute a fix for this bug to the
FiftyOne codebase?

  • Yes. I can contribute a fix for this bug independently.
  • Yes. I would be willing to contribute a fix for this bug with guidance
    from the FiftyOne community.
  • No. I cannot contribute a bug fix at this time.
@Nils-ChristianIseke Nils-ChristianIseke added the bug Bug fixes label May 28, 2022
@tadejsv
Copy link

tadejsv commented May 28, 2022

This is related to libcrypto1.1 not being availible on Ubuntu 22.04
https://askubuntu.com/a/1403961/1102180

@Nils-ChristianIseke
Copy link
Author

@tadejsv Thank you very much!
The provided solution resolves the import error:

  1. Download libssl1.1 from https://packages.debian.org/stretch/libssl1.1
  2. In the directory where you dowloaded libssl1.1 to :sudo dpkg -i libssl1.1*.deb

@tadejsv
Copy link

tadejsv commented May 28, 2022

My solution was to create a new machine with ubuntu 20.04 😄

@brimoor brimoor changed the title [BUG] Fyftyone import fails, Ubuntu 22.02 LTS [BUG] FiftyOne import fails, Ubuntu 22.02 LTS Aug 20, 2022
@vii33
Copy link

vii33 commented Jan 4, 2023

@Nils-ChristianIseke Unfortunately not for me. I installed the newest libssl1.1 package, then tried to import fiftyone as fo.

Resulting error:

Subprocess ['/home/vii33/.virtualenvs/test2-mlao/lib/python3.10/site-packages/fiftyone/db/bin/mongod', 
'--dbpath', '/home/vii/.fiftyone/var/lib/mongo', '--logpath', '/home/vii33/.fiftyone/var/lib/mongo/log/mongo.log', 
'--port', '0', '--nounixsocket'] exited with error 1:

/home/vii33/.virtualenvs/test2-mlao/lib/python3.10/site-packages/fiftyone/db/bin/mongod: 
/lib/x86_64-linux-gnu/libssl.so.1.1: version `OPENSSL_1_1_1' not found (required by /home/vii33/.virtualenvs/test2-mlao/lib/python3.10/site-packages/fiftyone/db/bin/mongod)

Ubuntu 22.04 should be adopted by a lot of people now. Really frustrating to have to deal with such issues.

@benjaminpkane
Copy link
Contributor

benjaminpkane commented Jan 4, 2023

It is true that the current MongoDB that is distributed by default (5.0) will not work on 22.04. We will look into upgrading to 6.0 as the default binary or at least offer an optional upgrade

Regardless, MongoDB 6.0 is available now for Ubuntu 22.04 and can be used instead via your own database URI. We have instructions for configuring your own MongoDB connection here

@barney2074
Copy link

Ubuntu 22.04 should be adopted by a lot of people now. Really frustrating to have to deal with such issues.

I'd agree with this. It seems that the easiest workaround is a virtual machine running 20.04 ??

@vii33
Copy link

vii33 commented Jan 20, 2023

It is true that the current MongoDB that is distributed by default (5.0) will not work on 22.04. We will look into upgrading to 6.0 as the default binary or at least offer an optional upgrade

Regardless, MongoDB 6.0 is available now for Ubuntu 22.04 and can be used instead via your own database URI. We have instructions for configuring your own MongoDB connection here

Yes, this worked, thank you.

@mitjanikolaus
Copy link

@tadejsv Thank you very much! The provided solution resolves the import error:

1. Download libssl1.1 from https://packages.debian.org/stretch/libssl1.1

2. In the directory where you dowloaded libssl1.1 to :`sudo dpkg -i libssl1.1*.deb`

That didn't work for me, I needed to download and install a more recent version of libssl (ibssl1.1_1.1.1) from here: https://packages.debian.org/buster/amd64/libssl1.1/download

@iraadit
Copy link

iraadit commented Apr 12, 2023

Workaround I'm using is to provide the path through an installed libssl1.1 (in an Anaconda environment by example) with LD_LIBRARY_PATH

@FrancescoSaverioZuppichini

I don't think you want to install libssl1.1 in your os, since it's old

see here

So please don't do it, to my understanding that will create big security issues in your system

@heyitsguay
Copy link

I'm hitting this issue too. It's a shame! I was trying to evaluate voxel51 for my team at work. Looks nice, but I'll see if any alternatives work on my (very common by now) OS.

@brimoor
Copy link
Contributor

brimoor commented May 11, 2023

Ubuntu 22.04 users should now be able to install FiftyOne as follows:

pip install fiftyone
pip install fiftyone-db-ubuntu2204  # installs MongoDB 6

Note: manually installing fiftyone-db-ubuntu2204 will be necessary until we update the MongoDB version here to 6.0.4 or greater, at which point the fiftyone package will ship with MongoDB 6.0.4 by default on all Linux systems.

@NicoJorgensen1
Copy link

NicoJorgensen1 commented May 22, 2023

I ran
python -m pip uninstall fiftyone
python -m pip install fiftyone-db-ubuntu2204
However, now I cannot use the fiftyone zoo anymore.
When I try:
import fiftyone as fo
import fiftyone.zoo as foz
I get an "ModuleNotFoundError: No module named 'fiftyone.zoo'".
How do I update the zoo package as well?

@brimoor
Copy link
Contributor

brimoor commented May 22, 2023

You uninstalled fiftyone. Run this:

pip install fiftyone
pip install fiftyone-db-ubuntu2204

@NicoJorgensen1
Copy link

@Nils-ChristianIseke let me know if these posts are annoying, I don't want to hijack your thread.

@brimoor, thats what I did. I can see from my earlier post that I forgot to write that pip install fiftyone line...
As you can see in the attached screenshot here you the import of fiftyone fails.
fiftyone_not_workign

Bonus info: I am running this in a docker container (more specifically, a devcontainer in vscode). I run with this nvidia/cuda baseimage . It has an ubuntu 20.04 OS, as seen here:
ubuntu_base
The host machine is also running ubuntu 20.04.
I run the devcontainer using these runArgs if that matters:

`"runArgs": [
    "-v", "/tmp/.X11-unix:/tmp/.X11-unix",
    "-e", "DISPLAY",
    "--privileged",
    "-v", "/dev/bus/usb:/dev/bus/usb",
    "--gpus", "all",
    "-p", "5151:5151",
    "--network", "host",
    "--rm"
]`

I have tried both reinstalling fiftyone over and over, restarting the docker container and the host machine, but nothing works. I just keep getting the same ImportError over and over.

@findtopher
Copy link
Member

@NicoJorgensen1 - you might want to take this conversation over to the slack channel for additional support.

You should definitely not install the ubuntu2204 package on your Ubuntu 20.04 system.

Here's what I ran in my Ubuntu 20.04 container and it worked:

root@7773a8a56ff8:/# history
    1  apt-get update
    2  apt-get install python3.10 python3-pip curl
    3  pip install fiftyone
    4  python3
    5  history

In my python shell I see:

root@7773a8a56ff8:/# python3
Python 3.8.10 (default, Mar 13 2023, 10:26:41)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import fiftyone as fo
Migrating database to v0.20.1
>>>

I don't believe your issue is related to this Ubuntu 22.02 thread.

@brimoor
Copy link
Contributor

brimoor commented Aug 5, 2023

See also: #3321, #3236, #2961, #2900, #2737, #2480, #1988

@sriram-dsl
Copy link

refr this #2900 (comment)

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

No branches or pull requests