robbmcleod / pyfastnoisesimd

Python module wrapping C++ FastNoiseSIMD
BSD 3-Clause "New" or "Revised" License
39 stars 6 forks source link

pip install without numpy fails, then compilation fails. #12

Closed marthinwurer closed 6 years ago

marthinwurer commented 6 years ago

Running pip install pyfastnoisesimd in a fresh virtualenv fails. Full error log is as follows:

Collecting pyfastnoisesimd
  Downloading pyfastnoisesimd-0.3.1.tar.gz (63kB)
    100% |████████████████████████████████| 71kB 454kB/s 
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-nhsx8yl9/pyfastnoisesimd/setup.py", line 29, in <module>
        from numpy import get_include
    ModuleNotFoundError: No module named 'numpy'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-nhsx8yl9/pyfastnoisesimd/

Once numpy is installed, setup.py is run, but compilation fails. This happens on both machines I tested it on. The full error message is as follows:

Collecting pyfastnoisesimd
  Using cached pyfastnoisesimd-0.3.1.tar.gz
Installing collected packages: pyfastnoisesimd
  Running setup.py install for pyfastnoisesimd ... error
    Complete output from command /home/benjamin/.pyenv/versions/3.6.4/envs/ultrasociality/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-5tfimrz2/pyfastnoisesimd/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-kffxr6kk-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/benjamin/.pyenv/versions/3.6.4/envs/ultrasociality/include/site/python3.6/pyfastnoisesimd:
    running install
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -std=c++11 -mavx512f -c test-avx512.cpp -o test-avx512.o
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -std=c++11 -mavx2 -c test-avx2.cpp -o test-avx2.o
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -std=c++11 -msse4.1 -c test-sse41.cpp -o test-sse41.o
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -std=c++11 -msse2 -c test-sse2.cpp -o test-sse2.o
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -mfma -c test-fma.cpp -o test-fma.o
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.6
    creating build/lib.linux-x86_64-3.6/pyfastnoisesimd
    copying pyfastnoisesimd/helpers.py -> build/lib.linux-x86_64-3.6/pyfastnoisesimd
    copying pyfastnoisesimd/version.py -> build/lib.linux-x86_64-3.6/pyfastnoisesimd
    copying pyfastnoisesimd/test_fns.py -> build/lib.linux-x86_64-3.6/pyfastnoisesimd
    copying pyfastnoisesimd/__init__.py -> build/lib.linux-x86_64-3.6/pyfastnoisesimd
    copying pyfastnoisesimd/cpuinfo.py -> build/lib.linux-x86_64-3.6/pyfastnoisesimd
    running build_clib
    building 'avx2' library
    creating build/temp.linux-x86_64-3.6
    creating build/temp.linux-x86_64-3.6/pyfastnoisesimd
    creating build/temp.linux-x86_64-3.6/pyfastnoisesimd/fastnoisesimd
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -c pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD_avx2.cpp -o build/temp.linux-x86_64-3.6/pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD_avx2.o
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    In file included from pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD_avx2.cpp:29:0:
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD.h:321:2: warning: identifier ‘nullptr’ is a keyword in C++11 [-Wc++0x-compat]
      float* xSet = nullptr;
      ^
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD_avx2.cpp:37:2: error: #error To compile AVX2 add build command "-march=core-avx2" on FastNoiseSIMD_avx2.cpp, or remove "#define FN_COMPILE_AVX2" from FastNoiseSIMD.h
     #error To compile AVX2 add build command "-march=core-avx2" on FastNoiseSIMD_avx2.cpp, or remove "#define FN_COMPILE_AVX2" from FastNoiseSIMD.h
      ^
    In file included from pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD_avx2.cpp:29:0:
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD.h:281:15: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
      int m_seed = 1337;
                   ^
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD.h:282:22: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
      float m_frequency = 0.01f;
                          ^
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD.h:283:26: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
      NoiseType m_noiseType = SimplexFractal;
                              ^
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD.h:285:19: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
      float m_xScale = 1.0f;
                       ^
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD.h:286:19: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
      float m_yScale = 1.0f;
                       ^
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD.h:287:19: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
      float m_zScale = 1.0f;
                       ^
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD.h:289:18: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
      int m_octaves = 3;
                      ^
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD.h:290:23: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
      float m_lacunarity = 2.0f;
                           ^
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD.h:291:17: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
      float m_gain = 0.5f;
                     ^
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD.h:292:30: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
      FractalType m_fractalType = FBM;
                                  ^
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD.h:295:56: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
      CellularDistanceFunction m_cellularDistanceFunction = Euclidean;
                                                            ^
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD.h:296:44: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
      CellularReturnType m_cellularReturnType = Distance;
                                                ^
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD.h:297:40: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
      NoiseType m_cellularNoiseLookupType = Simplex;
                                            ^
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD.h:298:41: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
      float m_cellularNoiseLookupFrequency = 0.2f;
                                             ^
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD.h:299:33: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
      int m_cellularDistanceIndex0 = 0;
                                     ^
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD.h:300:33: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
      int m_cellularDistanceIndex1 = 1;
                                     ^
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD.h:301:27: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
      float m_cellularJitter = 0.45f;
                               ^
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD.h:303:30: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
      PerturbType m_perturbType = None;
                                  ^
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD.h:304:23: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
      float m_perturbAmp = 1.0f;
                           ^
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD.h:305:29: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
      float m_perturbFrequency = 0.5f;
                                 ^
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD.h:307:25: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
      int m_perturbOctaves = 3;
                             ^
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD.h:308:30: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
      float m_perturbLacunarity = 2.0f;
                                  ^
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD.h:309:24: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
      float m_perturbGain = 0.5f;
                            ^
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD.h:311:35: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
      float m_perturbNormaliseLength = 1.0f;
                                       ^
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD.h:320:14: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
      int size = -1;
                  ^
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD.h:321:16: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
      float* xSet = nullptr;
                    ^
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD.h:322:16: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
      float* ySet = nullptr;
                    ^
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD.h:323:16: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
      float* zSet = nullptr;
                    ^
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD.h:326:20: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
      int sampleScale = 0;
                        ^
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD.h:327:21: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
      int sampleSizeX = -1;
                         ^
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD.h:328:21: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
      int sampleSizeY = -1;
                         ^
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD.h:329:21: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
      int sampleSizeZ = -1;
                         ^
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD.h:321:16: error: ‘nullptr’ was not declared in this scope
      float* xSet = nullptr;
                    ^
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD.h:322:16: error: ‘nullptr’ was not declared in this scope
      float* ySet = nullptr;
                    ^
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD.h:323:16: error: ‘nullptr’ was not declared in this scope
      float* zSet = nullptr;
                    ^
    In file included from pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD_avx2.cpp:44:0:
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD_internal.h:46:129: warning: override controls (override/final) only available with -std=c++11 or -std=gnu++11
       void FillSampledNoiseSet(float* noiseSet, int xStart, int yStart, int zStart, int xSize, int ySize, int zSize, int sampleScale) override;
                                                                                                                                     ^
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD_internal.h:47:140: warning: override controls (override/final) only available with -std=c++11 or -std=gnu++11
       void FillSampledNoiseSet(float* noiseSet, FastNoiseVectorSet* vectorSet, float xOffset = 0.0f, float yOffset = 0.0f, float zOffset = 0.0f) override;
                                                                                                                                                ^
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD_internal.h:49:138: warning: override controls (override/final) only available with -std=c++11 or -std=gnu++11
       void FillWhiteNoiseSet(float* floatSet, int xStart, int yStart, int zStart, int xSize, int ySize, int zSize, float scaleModifier = 1.0f) override;
                                                                                                                                              ^
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD_internal.h:50:138: warning: override controls (override/final) only available with -std=c++11 or -std=gnu++11
       void FillWhiteNoiseSet(float* noiseSet, FastNoiseVectorSet* vectorSet, float xOffset = 0.0f, float yOffset = 0.0f, float zOffset = 0.0f) override;
                                                                                                                                              ^
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD_internal.h:52:133: warning: override controls (override/final) only available with -std=c++11 or -std=gnu++11
       void FillValueSet(float* floatSet, int xStart, int yStart, int zStart, int xSize, int ySize, int zSize, float scaleModifier = 1.0f) override;
                                                                                                                                         ^
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD_internal.h:53:140: warning: override controls (override/final) only available with -std=c++11 or -std=gnu++11
       void FillValueFractalSet(float* floatSet, int xStart, int yStart, int zStart, int xSize, int ySize, int zSize, float scaleModifier = 1.0f) override;
                                                                                                                                                ^
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD_internal.h:54:133: warning: override controls (override/final) only available with -std=c++11 or -std=gnu++11
       void FillValueSet(float* noiseSet, FastNoiseVectorSet* vectorSet, float xOffset = 0.0f, float yOffset = 0.0f, float zOffset = 0.0f) override;
                                                                                                                                         ^
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD_internal.h:55:140: warning: override controls (override/final) only available with -std=c++11 or -std=gnu++11
       void FillValueFractalSet(float* noiseSet, FastNoiseVectorSet* vectorSet, float xOffset = 0.0f, float yOffset = 0.0f, float zOffset = 0.0f) override;
                                                                                                                                                ^
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD_internal.h:57:134: warning: override controls (override/final) only available with -std=c++11 or -std=gnu++11
       void FillPerlinSet(float* floatSet, int xStart, int yStart, int zStart, int xSize, int ySize, int zSize, float scaleModifier = 1.0f) override;
                                                                                                                                          ^
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD_internal.h:58:141: warning: override controls (override/final) only available with -std=c++11 or -std=gnu++11
       void FillPerlinFractalSet(float* floatSet, int xStart, int yStart, int zStart, int xSize, int ySize, int zSize, float scaleModifier = 1.0f) override;
                                                                                                                                                 ^
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD_internal.h:59:134: warning: override controls (override/final) only available with -std=c++11 or -std=gnu++11
       void FillPerlinSet(float* noiseSet, FastNoiseVectorSet* vectorSet, float xOffset = 0.0f, float yOffset = 0.0f, float zOffset = 0.0f) override;
                                                                                                                                          ^
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD_internal.h:60:141: warning: override controls (override/final) only available with -std=c++11 or -std=gnu++11
       void FillPerlinFractalSet(float* noiseSet, FastNoiseVectorSet* vectorSet, float xOffset = 0.0f, float yOffset = 0.0f, float zOffset = 0.0f) override;
                                                                                                                                                 ^
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD_internal.h:62:135: warning: override controls (override/final) only available with -std=c++11 or -std=gnu++11
       void FillSimplexSet(float* floatSet, int xStart, int yStart, int zStart, int xSize, int ySize, int zSize, float scaleModifier = 1.0f) override;
                                                                                                                                           ^
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD_internal.h:63:142: warning: override controls (override/final) only available with -std=c++11 or -std=gnu++11
       void FillSimplexFractalSet(float* floatSet, int xStart, int yStart, int zStart, int xSize, int ySize, int zSize, float scaleModifier = 1.0f) override;
                                                                                                                                                  ^
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD_internal.h:64:135: warning: override controls (override/final) only available with -std=c++11 or -std=gnu++11
       void FillSimplexSet(float* noiseSet, FastNoiseVectorSet* vectorSet, float xOffset = 0.0f, float yOffset = 0.0f, float zOffset = 0.0f) override;
                                                                                                                                           ^
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD_internal.h:65:142: warning: override controls (override/final) only available with -std=c++11 or -std=gnu++11
       void FillSimplexFractalSet(float* noiseSet, FastNoiseVectorSet* vectorSet, float xOffset = 0.0f, float yOffset = 0.0f, float zOffset = 0.0f) override;
                                                                                                                                                  ^
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD_internal.h:67:136: warning: override controls (override/final) only available with -std=c++11 or -std=gnu++11
       void FillCellularSet(float* floatSet, int xStart, int yStart, int zStart, int xSize, int ySize, int zSize, float scaleModifier = 1.0f) override;
                                                                                                                                            ^
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD_internal.h:68:136: warning: override controls (override/final) only available with -std=c++11 or -std=gnu++11
       void FillCellularSet(float* noiseSet, FastNoiseVectorSet* vectorSet, float xOffset = 0.0f, float yOffset = 0.0f, float zOffset = 0.0f) override;
                                                                                                                                            ^
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD_internal.h:70:133: warning: override controls (override/final) only available with -std=c++11 or -std=gnu++11
       void FillCubicSet(float* floatSet, int xStart, int yStart, int zStart, int xSize, int ySize, int zSize, float scaleModifier = 1.0f) override;
                                                                                                                                         ^
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD_internal.h:71:140: warning: override controls (override/final) only available with -std=c++11 or -std=gnu++11
       void FillCubicFractalSet(float* floatSet, int xStart, int yStart, int zStart, int xSize, int ySize, int zSize, float scaleModifier = 1.0f) override;
                                                                                                                                                ^
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD_internal.h:72:133: warning: override controls (override/final) only available with -std=c++11 or -std=gnu++11
       void FillCubicSet(float* noiseSet, FastNoiseVectorSet* vectorSet, float xOffset = 0.0f, float yOffset = 0.0f, float zOffset = 0.0f) override;
                                                                                                                                         ^
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD_internal.h:73:140: warning: override controls (override/final) only available with -std=c++11 or -std=gnu++11
       void FillCubicFractalSet(float* noiseSet, FastNoiseVectorSet* vectorSet, float xOffset = 0.0f, float yOffset = 0.0f, float zOffset = 0.0f) override;
                                                                                                                                                ^
    In file included from pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD_avx2.cpp:53:0:
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD_internal.cpp: In function ‘SIMDf L3_FUNC_Lerp(SIMDf, SIMDf, SIMDf)’:
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD_internal.cpp:679:61: warning: AVX vector return without AVX enabled changes the ABI [-Wpsabi]
     static SIMDf VECTORCALL FUNC(Lerp)(SIMDf a, SIMDf b, SIMDf t)
                                                                 ^
    In file included from pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD_avx2.cpp:53:0:
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD_internal.cpp: In function ‘void L3_FUNC_GradientPerturbSingle(SIMDi, SIMDf, SIMDf, SIMDf&, SIMDf&, SIMDf&)’:
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD_internal.cpp:43:22: note: The ABI for passing parameters with 32-byte alignment has changed in GCC 4.6
     #define L_VAR2(x, l) L##l##_##x
                          ^
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD_internal.cpp:44:21: note: in expansion of macro ‘L_VAR2’
     #define L_VAR(x, l) L_VAR2(x, l)
                         ^
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD_internal.cpp:45:16: note: in expansion of macro ‘L_VAR’
     #define VAR(x) L_VAR(x, SIMD_LEVEL)
                    ^
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD_internal.cpp:46:17: note: in expansion of macro ‘VAR’
     #define FUNC(x) VAR(FUNC_##x)
                     ^
    pyfastnoisesimd/fastnoisesimd/FastNoiseSIMD_internal.cpp:985:24: note: in expansion of macro ‘FUNC’
     static void VECTORCALL FUNC(GradientPerturbSingle)(SIMDi seed, SIMDf perturbAmp, SIMDf perturbFrequency, SIMDf& x, SIMDf& y, SIMDf& z)
                            ^
    error: command 'gcc' failed with exit status 1

    ----------------------------------------
Command "/home/benjamin/.pyenv/versions/3.6.4/envs/ultrasociality/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-5tfimrz2/pyfastnoisesimd/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-kffxr6kk-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/benjamin/.pyenv/versions/3.6.4/envs/ultrasociality/include/site/python3.6/pyfastnoisesimd" failed with error code 1 in /tmp/pip-build-5tfimrz2/pyfastnoisesimd/
robbmcleod commented 6 years ago

What version of gcc, pip, and setuptools are you running?

marthinwurer commented 6 years ago

gcc --version: gcc (Ubuntu 5.4.0-6ubuntu1~16.04.6) 5.4.0 20160609

pip list: pip (9.0.1) setuptools (28.8.0)

robbmcleod commented 6 years ago

Can you try

pip install --upgrade setuptools

as that's a little old. If that doesn't help, you may need gcc 6.3. Please let me know if you can get it running with setuptools 38.5.1 and gcc 5.4 and I'll update the install notes to include steps to make sure the user has the latest pip and setuptools.

marthinwurer commented 6 years ago

Updating setuptools fixed the compilation issues. However, in a fresh virtualenv without numpy, installation failed due to numpy again. Is that still an issue that should/can be fixed?

robbmcleod commented 6 years ago

Well I can change the installation instructions to ask the user to install what's in requirements.txt. I'm not clear on why your pip is not installing the pre-requisites. Does anything from here help:

https://stackoverflow.com/questions/18603302/pip-doesnt-install-packages-to-activated-virtualenv-ignores-requirements-txt#18603434

??

I can write work-arounds inside the setup.py to check for minimum versions and presence, but pip is supposed to do that. I'm not clear on why it is not in your case. I download the source distribution from PyPI and it definitely has requirements.txt in it.

robbmcleod commented 6 years ago

It looks like pip runs python setup.py egg_info first to determine the dependencies, so maybe that NumPy import can be wrapped in a try statement. After going through the pip internals a bit I've modified my setup.py so it should work now. Commit https://github.com/robbmcleod/pyfastnoisesimd/commit/2e3471e426b36d59498ebab11cc845c6fb4e6ae8 should work, try cloning the repo and see if you can install that in a fresh virtual environment? If so, I can make a new release.

marthinwurer commented 6 years ago

It successfully installs in a 3.6 virtualenv, but fails in a 3.5 one. In the 3.5 one, the following error occurs:

    Running command python setup.py egg_info
    Traceback (most recent call last):
      File "/tmp/pip-9ba96mdo-build/setup.py", line 54, in <module>
        from numpy import get_include
    ImportError: No module named 'numpy'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-9ba96mdo-build/setup.py", line 56, in <module>
        except (ImportError, ModuleNotFoundError):
    NameError: name 'ModuleNotFoundError' is not defined

I found this issue on another project and it basically says that catching the ModuleNotFoundError is not required because ImportError will cover it, and will also work on the older version of python. I changed that line locally and it installed successfully in the 3.5 venv, so that's probably the way to go.

robbmcleod commented 6 years ago

I released 0.3.2 with the suggested fix to ModuleNotFound, it's up on PyPI now.

marthinwurer commented 6 years ago

Installed it from pip and it worked in an empty venv on 3.5. This can probably be marked as fixed. Thanks for the help!

robbmcleod commented 6 years ago

Ok, closing, thanks for the bug reports.