0

I was trying to install the Noise module (https://pypi.org/project/noise/) with PIP, but it showed me this...

Collecting noise
Using cached https://files.pythonhosted.org/packages/18/29/bb830ee6d934311e17a7a4fa1368faf3e73fbb09c0d80fc44e41828df177/noise-1.2.2.tar.gz
Installing collected packages: noise
Running setup.py install for noise ... error
Complete output from command C:\Users\Zapdexio\AppData\Local\Programs\Python\Python37\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Zapdexio\\AppData\\Local\\Temp\\pip-install-jn9dq5g6\\noise\\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\Zapdexio\AppData\Local\Temp\pip-record-iqmzked2\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\noise
copying perlin.py -> build\lib.win-amd64-3.7\noise
copying setup.py -> build\lib.win-amd64-3.7\noise
copying shader.py -> build\lib.win-amd64-3.7\noise
copying shader_noise.py -> build\lib.win-amd64-3.7\noise
copying test.py -> build\lib.win-amd64-3.7\noise
copying __init__.py -> build\lib.win-amd64-3.7\noise
running build_ext
building 'noise._simplex' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/

----------------------------------------
Command "C:\Users\Zapdexio\AppData\Local\Programs\Python\Python37\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Zapdexio\\AppData\\Local\\Temp\\pip-install-jn9dq5g6\\noise\\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\Zapdexio\AppData\Local\Temp\pip-record-iqmzked2\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Zapdexio\AppData\Local\Temp\pip-install-jn9dq5g6\noise\

The problem is that I already have Microsoft Visual C++ 14.0 installed, I don't know how to process... Can someone help me please? ;-;

petezurich
  • 9,280
  • 9
  • 43
  • 57
Zapdexio
  • 51
  • 2
  • 9

2 Answers2

9

Installing python libs that require c++ compilation on windows can be a pain. Fortunately, the community has a very helpful contributor from the University of California, Irvine, Chris Gohlke that hosts a number of pre-compiled wheels for windows. And lucky for us, noise is one of those pre-compiled wheels. Go to the link and download the appropriate wheel for you version of python and your computer OS (64-bit or 32-bit). Once you download the file, you can then install the wheel using:

    pip install c:\path\to\downloaded\wheel
2ps
  • 15,099
  • 2
  • 27
  • 47
  • Thank you so much, but surprisingly I needed the 3.7 version instead of the 3.6 to work, is that normal? – Zapdexio Nov 19 '18 at 06:48
  • @Zapdexio: not in my experience (at least not unless you are using version python 3.7). – 2ps Nov 20 '18 at 22:23
0

Mac user, it's important to get the Clang installed on your system to compile the noise package. due to latest update on back, if the clang installed in not recognized, run the below commands on the mac terminal.

xcode-select --install

Check if below command working, if not you need to first install the clang to let OS to install the noise package.

clang --version.

if that is working,

pip install noise 
Arpan Saini
  • 4,623
  • 1
  • 42
  • 50