Cannot install Nuba on FreeBSD 13

Hi, I have managed create a python virtual environment in python and would like to install numba package in it.
Please refer the code below.

Code:
(tutorial-env) michael@MS:~ % pip install numba
Collecting numba
  Using cached numba-0.53.1.tar.gz (2.2 MB)
Collecting llvmlite<0.37,>=0.36.0rc1
  Using cached llvmlite-0.36.0.tar.gz (126 kB)
Requirement already satisfied: numpy>=1.15 in ./tutorial-env/lib/python3.9/site-packages (from numba) (1.20.2)
Requirement already satisfied: setuptools in ./tutorial-env/lib/python3.9/site-packages (from numba) (56.0.0)
Building wheels for collected packages: numba, llvmlite
  Building wheel for numba (setup.py) ... done
  Created wheel for numba: filename=numba-0.53.1-cp39-cp39-freebsd_13_0_release_amd64.whl size=2285629 sha256=7a5a68a146c30fe6bee9f25fda4c2c16ac9be92b4dee46951c9495e508dd9970
  Stored in directory: /usr/home/michael/.cache/pip/wheels/86/ae/01/9c7c22acf1131e3a439113c0d2f67bc98caa5183b7a367f528
  Building wheel for llvmlite (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/home/michael/tutorial-env/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-q3inh1z1/llvmlite_225f84bdefcf449bbe2d50134c513eeb/setup.py'"'"'; __file__='"'"'/tmp/pip-install-q3inh1z1/llvmlite_225f84bdefcf449bbe2d50134c513eeb/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-b2xnvfbo
       cwd: /tmp/pip-install-q3inh1z1/llvmlite_225f84bdefcf449bbe2d50134c513eeb/
  Complete output (11 lines):
  running bdist_wheel
  /usr/home/michael/tutorial-env/bin/python /tmp/pip-install-q3inh1z1/llvmlite_225f84bdefcf449bbe2d50134c513eeb/ffi/build.py
  LLVM version... Traceback (most recent call last):
    File "/tmp/pip-install-q3inh1z1/llvmlite_225f84bdefcf449bbe2d50134c513eeb/ffi/build.py", line 220, in <module>
      main()
    File "/tmp/pip-install-q3inh1z1/llvmlite_225f84bdefcf449bbe2d50134c513eeb/ffi/build.py", line 212, in main
      main_posix('freebsd', '.so')
    File "/tmp/pip-install-q3inh1z1/llvmlite_225f84bdefcf449bbe2d50134c513eeb/ffi/build.py", line 134, in main_posix
      raise RuntimeError(msg) from None
  RuntimeError: Could not find a `llvm-config` binary. There are a number of reasons this could occur, please see: https://llvmlite.readthedocs.io/en/latest/admin-guide/install.html#using-pip for help.
  error: command '/usr/home/michael/tutorial-env/bin/python' failed with exit code 1
  ----------------------------------------
  ERROR: Failed building wheel for llvmlite
  Running setup.py clean for llvmlite
Successfully built numba
Failed to build llvmlite
Installing collected packages: llvmlite, numba
    Running setup.py install for llvmlite ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/home/michael/tutorial-env/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-q3inh1z1/llvmlite_225f84bdefcf449bbe2d50134c513eeb/setup.py'"'"'; __file__='"'"'/tmp/pip-install-q3inh1z1/llvmlite_225f84bdefcf449bbe2d50134c513eeb/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-t9nfscca/install-record.txt --single-version-externally-managed --compile --install-headers /usr/home/michael/tutorial-env/include/site/python3.9/llvmlite
         cwd: /tmp/pip-install-q3inh1z1/llvmlite_225f84bdefcf449bbe2d50134c513eeb/
    Complete output (14 lines):
    running install
    running build
    got version from file /tmp/pip-install-q3inh1z1/llvmlite_225f84bdefcf449bbe2d50134c513eeb/llvmlite/_version.py {'version': '0.36.0', 'full': 'e6bb8d137d922bec8beeb01a237254778759becd'}
    running build_ext
    /usr/home/michael/tutorial-env/bin/python /tmp/pip-install-q3inh1z1/llvmlite_225f84bdefcf449bbe2d50134c513eeb/ffi/build.py
    LLVM version... Traceback (most recent call last):
      File "/tmp/pip-install-q3inh1z1/llvmlite_225f84bdefcf449bbe2d50134c513eeb/ffi/build.py", line 220, in <module>
        main()
      File "/tmp/pip-install-q3inh1z1/llvmlite_225f84bdefcf449bbe2d50134c513eeb/ffi/build.py", line 212, in main
        main_posix('freebsd', '.so')
      File "/tmp/pip-install-q3inh1z1/llvmlite_225f84bdefcf449bbe2d50134c513eeb/ffi/build.py", line 134, in main_posix
        raise RuntimeError(msg) from None
    RuntimeError: Could not find a `llvm-config` binary. There are a number of reasons this could occur, please see: https://llvmlite.readthedocs.io/en/latest/admin-guide/install.html#using-pip for help.
    error: command '/usr/home/michael/tutorial-env/bin/python' failed with exit code 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/home/michael/tutorial-env/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-q3inh1z1/llvmlite_225f84bdefcf449bbe2d50134c513eeb/setup.py'"'"'; __file__='"'"'/tmp/pip-install-q3inh1z1/llvmlite_225f84bdefcf449bbe2d50134c513eeb/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-t9nfscca/install-record.txt --single-version-externally-managed --compile --install-headers /usr/home/michael/tutorial-env/include/site/python3.9/llvmlite Check the logs for full command output.

Would anyone please be able to help me in this matter?

Thanks & Best Regards

Michael
 
Any reason why you're not using the package devel/py-numba?

You can find the person who wrote that port having the exact same problem on these forums

Try LLVM_CONFIG=/usr/local/bin/llvm-config10 pip install numba if you insist on using pip.

Your version of llvm-config is probably different. I'm on Freebsd 12.2.
 
Any reason why you're not using the package devel/py-numba?

You can find the person who wrote that port having the exact same problem on these forums

Try LLVM_CONFIG=/usr/local/bin/llvm-config10 pip install numba if you insist on using pip.

Your version of llvm-config is probably different. I'm on Freebsd 12.2.
Hi, thanks for the reply. I am trying install it in a python virtual environment and my python version is 3.9.4. Furthermore, I have trouble installing opencv-python the same way. It gives a massive error and at the end says:
Code:
ERROR: Could not build wheels for cmake which use PEP 517 and cannot be installed directly


Thanks & Best Regards
Michael
 
and my python version is 3.9.4.
If you set DEFAULT_VERSIONS= python3=3.9 python=3.9 and build the Python modules from ports it will use that setting as the default Python version. See /usr/ports/Mk/bsd.default-versions.mk.

Many packages are also available in different python "flavors", i.e. pkg install py39-numba to get the specific Python 3.9 version.
 
Hi All,

I have another issue. I have installed python3.9 on FreeBSD 13 I am trying install some python packages in a virtual environment. However, when installing it hangs when trying to install wheel. When I was installing pip I got a warning saying include /home/schroter/.local/bin in path. So I did.
Now my path (~/.cshrc file) looks like:
/home/schroter/pythonVE/analyticsVE/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/home/schroter/bin:/usr/home/schroter/julia-1.6.2/bin:/usr/home/schroter/.local/bin
Would anyone please be able to help me in this regards?
Thanks & Best Regards
Schroter
 

Attachments

  • Screenshot_2021-09-01_17-06-59.png
    Screenshot_2021-09-01_17-06-59.png
    38.1 KB · Views: 108
Hi All,

I have another issue. I have installed python3.9 on FreeBSD 13 I am trying install some python packages in a virtual environment. However, when installing it hangs when trying to install wheel. When I was installing pip I got a warning saying include /home/schroter/.local/bin in path. So I did.
Now my path (~/.cshrc file) looks like:
/home/schroter/pythonVE/analyticsVE/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/home/schroter/bin:/usr/home/schroter/julia-1.6.2/bin:/usr/home/schroter/.local/bin
Would anyone please be able to help me in this regards?
Thanks & Best Regards
Schroter
Hi, guys it worked. Had to wait a while.. Not sure why it took a while. (around 15min)
Thanks & Best Regards
Schroter
 
If you set DEFAULT_VERSIONS= python3=3.9 python=3.9 and build the Python modules from ports it will use that setting as the default Python version. See /usr/ports/Mk/bsd.default-versions.mk.

Many packages are also available in different python "flavors", i.e. pkg install py39-numba to get the specific Python 3.9 version.
Hi, would you be able to know whether this method work for a virtual environment as well? I want to use virtual environments since I do not want to clutter the OS with these modules and load only the modules that are needed at one time to increase performance.
Thanks & Best Regards
Schroter
 
Any reason why you're not using the package devel/py-numba?

You can find the person who wrote that port having the exact same problem on these forums

Try LLVM_CONFIG=/usr/local/bin/llvm-config10 pip install numba if you insist on using pip.

Your version of llvm-config is probably different. I'm on Freebsd 12.2.
Hi, Thanks. It says on terminal : LLVM_CONFIG=/usr/local/bin/llvm-config10: Command not found.
Thanks & Best Regards
Schroter
 
Back
Top