1

I was trying to install the module tensorflow_datasets:

pip install tensorflow_datasets==4.6.0

I encountered the following error:

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [34 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\vwu20\AppData\Local\Temp\pip-install-bq6pf5vv\promise_5aa0a82e7f264259aa44118f21d6bae1\setup.py", line 28, in <module>
          setup(
        File "C:\Users\vwu20\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\__init__.py", line 87, in setup
          return distutils.core.setup(**attrs)
        File "C:\Users\vwu20\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\_distutils\core.py", line 147, in setup
          _setup_distribution = dist = klass(attrs)
        File "C:\Users\vwu20\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\dist.py", line 476, in __init__
          _Distribution.__init__(
        File "C:\Users\vwu20\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\_distutils\dist.py", line 282, in __init__
          self.finalize_options()
        File "C:\Users\vwu20\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\dist.py", line 899, in finalize_options
          for ep in sorted(loaded, key=by_order):
        File "C:\Users\vwu20\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\dist.py", line 898, in <lambda>
          loaded = map(lambda e: e.load(), filtered)
        File "C:\Users\vwu20\AppData\Local\Programs\Python\Python310\lib\importlib\metadata\__init__.py", line 171, in load
          module = import_module(match.group('module'))
        File "C:\Users\vwu20\AppData\Local\Programs\Python\Python310\lib\importlib\__init__.py", line 126, in import_module
          return _bootstrap._gcd_import(name[level:], package, level)
        File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
        File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
        File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
        File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
        File "<frozen importlib._bootstrap_external>", line 883, in exec_module
        File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
        File "C:\Users\vwu20\AppData\Local\Programs\Python\Python310\lib\site-packages\py2app\build_app.py", line 37, in <module>
          from py2app.create_appbundle import create_appbundle
        File "C:\Users\vwu20\AppData\Local\Programs\Python\Python310\lib\site-packages\py2app\create_appbundle.py", line 9, in <module>
          from py2app.util import make_exec, makedirs, mergecopy, mergetree, skipscm
        File "C:\Users\vwu20\AppData\Local\Programs\Python\Python310\lib\site-packages\py2app\util.py", line 5, in <module>
          import fcntl
      ModuleNotFoundError: No module named 'fcntl'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

Seems like it's missing a package called fcntl. When I tried to install the missing package i got the following error

ERROR: Could not find a version that satisfies the requirement fcntl (from versions: none)
ERROR: No matching distribution found for fcntl

I am on a Windows 11. After searching stackoverflow I found this question. The answers on the question says that it's impossible to install fcntl on windows.

My question is: Since I can't install fcntl does it mean that I can't tensorflow_datasets also? Or, is there a way to install the datasets module without installing fcntl?

Your help will be appreciated.

turrnut
  • 64
  • 9

1 Answers1

2

The problem is not related to tensorflow_datasets. You have installed py2app on your Windows but https://pypi.org/project/py2app/ is only for Mac OS X. Uninstall py2app:

pip uninstall -y py2app

or remove the directory C:\Users\vwu20\AppData\Local\Programs\Python\Python310\lib\site-packages\py2app

phd
  • 82,685
  • 13
  • 120
  • 165