You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you @mihaic ! It works!
I downgraded pip from 19.2.3 to 9.0.3 as you recommend and it works.
Module brainiak is installed and imported (in PyCharm) successfully.
I also tried --no-use-pep517 option but nothing happened.
It seems that something is wrong when compiling at the step pep517(I found some errors about cpp and cython), though I am not sure what it is.
It seems that everything will be OK if brainiak-0.9.1-cp37-cp37m-macosx_10_9_x86_64.whl is already built under the path ~/Library/Caches/pip/.
I could uninstall and install brainiak by pip 19.2.3 successfully as many times as my wish without an error. When I deleted this cache, the PEP 517 error occurred again.
Then I tried python3 -m pip install --no-use-pep517 brainiak, it did works this time, but nothing happened last time. Neither was an error reported nor was the module successfully installed.
I am not sure why. Maybe last time I made some mistakes or changed something without awareness about that.
The PEP 517 error is as follow:
Building wheels for collected packages: brainiak
Building wheel for brainiak (PEP 517) ... error
ERROR: Command errored out with exit status 1:
command: /Users/guannanzhao/testvenv/bin/python3 /Users/guannanzhao/testvenv/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /var/folders/jw/w9_6m6qd1k35q5kps723hqbw0000gn/T/tmpf5wjdptx
cwd: /private/var/folders/jw/w9_6m6qd1k35q5kps723hqbw0000gn/T/pip-install-y3h2tutg/brainiak
Complete output (209 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-3.7
creating build/lib.macosx-10.9-x86_64-3.7/brainiak
copying brainiak/isc.py -> build/lib.macosx-10.9-x86_64-3.7/brainiak
copying brainiak/io.py -> build/lib.macosx-10.9-x86_64-3.7/brainiak
copying brainiak/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/brainiak
copying brainiak/image.py -> build/lib.macosx-10.9-x86_64-3.7/brainiak
creating build/lib.macosx-10.9-x86_64-3.7/brainiak/searchlight
copying brainiak/searchlight/searchlight.py -> build/lib.macosx-10.9-x86_64-3.7/brainiak/searchlight
copying brainiak/searchlight/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/brainiak/searchlight
creating build/lib.macosx-10.9-x86_64-3.7/brainiak/hyperparamopt
copying brainiak/hyperparamopt/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/brainiak/hyperparamopt
copying brainiak/hyperparamopt/hpo.py -> build/lib.macosx-10.9-x86_64-3.7/brainiak/hyperparamopt
creating build/lib.macosx-10.9-x86_64-3.7/brainiak/funcalign
copying brainiak/funcalign/sssrm.py -> build/lib.macosx-10.9-x86_64-3.7/brainiak/funcalign
copying brainiak/funcalign/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/brainiak/funcalign
copying brainiak/funcalign/rsrm.py -> build/lib.macosx-10.9-x86_64-3.7/brainiak/funcalign
copying brainiak/funcalign/srm.py -> build/lib.macosx-10.9-x86_64-3.7/brainiak/funcalign
creating build/lib.macosx-10.9-x86_64-3.7/brainiak/factoranalysis
copying brainiak/factoranalysis/tfa.py -> build/lib.macosx-10.9-x86_64-3.7/brainiak/factoranalysis
copying brainiak/factoranalysis/htfa.py -> build/lib.macosx-10.9-x86_64-3.7/brainiak/factoranalysis
copying brainiak/factoranalysis/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/brainiak/factoranalysis
creating build/lib.macosx-10.9-x86_64-3.7/brainiak/fcma
copying brainiak/fcma/mvpa_voxelselector.py -> build/lib.macosx-10.9-x86_64-3.7/brainiak/fcma
copying brainiak/fcma/classifier.py -> build/lib.macosx-10.9-x86_64-3.7/brainiak/fcma
copying brainiak/fcma/util.py -> build/lib.macosx-10.9-x86_64-3.7/brainiak/fcma
copying brainiak/fcma/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/brainiak/fcma
copying brainiak/fcma/preprocessing.py -> build/lib.macosx-10.9-x86_64-3.7/brainiak/fcma
copying brainiak/fcma/voxelselector.py -> build/lib.macosx-10.9-x86_64-3.7/brainiak/fcma
creating build/lib.macosx-10.9-x86_64-3.7/brainiak/reprsimil
copying brainiak/reprsimil/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/brainiak/reprsimil
copying brainiak/reprsimil/brsa.py -> build/lib.macosx-10.9-x86_64-3.7/brainiak/reprsimil
creating build/lib.macosx-10.9-x86_64-3.7/brainiak/utils
copying brainiak/utils/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/brainiak/utils
copying brainiak/utils/fmrisim.py -> build/lib.macosx-10.9-x86_64-3.7/brainiak/utils
copying brainiak/utils/utils.py -> build/lib.macosx-10.9-x86_64-3.7/brainiak/utils
creating build/lib.macosx-10.9-x86_64-3.7/brainiak/eventseg
copying brainiak/eventseg/event.py -> build/lib.macosx-10.9-x86_64-3.7/brainiak/eventseg
copying brainiak/eventseg/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/brainiak/eventseg
copying brainiak/utils/grey_matter_mask.npy -> build/lib.macosx-10.9-x86_64-3.7/brainiak/utils
running build_ext
creating var
creating var/folders
creating var/folders/jw
creating var/folders/jw/w9_6m6qd1k35q5kps723hqbw0000gn
creating var/folders/jw/w9_6m6qd1k35q5kps723hqbw0000gn/T
/usr/local/opt/llvm/bin/clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -I/usr/local/opt/llvm/include -I/Users/guannanzhao/testvenv/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -I/private/var/folders/jw/w9_6m6qd1k35q5kps723hqbw0000gn/T/pip-build-env-2vhcnu6a/normal/lib/python3.7/site-packages/numpy/core/include -I/Users/guannanzhao/testvenv/include/site/python3.7 -I/Users/guannanzhao/testvenv/include/site/python3.7 -c /var/folders/jw/w9_6m6qd1k35q5kps723hqbw0000gn/T/tmpx0pzm1oq.cpp -o var/folders/jw/w9_6m6qd1k35q5kps723hqbw0000gn/T/tmpx0pzm1oq.o -std=c++14
/usr/local/opt/llvm/bin/clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -I/usr/local/opt/llvm/include -I/Users/guannanzhao/testvenv/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -I/private/var/folders/jw/w9_6m6qd1k35q5kps723hqbw0000gn/T/pip-build-env-2vhcnu6a/normal/lib/python3.7/site-packages/numpy/core/include -I/Users/guannanzhao/testvenv/include/site/python3.7 -I/Users/guannanzhao/testvenv/include/site/python3.7 -c /var/folders/jw/w9_6m6qd1k35q5kps723hqbw0000gn/T/tmpywztyla6.cpp -o var/folders/jw/w9_6m6qd1k35q5kps723hqbw0000gn/T/tmpywztyla6.o -std=c++14
/usr/local/opt/llvm/bin/clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -I/usr/local/opt/llvm/include -I/Users/guannanzhao/testvenv/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -I/private/var/folders/jw/w9_6m6qd1k35q5kps723hqbw0000gn/T/pip-build-env-2vhcnu6a/normal/lib/python3.7/site-packages/numpy/core/include -I/Users/guannanzhao/testvenv/include/site/python3.7 -I/Users/guannanzhao/testvenv/include/site/python3.7 -c /var/folders/jw/w9_6m6qd1k35q5kps723hqbw0000gn/T/tmplbb8jvyk.cpp -o var/folders/jw/w9_6m6qd1k35q5kps723hqbw0000gn/T/tmplbb8jvyk.o -std=c++14
/usr/local/opt/llvm/bin/clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -I/usr/local/opt/llvm/include -I/Users/guannanzhao/testvenv/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -I/private/var/folders/jw/w9_6m6qd1k35q5kps723hqbw0000gn/T/pip-build-env-2vhcnu6a/normal/lib/python3.7/site-packages/numpy/core/include -I/Users/guannanzhao/testvenv/include/site/python3.7 -I/Users/guannanzhao/testvenv/include/site/python3.7 -c /var/folders/jw/w9_6m6qd1k35q5kps723hqbw0000gn/T/tmpwi7stw2f.cpp -o var/folders/jw/w9_6m6qd1k35q5kps723hqbw0000gn/T/tmpwi7stw2f.o -std=c++14
building 'brainiak.factoranalysis.tfa_extension' extension
creating build/temp.macosx-10.9-x86_64-3.7
creating build/temp.macosx-10.9-x86_64-3.7/brainiak
creating build/temp.macosx-10.9-x86_64-3.7/brainiak/factoranalysis
/usr/local/opt/llvm/bin/clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -I/usr/local/opt/llvm/include -I/Users/guannanzhao/testvenv/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -I/private/var/folders/jw/w9_6m6qd1k35q5kps723hqbw0000gn/T/pip-build-env-2vhcnu6a/normal/lib/python3.7/site-packages/numpy/core/include -I/Users/guannanzhao/testvenv/include/site/python3.7 -I/Users/guannanzhao/testvenv/include/site/python3.7 -c brainiak/factoranalysis/tfa_extension.cpp -o build/temp.macosx-10.9-x86_64-3.7/brainiak/factoranalysis/tfa_extension.o -g0 -fopenmp -stdlib=libc++ -mmacosx-version-min=10.9 -ftemplate-depth-1024 -DVERSION_INFO="0.9.1" -std=c++14
brainiak/factoranalysis/tfa_extension.cpp:242:1: warning: 'pybind11_init' is deprecated: PYBIND11_PLUGIN is deprecated, use PYBIND11_MODULE [-Wdeprecated-declarations]
PYBIND11_PLUGIN(tfa_extension) {
^
/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pybind11/detail/common.h:261:20: note: expanded from macro 'PYBIND11_PLUGIN'
return pybind11_init(); \
^
brainiak/factoranalysis/tfa_extension.cpp:242:1: note: 'pybind11_init' has been explicitly marked deprecated here
/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pybind11/detail/common.h:256:5: note: expanded from macro 'PYBIND11_PLUGIN'
PYBIND11_DEPRECATED("PYBIND11_PLUGIN is deprecated, use PYBIND11_MODULE") \
^
/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pybind11/detail/common.h:90:41: note: expanded from macro 'PYBIND11_DEPRECATED'
# define PYBIND11_DEPRECATED(reason) [[deprecated(reason)]]
^
1 warning generated.
/usr/local/opt/llvm/bin/clang++ -bundle -undefined dynamic_lookup -arch x86_64 -g -L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib -I/usr/local/opt/llvm/include build/temp.macosx-10.9-x86_64-3.7/brainiak/factoranalysis/tfa_extension.o -o build/lib.macosx-10.9-x86_64-3.7/brainiak/factoranalysis/tfa_extension.cpython-37m-darwin.so -g0 -fopenmp -stdlib=libc++ -mmacosx-version-min=10.9 -ftemplate-depth-1024 -DVERSION_INFO="0.9.1" -std=c++14
building 'brainiak.fcma.fcma_extension' extension
creating build/temp.macosx-10.9-x86_64-3.7/brainiak/fcma
creating build/temp.macosx-10.9-x86_64-3.7/brainiak/fcma/src
/usr/local/opt/llvm/bin/clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -I/usr/local/opt/llvm/include -I/Users/guannanzhao/testvenv/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -I/private/var/folders/jw/w9_6m6qd1k35q5kps723hqbw0000gn/T/pip-build-env-2vhcnu6a/normal/lib/python3.7/site-packages/numpy/core/include -I/Users/guannanzhao/testvenv/include/site/python3.7 -I/Users/guannanzhao/testvenv/include/site/python3.7 -c brainiak/fcma/src/fcma_extension.cc -o build/temp.macosx-10.9-x86_64-3.7/brainiak/fcma/src/fcma_extension.o -g0 -fopenmp -stdlib=libc++ -mmacosx-version-min=10.9 -ftemplate-depth-1024 -DVERSION_INFO="0.9.1" -std=c++14
brainiak/fcma/src/fcma_extension.cc:60:17: warning: unknown pragma ignored [-Wunknown-pragmas]
#pragma simd
^
brainiak/fcma/src/fcma_extension.cc:54:23: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
for(int v = 0 ; v < nSelectedVoxels*nSubjs ; v++)
~ ^ ~~~~~~~~~~~~~~~~~~~~~~
brainiak/fcma/src/fcma_extension.cc:61:27: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
for(int j = 0 ; j < nVoxels ; j++)
~ ^ ~~~~~~~
brainiak/fcma/src/fcma_extension.cc:87:1: warning: 'pybind11_init' is deprecated: PYBIND11_PLUGIN is deprecated, use PYBIND11_MODULE [-Wdeprecated-declarations]
PYBIND11_PLUGIN(fcma_extension) {
^
/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pybind11/detail/common.h:261:20: note: expanded from macro 'PYBIND11_PLUGIN'
return pybind11_init(); \
^
brainiak/fcma/src/fcma_extension.cc:87:1: note: 'pybind11_init' has been explicitly marked deprecated here
/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pybind11/detail/common.h:256:5: note: expanded from macro 'PYBIND11_PLUGIN'
PYBIND11_DEPRECATED("PYBIND11_PLUGIN is deprecated, use PYBIND11_MODULE") \
^
/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pybind11/detail/common.h:90:41: note: expanded from macro 'PYBIND11_DEPRECATED'
# define PYBIND11_DEPRECATED(reason) [[deprecated(reason)]]
^
4 warnings generated.
/usr/local/opt/llvm/bin/clang++ -bundle -undefined dynamic_lookup -arch x86_64 -g -L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib -I/usr/local/opt/llvm/include build/temp.macosx-10.9-x86_64-3.7/brainiak/fcma/src/fcma_extension.o -o build/lib.macosx-10.9-x86_64-3.7/brainiak/fcma/fcma_extension.cpython-37m-darwin.so -g0 -fopenmp -stdlib=libc++ -mmacosx-version-min=10.9 -ftemplate-depth-1024 -DVERSION_INFO="0.9.1" -std=c++14
cythoning brainiak/fcma/cython_blas.pyx to brainiak/fcma/cython_blas.c
building 'brainiak.fcma.cython_blas' extension
/usr/local/opt/llvm/bin/clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -I/usr/local/opt/llvm/include -I/Users/guannanzhao/testvenv/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -I/private/var/folders/jw/w9_6m6qd1k35q5kps723hqbw0000gn/T/pip-build-env-2vhcnu6a/normal/lib/python3.7/site-packages/numpy/core/include -I/Users/guannanzhao/testvenv/include/site/python3.7 -I/Users/guannanzhao/testvenv/include/site/python3.7 -c brainiak/fcma/cython_blas.c -o build/temp.macosx-10.9-x86_64-3.7/brainiak/fcma/cython_blas.o -g0 -fopenmp -stdlib=libc++ -mmacosx-version-min=10.9 -ftemplate-depth-1024 -DVERSION_INFO="0.9.1"
brainiak/fcma/cython_blas.c:1:2: error: Do not use this file, it is the result of a failed Cython compilation.
#error Do not use this file, it is the result of a failed Cython compilation.
^
1 error generated.
/private/var/folders/jw/w9_6m6qd1k35q5kps723hqbw0000gn/T/pip-build-env-2vhcnu6a/normal/lib/python3.7/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /private/var/folders/jw/w9_6m6qd1k35q5kps723hqbw0000gn/T/pip-install-y3h2tutg/brainiak/brainiak/fcma/cython_blas.pyx
tree = Parsing.p_module(s, pxd, full_module_name)
Error compiling Cython file:
------------------------------------------------------------
...
# limitations under the License.
# Authors: Yida Wang
# (Intel Labs), 2016
cimport scipy.linalg.cython_blas as blas
^
------------------------------------------------------------
brainiak/fcma/cython_blas.pyx:18:8: 'scipy/linalg/cython_blas.pxd' not found
Error compiling Cython file:
------------------------------------------------------------
...
A = py_a
cdef float[:, ::1] B
B = py_b
cdef float[:, :, ::1] C
C = py_c
blas.sgemm(trans_a, trans_b, &M, &N, &K, &alpha, &A[0, 0], &lda,
^
------------------------------------------------------------
brainiak/fcma/cython_blas.pyx:115:8: cimported module has no attribute 'sgemm'
Error compiling Cython file:
------------------------------------------------------------
...
beta = py_beta
cdef float[:, :, ::1] A
A = py_a
cdef float[:, ::1] C
C = py_c
blas.ssyrk(uplo, trans, &N, &K, &alpha, &A[py_start_voxel, 0, 0], &lda,
^
------------------------------------------------------------
brainiak/fcma/cython_blas.pyx:197:8: cimported module has no attribute 'ssyrk'
Error compiling Cython file:
------------------------------------------------------------
...
beta = py_beta
cdef float[:, ::1] A
A = py_a
cdef float[:, :, ::1] C
C = py_c
blas.ssyrk(uplo, trans, &N, &K, &alpha, &A[0, 0], &lda,
^
------------------------------------------------------------
brainiak/fcma/cython_blas.pyx:286:8: cimported module has no attribute 'ssyrk'
Error compiling Cython file:
------------------------------------------------------------
...
beta = py_beta
cdef float[:, ::1] A
A = py_a
cdef float[:, :, ::1] C
C = py_c
blas.sgemm(trans_a, trans_b, &M, &N, &K, &alpha, &A[0, 0], &lda,
^
------------------------------------------------------------
brainiak/fcma/cython_blas.pyx:385:8: cimported module has no attribute 'sgemm'
Error compiling Cython file:
------------------------------------------------------------
...
A = py_a
cdef float[:, ::1] B
B = py_b
cdef float[:, :, ::1] C
C = py_c
blas.sgemm(trans_a, trans_b, &M, &N, &K, &alpha, &A[0, 0], &lda,
^
------------------------------------------------------------
brainiak/fcma/cython_blas.pyx:477:8: cimported module has no attribute 'sgemm'
Error compiling Cython file:
------------------------------------------------------------
...
A = py_a
cdef float[:, ::1] B
B = py_b
cdef float[:, ::1] C
C = py_c
blas.sgemm(trans_a, trans_b, &M, &N, &K, &alpha, &A[0, 0], &lda,
^
------------------------------------------------------------
brainiak/fcma/cython_blas.pyx:559:8: cimported module has no attribute 'sgemm'
error: command '/usr/local/opt/llvm/bin/clang' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for brainiak
Running setup.py clean for brainiak
Failed to build brainiak
ERROR: Could not build wheels for brainiak which use PEP 517 and cannot be installed directly
Activity
mihaic commentedon Aug 28, 2019
Could you please try with a
pipversion < 10?mihaic commentedon Aug 28, 2019
For example, you can create a virtual environment for testing like this:
mihaic commentedon Aug 28, 2019
A better alternative is to use the
--no-use-pep517flag when installing (requires apipversion >= 19):GuannanZhao commentedon Aug 29, 2019
Thank you @mihaic ! It works!
I downgraded pip from
19.2.3to9.0.3as you recommend and it works.Module brainiak is installed and imported (in PyCharm) successfully.
I also tried
--no-use-pep517option but nothing happened.It seems that something is wrong when compiling at the step
pep517(I found some errors about cpp and cython), though I am not sure what it is.Thank you again!
[-]An ERROR occurs when installing by pip[/-][+]Document Pip PEP 517 installation quirks[/+]mihaic commentedon Aug 29, 2019
Thanks for the feedback, @GuannanZhao. I am re-purposing this issue to improve our documentation.
Could you please paste the command the error you see when installing with
pip>=19 and--no-use-pep517?GuannanZhao commentedon Aug 30, 2019
It seems that everything will be OK if
brainiak-0.9.1-cp37-cp37m-macosx_10_9_x86_64.whlis already built under the path~/Library/Caches/pip/.I could uninstall and install brainiak by
pip 19.2.3successfully as many times as my wish without an error. When I deleted this cache, thePEP 517error occurred again.Then I tried
python3 -m pip install --no-use-pep517 brainiak, it did works this time, but nothing happened last time. Neither was an error reported nor was the module successfully installed.I am not sure why. Maybe last time I made some mistakes or changed something without awareness about that.
The
PEP 517error is as follow:mihaic commentedon Aug 30, 2019
Thanks for the detailed output. I will modify the documentation to include the
--no-use-pep517flag.docs: Add --no-use-pep517 flag to Pip
docs: Add --no-use-pep517 flag to Pip (#454)