beehive-lab / TornadoVM

TornadoVM: A practical and efficient heterogeneous programming framework for managed languages
https://www.tornadovm.org
Apache License 2.0
1.17k stars 110 forks source link

OSx installation fails due to a Python module #348

Closed jjfumero closed 5 months ago

jjfumero commented 5 months ago

Describe the bug

The installation process on OSx 14.3 fails due to missing module tqdm

How To Reproduce

make
bin/compile --jdk jdk21 --backends opencl
Installing dependencies
Traceback (most recent call last):
  File "/Users/juan/manchester/tornado/tornado/bin/compile", line 31, in <module>
    import pull_graal_jars
  File "/Users/juan/manchester/tornado/tornado/bin/pull_graal_jars.py", line 24, in <module>
    from tqdm import tqdm
ModuleNotFoundError: No module named 'tqdm'
make: *** [build] Error 1

Expected behavior

The installation process should work out of the box.

Computing system setup (please complete the following information):

stratika commented 5 months ago

I am running with your commit point, on macOS 14.4 and the build process works, with:

tqdm:

tqdm --version
4.66.1

and Python:

python3 --version
Python 3.10.7
jjfumero commented 5 months ago

The issue was that I have a few installation of Python3 and Python3 modules.

I solved it by re-installing the module as follows:

python3 -m pip install tqdm
error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try brew install
    xyz, where xyz is the package you are trying to
    install.

    If you wish to install a non-brew-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip.

    If you wish to install a non-brew packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
➜  tornado git:(develop) ✗ python3 -m pip install tqdm --break-system-packages
Collecting tqdm
  Downloading tqdm-4.66.2-py3-none-any.whl.metadata (57 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 57.6/57.6 kB 1.6 MB/s eta 0:00:00
Downloading tqdm-4.66.2-py3-none-any.whl (78 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 78.3/78.3 kB 4.5 MB/s eta 0:00:00
Installing collected packages: tqdm
Successfully installed tqdm-4.66.2

I am not sure this is the best way to solve it, but it works. We can close the issue.