0

Windows 10. Using latest version of pip. python 3.8.3.

Getting this error.

I tried installing through pycharm and got the same error.

    File "numpy\core\setup.py", line 667, in get_mathlib_info
      raise RuntimeError("Broken toolchain: cannot link a simple C program")
  RuntimeError: Broken toolchain: cannot link a simple C program
  ----------------------------------------
ERROR: Command errored out with exit status 1: 
 'C:\Users\thisuser\AppData\Local\Programs\Python\Python38-32\python.exe' -u -c 'import sys, 
setuptools, 
tokenize; sys.argv[0] = '"'"'C:\\Users\\thisuser\\AppData\\Local\\Temp\\pip-install- 
  t1sn8hyk\\numpy\\setup.py'"'"'; __file__='"'"'C:\\Users\\thisuser\\AppData\\Local\\Temp\\pip- 
install-t1sn8hyk\\numpy\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open) 
 (__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, 
__file__, '"'"'exec'"'"'))' install --record 'C:\Users\thisuser\AppData\Local\Temp\pip-record- 
 zxkfqpfd\install-record.txt' --single-version-externally-managed --prefix 
  'C:\Users\thisuser\AppData\Local\Temp\pip-build-env-t7emgfqy\overlay' --compile --install-headers 
'C:\Users\thisuser\AppData\Local\Temp\pip-build-env-t7emgfqy\overlay\Include\numpy' Check the logs 
 for 
         full command output.
      ----------------------------------------
ERROR: Command errored out with exit status 1: 
  'C:\Users\thisuser\AppData\Local\Programs\Python\Python38-32\python.exe' 
 'C:\Users\thisuser\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pip' install -- 
 ignore-installed --no-user --prefix 'C:\Users\thisuser\AppData\Local\Temp\pip-build-env- 
t7emgfqy\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i 
https://pypi.org/simple -- 'cython >= 0.29' 'numpy==1.14.5; python_version<'"'"'3.7'"'"''  
 numpy==1.16.0; python_version>='"'"'3.7'"'"'' setuptools setuptools_scm wheel Check the logs for 
 full command output
  • The error you want to look up to is `RuntimeError: Broken toolchain: cannot link a simple C program`. Checkout here: https://stackoverflow.com/questions/52265584/numpy-install-broken-toolchain-cannot-link-a-simple-c-program and here: https://github.com/numpy/numpy/issues/9783 – Aviel Fedida Jul 30 '20 at 20:46

2 Answers2

1

The easiest way around this, other than mucking about trying to install a C compiler on Windows just for one package, is to install a pre-compiled version of NumPy from Christoph Gohlke's excellent Unofficial Windows Binaries for Python Extension Packages site. I'd recommend the MKL (Intel's Math Kernel Library) version, but he has completely open-source "vanilla" versions as well.

Simply download the .whl file corresponding to your OS and Python version, then run

pip install wheel_filename.whl

from whichever directory you downloaded it to and you'll be all set. If any other pip install commands break on trying to compile a Python package, check Gohlke's repo first!

MattDMo
  • 100,794
  • 21
  • 241
  • 231
  • Thanks. I installed the streamlit and and its required packages via anaconda and copied them into the python 3.8 folder. Not sure if that's a viable long-term / workable approach – phantom234234 Jul 30 '20 at 23:16
-1

download the appropriate version from https://pypi.org/simple/streamlit/

I am using streamlit 0.62.1 along with python 3.8.5 and it works fine.

I tried the latest version of streamlit 0.76.0 but gives error on installation

pip install C:\downloads\streamlit-0.62.1-py2.py3-none-any.whl

Mazhar
  • 21
  • 1