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

[INSTALL] Could not import 'fiftyone' in Ubuntu 22.04.1 LTS #2737

Closed
stevezkw1998 opened this issue Mar 6, 2023 · 6 comments
Closed

[INSTALL] Could not import 'fiftyone' in Ubuntu 22.04.1 LTS #2737

stevezkw1998 opened this issue Mar 6, 2023 · 6 comments
Labels
bug Bug fixes installation Installation issues

Comments

@stevezkw1998
Copy link

stevezkw1998 commented Mar 6, 2023

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Linux Ubuntu 22.04.1 LTS
  • Python version (python --version): Python 3.10.6
  • FiftyOne version (fiftyone --version): '0.19.1'
  • FiftyOne installed from (pip or source): pip install fiftyone

Commands to reproduce

In [1]: import fiftyone as fo

Describe the problem

My local system is linux ubuntu 22.04.1 LTS, I install fiftyone using pip install fiftyone, then enter command ipython3 into ipython
And then run this line

In [1]: import fiftyone as fo

Then it has bug

Other info/logs

kewenzhu@kewenzhu:~/code/data-auto-analysis-toolkit-backend$ ipython3
Python 3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0]
Type 'copyright', 'credits' or 'license' for more information
IPython 7.31.1 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import fiftyone as fo
Subprocess ['/home/kewenzhu/.local/lib/python3.10/site-packages/fiftyone/db/bin/mongod', '--dbpath', '/home/kewenzhu/.fiftyone/var/lib/mongo', '--logpath', '/home/kewenzhu/.fiftyone/var/lib/mongo/log/mongo.log', '--port', '0', '--nounixsocket'] exited with error 127:
/home/kewenzhu/.local/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
---------------------------------------------------------------------------
ServiceListenTimeout                      Traceback (most recent call last)
<ipython-input-1-8c082ccbb59f> in <module>
----> 1 import fiftyone as fo

~/.local/lib/python3.10/site-packages/fiftyone/__init__.py in <module>
     23 __version__ = _foc.VERSION
     24 
---> 25 from fiftyone.__public__ import *
     26 
     27 import fiftyone.core.uid as _fou

~/.local/lib/python3.10/site-packages/fiftyone/__public__.py in <module>
     13 app_config = _foc.load_app_config()
     14 
---> 15 _foo.establish_db_conn(config)
     16 
     17 from .core.aggregations import (

~/.local/lib/python3.10/site-packages/fiftyone/core/odm/database.py in establish_db_conn(config)
    194         try:
    195             _db_service = fos.DatabaseService()
--> 196             port = _db_service.port
    197             _connection_kwargs["port"] = port
    198             os.environ["FIFTYONE_PRIVATE_DATABASE_PORT"] = str(port)

~/.local/lib/python3.10/site-packages/fiftyone/core/service.py in port(self)
    274     @property
    275     def port(self):
--> 276         return self._wait_for_child_port()
    277 
    278     @staticmethod

~/.local/lib/python3.10/site-packages/fiftyone/core/service.py in _wait_for_child_port(self, port, timeout)
    168             raise ServiceListenTimeout(etau.get_class_name(self), port)
    169 
--> 170         return find_port()
    171 
    172 

~/.local/lib/python3.10/site-packages/retrying.py in wrapped_f(*args, **kw)
     54             @six.wraps(f)
     55             def wrapped_f(*args, **kw):
---> 56                 return Retrying(*dargs, **dkw).call(f, *args, **kw)
     57 
     58             return wrapped_f

~/.local/lib/python3.10/site-packages/retrying.py in call(self, fn, *args, **kwargs)
    264                 if not self._wrap_exception and attempt.has_exception:
    265                     # get() on an attempt with an exception should cause it to be raised, but raise just in case
--> 266                     raise attempt.get()
    267                 else:
    268                     raise RetryError(attempt)

~/.local/lib/python3.10/site-packages/retrying.py in get(self, wrap_exception)
    299                 raise RetryError(self)
    300             else:
--> 301                 six.reraise(self.value[0], self.value[1], self.value[2])
    302         else:
    303             return self.value

/usr/lib/python3/dist-packages/six.py in reraise(tp, value, tb)
    717             if value.__traceback__ is not tb:
    718                 raise value.with_traceback(tb)
--> 719             raise value
    720         finally:
    721             value = None

~/.local/lib/python3.10/site-packages/retrying.py in call(self, fn, *args, **kwargs)
    249 
    250             try:
--> 251                 attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
    252             except:
    253                 tb = sys.exc_info()

~/.local/lib/python3.10/site-packages/fiftyone/core/service.py in find_port()
    166                     pass
    167 
--> 168             raise ServiceListenTimeout(etau.get_class_name(self), port)
    169 
    170         return find_port()

ServiceListenTimeout: fiftyone.core.service.DatabaseService failed to bind to port

In [2]: 
@stevezkw1998 stevezkw1998 added bug Bug fixes installation Installation issues labels Mar 6, 2023
@brimoor
Copy link
Contributor

brimoor commented Mar 7, 2023

Hi the root cause is this error:

/home/kewenzhu/.local/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

Here's another issue on the topic with recommended solutions for installing libcrypto: #1803

@stevezkw1998
Copy link
Author

stevezkw1998 commented Mar 7, 2023

Hi the root cause is this error:

/home/kewenzhu/.local/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

Here's another issue on the topic with recommended solutions for installing libcrypto: #1803

Hi brimoor, thank you for your reply, however unfortunately the issue you mentioned doesn't have the solution that works on ubuntu 22.04,
I can only learn that this is because ubuntu 22.04 doesn't support something cause this issue,
And the provider said he's solution is create a new machine with ubuntu 20.04, which I can not copy
see: #1803 (comment)

Could you please provides some other suggestions? I might use fiftyone in a remote server machine in the future.

@brimoor
Copy link
Contributor

brimoor commented Mar 7, 2023

What about this solution in the thread? #1803 (comment)

This issue is not a FiftyOne issue per se, it's just a matter of getting MongoDB to work on Ubuntu 22.04.

Another option is to install MongoDB yourself as mentioned elsewhere in that thread: #1803 (comment)

@stevezkw1998
Copy link
Author

And the provider said he's solution is create a new machine with ubuntu 20.04, which I can not copy

Hi, this issue has been solved just now by running this two command

wget http://nz2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.17_amd64.deb

sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2.17_amd64.deb

@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.

@brimoor
Copy link
Contributor

brimoor commented Aug 5, 2023

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

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

No branches or pull requests

2 participants