klugerlab / pyfit-sne Goto Github PK
View Code? Open in Web Editor NEWPython Wrapper for FIt-SNE
License: Other
Python Wrapper for FIt-SNE
License: Other
It looks like pyFIt-SNE was last updated over a year ago which means it does not correspond to the current version of FIt-SNE anymore, right? What is the long-term plan here? Do you want to keep supporting pyFIt-SNE by periodically copying current FIt-SNE into it? Do you want to keep it frozen? I think currently it's a bit confusing.
Installing this on Ubuntu fails with
fitsne/src/tsne.cpp:1058:35: error: ‘bind’ is not a member of ‘std’
An include is missing.
When running fitsne Python wrapper, it is common that you want to kill the process (say you screwed a parameter, etc.). However, while you can use CTRL-C to send a kill signal, this won't actually kill the c C-code that's running. Is there a way to fix this ? It seems important that you should be able to terminate the code even though it is just a wrapper.
I ran the code for 5000 iterations and rapidly ran out of memory.
It seems that deallocation is not done properly at every step. My dataset is 60000x20.
After 1000 iterations my memory requirement was about 3GB.
After 3000 iterations is was about 40 GB ! I am running this on OSX 10.13.4 and python3.6.
After installing fftw using conda, I got this error with pip install fitsne:
Building wheels for collected packages: fitsne
Running setup.py bdist_wheel for fitsne ... error
c:\users\xxx\appdata\local\temp\pip-build-x88ngo81\fitsne\fitsne\src\nbodyfft.h(3): fatal error C1083: Cannot open include file: 'fftw3.h': No such file or directory
Any hint on why this file is missing? thank you
conda install fftw
Fetching package metadata ...............
Solving package specifications: .
# All requested packages already installed.
# packages in environment at C:\Anaconda3\envs\python3:
#
fftw 3.3.7 vc14_0 [vc14] conda-forge
Here is my error message:
(py3_testing) jespinozlt-osx:~ jespinoz$ conda install fftw
Solving environment: done
==> WARNING: A newer version of conda exists. <==
current version: 4.5.4
latest version: 4.5.5
Please update conda by running
$ conda update -n base conda
## Package Plan ##
environment location: /Users/jespinoz/anaconda/envs/py3_testing
added / updated specs:
- fftw
The following packages will be downloaded:
package | build
---------------------------|-----------------
fftw-3.3.8 | h1de35cc_0 3.5 MB
The following NEW packages will be INSTALLED:
fftw: 3.3.8-h1de35cc_0
Proceed ([y]/n)? y
Downloading and Extracting Packages
fftw-3.3.8 | 3.5 MB | ######################################################################################################################################################################################################################## | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
(py3_testing) jespinozlt-osx:~ jespinoz$ pip install fitsne
Collecting fitsne
Using cached https://files.pythonhosted.org/packages/a7/55/b5d36bce446920e17efe6e558cd19894204dc6bdb2678776e309aeb73a58/fitsne-0.2.5.tar.gz
Requirement already satisfied: numpy in ./anaconda/envs/py3_testing/lib/python3.6/site-packages (from fitsne)
Requirement already satisfied: cython in ./anaconda/envs/py3_testing/lib/python3.6/site-packages (from fitsne)
Building wheels for collected packages: fitsne
Running setup.py bdist_wheel for fitsne ... error
Complete output from command /Users/jespinoz/anaconda/envs/py3_testing/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/6z/5vbtz_gmkr76ftgc3149dvtr0003c0/T/pip-build-p9m78drm/fitsne/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /var/folders/6z/5vbtz_gmkr76ftgc3149dvtr0003c0/T/tmplfmd0hrepip-wheel- --python-tag cp36:
Please put "# distutils: language=c++" in your .pyx or .pxd file(s)
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-3.6
creating build/lib.macosx-10.9-x86_64-3.6/fitsne
copying fitsne/__init__.py -> build/lib.macosx-10.9-x86_64-3.6/fitsne
copying fitsne/_version.py -> build/lib.macosx-10.9-x86_64-3.6/fitsne
copying fitsne/cywrap.py -> build/lib.macosx-10.9-x86_64-3.6/fitsne
running build_ext
building 'fitsne.cppwrap' extension
creating build/temp.macosx-10.9-x86_64-3.6
creating build/temp.macosx-10.9-x86_64-3.6/fitsne
creating build/temp.macosx-10.9-x86_64-3.6/fitsne/src
x86_64-apple-darwin13.4.0-clang -DNDEBUG -fwrapv -O2 -Wall -Wstrict-prototypes -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9 -Ifitsne -I/Users/jespinoz/anaconda/envs/py3_testing/include/python3.6m -c fitsne/cppwrap.cpp -o build/temp.macosx-10.9-x86_64-3.6/fitsne/cppwrap.o -std=c++11 -O3 -pthread -lfftw3 -lm
clang-4.0: warning: -lfftw3: 'linker' input unused [-Wunused-command-line-argument]
clang-4.0: warning: -lm: 'linker' input unused [-Wunused-command-line-argument]
x86_64-apple-darwin13.4.0-clang -DNDEBUG -fwrapv -O2 -Wall -Wstrict-prototypes -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9 -Ifitsne -I/Users/jespinoz/anaconda/envs/py3_testing/include/python3.6m -c fitsne/src/nbodyfft.cpp -o build/temp.macosx-10.9-x86_64-3.6/fitsne/src/nbodyfft.o -std=c++11 -O3 -pthread -lfftw3 -lm
clang-4.0: warning: -lfftw3: 'linker' input unused [-Wunused-command-line-argument]
clang-4.0: warning: -lm: 'linker' input unused [-Wunused-command-line-argument]
In file included from fitsne/src/nbodyfft.cpp:1:
fitsne/src/nbodyfft.h:3:10: fatal error: 'fftw3.h' file not found
#include <fftw3.h>
^~~~~~~~~
1 error generated.
Please put "# distutils: language=c++" in your .pyx or .pxd file(s)
running bdist_wheel
running build
running build_py
running build_ext
building 'fitsne.cppwrap' extension
x86_64-apple-darwin13.4.0-clang -DNDEBUG -fwrapv -O2 -Wall -Wstrict-prototypes -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9 -Ifitsne -I/Users/jespinoz/anaconda/envs/py3_testing/include/python3.6m -c fitsne/cppwrap.cpp -o build/temp.macosx-10.9-x86_64-3.6/fitsne/cppwrap.o -std=c++11 -O3 -pthread -lfftw3 -lm -stdlib=libc++
clang-4.0: warning: -lfftw3: 'linker' input unused [-Wunused-command-line-argument]
clang-4.0: warning: -lm: 'linker' input unused [-Wunused-command-line-argument]
x86_64-apple-darwin13.4.0-clang -DNDEBUG -fwrapv -O2 -Wall -Wstrict-prototypes -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9 -Ifitsne -I/Users/jespinoz/anaconda/envs/py3_testing/include/python3.6m -c fitsne/src/nbodyfft.cpp -o build/temp.macosx-10.9-x86_64-3.6/fitsne/src/nbodyfft.o -std=c++11 -O3 -pthread -lfftw3 -lm -stdlib=libc++
clang-4.0: warning: -lfftw3: 'linker' input unused [-Wunused-command-line-argument]
clang-4.0: warning: -lm: 'linker' input unused [-Wunused-command-line-argument]
In file included from fitsne/src/nbodyfft.cpp:1:
fitsne/src/nbodyfft.h:3:10: fatal error: 'fftw3.h' file not found
#include <fftw3.h>
^~~~~~~~~
1 error generated.
error: command 'x86_64-apple-darwin13.4.0-clang' failed with exit status 1
----------------------------------------
Failed building wheel for fitsne
Running setup.py clean for fitsne
Failed to build fitsne
Installing collected packages: fitsne
Running setup.py install for fitsne ... error
Complete output from command /Users/jespinoz/anaconda/envs/py3_testing/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/6z/5vbtz_gmkr76ftgc3149dvtr0003c0/T/pip-build-p9m78drm/fitsne/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/6z/5vbtz_gmkr76ftgc3149dvtr0003c0/T/pip-_24vbx4z-record/install-record.txt --single-version-externally-managed --compile:
Please put "# distutils: language=c++" in your .pyx or .pxd file(s)
running install
running build
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-3.6
creating build/lib.macosx-10.9-x86_64-3.6/fitsne
copying fitsne/__init__.py -> build/lib.macosx-10.9-x86_64-3.6/fitsne
copying fitsne/_version.py -> build/lib.macosx-10.9-x86_64-3.6/fitsne
copying fitsne/cywrap.py -> build/lib.macosx-10.9-x86_64-3.6/fitsne
running build_ext
building 'fitsne.cppwrap' extension
creating build/temp.macosx-10.9-x86_64-3.6
creating build/temp.macosx-10.9-x86_64-3.6/fitsne
creating build/temp.macosx-10.9-x86_64-3.6/fitsne/src
x86_64-apple-darwin13.4.0-clang -DNDEBUG -fwrapv -O2 -Wall -Wstrict-prototypes -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9 -Ifitsne -I/Users/jespinoz/anaconda/envs/py3_testing/include/python3.6m -c fitsne/cppwrap.cpp -o build/temp.macosx-10.9-x86_64-3.6/fitsne/cppwrap.o -std=c++11 -O3 -pthread -lfftw3 -lm
clang-4.0: warning: -lfftw3: 'linker' input unused [-Wunused-command-line-argument]
clang-4.0: warning: -lm: 'linker' input unused [-Wunused-command-line-argument]
x86_64-apple-darwin13.4.0-clang -DNDEBUG -fwrapv -O2 -Wall -Wstrict-prototypes -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9 -Ifitsne -I/Users/jespinoz/anaconda/envs/py3_testing/include/python3.6m -c fitsne/src/nbodyfft.cpp -o build/temp.macosx-10.9-x86_64-3.6/fitsne/src/nbodyfft.o -std=c++11 -O3 -pthread -lfftw3 -lm
clang-4.0: warning: -lfftw3: 'linker' input unused [-Wunused-command-line-argument]
clang-4.0: warning: -lm: 'linker' input unused [-Wunused-command-line-argument]
In file included from fitsne/src/nbodyfft.cpp:1:
fitsne/src/nbodyfft.h:3:10: fatal error: 'fftw3.h' file not found
#include <fftw3.h>
^~~~~~~~~
1 error generated.
Please put "# distutils: language=c++" in your .pyx or .pxd file(s)
running install
running build
running build_py
running build_ext
building 'fitsne.cppwrap' extension
x86_64-apple-darwin13.4.0-clang -DNDEBUG -fwrapv -O2 -Wall -Wstrict-prototypes -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9 -Ifitsne -I/Users/jespinoz/anaconda/envs/py3_testing/include/python3.6m -c fitsne/cppwrap.cpp -o build/temp.macosx-10.9-x86_64-3.6/fitsne/cppwrap.o -std=c++11 -O3 -pthread -lfftw3 -lm -stdlib=libc++
clang-4.0: warning: -lfftw3: 'linker' input unused [-Wunused-command-line-argument]
clang-4.0: warning: -lm: 'linker' input unused [-Wunused-command-line-argument]
x86_64-apple-darwin13.4.0-clang -DNDEBUG -fwrapv -O2 -Wall -Wstrict-prototypes -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9 -Ifitsne -I/Users/jespinoz/anaconda/envs/py3_testing/include/python3.6m -c fitsne/src/nbodyfft.cpp -o build/temp.macosx-10.9-x86_64-3.6/fitsne/src/nbodyfft.o -std=c++11 -O3 -pthread -lfftw3 -lm -stdlib=libc++
clang-4.0: warning: -lfftw3: 'linker' input unused [-Wunused-command-line-argument]
clang-4.0: warning: -lm: 'linker' input unused [-Wunused-command-line-argument]
In file included from fitsne/src/nbodyfft.cpp:1:
fitsne/src/nbodyfft.h:3:10: fatal error: 'fftw3.h' file not found
#include <fftw3.h>
^~~~~~~~~
1 error generated.
error: command 'x86_64-apple-darwin13.4.0-clang' failed with exit status 1
----------------------------------------
Command "/Users/jespinoz/anaconda/envs/py3_testing/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/6z/5vbtz_gmkr76ftgc3149dvtr0003c0/T/pip-build-p9m78drm/fitsne/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/6z/5vbtz_gmkr76ftgc3149dvtr0003c0/T/pip-_24vbx4z-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/6z/5vbtz_gmkr76ftgc3149dvtr0003c0/T/pip-build-p9m78drm/fitsne/
Hi, it seems like there is the letter 'f' in the setup.py file which causes the install to fail. I tried to download the file-package, edit setup.py and then do python setup.py install , but I guess i need to properly compile the C++ code with some kind of g++ command from my directory... which I'm not so sure how to do in conjunction with using the python wrapper. thanks for you help. below is the error message
Collecting fitsne
Using cached https://files.pythonhosted.org/packages/fb/5d/fea125898f35a254c013d35aae76f181d37389b644a3dfb19e745f0ea48b/fitsne-0.2.2.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-install-rthyb24l/fitsne/setup.py", line 16
download_url=f"https://github.com/KlugerLab/pyFIt-SNE/archive/{__version__}.tar.gz"
^
SyntaxError: invalid syntax
Here is the terminal output. I have already vs build tools v14.0, as suggested in previous terminal output errors. This output I copy here is from the 'pip install fitsne', but also fails in the same way when running 'python setup.py install'. I do make sure that pip is calling the .exe file from my specific environment.
(leap) Z:#Common\adrian\Workspace\python_scripts\pyFIt-SNE>pip install fitsne
Collecting fitsne
Using cached https://files.pythonhosted.org/packages/b6/84/7f8ea3c3837228ed6eb4f2773e764443e4a92d4e5ffd4f6e85517def667e/fitsne-1.0.1.tar.gz
Requirement already satisfied: numpy in c:\users\apalaci\appdata\local\continuum\miniconda3\envs\leap\lib\site-packages (from fitsne) (1.15.4)
Requirement already satisfied: cython in c:\users\apalaci\appdata\local\continuum\miniconda3\envs\leap\lib\site-packages (from fitsne) (0.29.1)
Building wheels for collected packages: fitsne
Running setup.py bdist_wheel for fitsne ... error
Complete output from command c:\users\apalaci\appdata\local\continuum\miniconda3\envs\leap\python.exe -u -c "import setuptools, tokenize;file='C:\Users\apalaci\AppData\Local\Temp\pip-install-wag2_1al\fitsne\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d C:\Users\apalaci\AppData\Local\Temp\pip-wheel-hb3z8zem --python-tag cp36:
Warning: passing language='c++' to cythonize() is deprecated. Instead, put "# distutils: language=c++" in your .pyx or .pxd file(s)
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
creating build\lib.win-amd64-3.6\fitsne
copying fitsne\cywrap.py -> build\lib.win-amd64-3.6\fitsne
copying fitsne_version.py -> build\lib.win-amd64-3.6\fitsne
copying fitsne_init_.py -> build\lib.win-amd64-3.6\fitsne
running build_ext
building 'fitsne.cppwrap' extension
creating build\temp.win-amd64-3.6
creating build\temp.win-amd64-3.6\Release
creating build\temp.win-amd64-3.6\Release\fitsne
creating build\temp.win-amd64-3.6\Release\fitsne\src
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ifitsne -Ic:\users\apalaci\appdata\local\continuum\miniconda3\envs\leap\include -Ic:\users\apalaci\appdata\local\continuum\miniconda3\envs\leap\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /EHsc /Tpfitsne/cppwrap.cpp /Fobuild\temp.win-amd64-3.6\Release\fitsne/cppwrap.obj -std=c++11 -O3 -pthread -lfftw3 -lm
cl : Command line warning D9002 : ignoring unknown option '-std=c++11'
cl : Command line warning D9002 : ignoring unknown option '-O3'
cl : Command line warning D9002 : ignoring unknown option '-pthread'
cl : Command line warning D9002 : ignoring unknown option '-lfftw3'
cl : Command line warning D9002 : ignoring unknown option '-lm'
cppwrap.cpp
fitsne/cppwrap.cpp(234): warning C4804: '/': unsafe use of type 'bool' in operation
fitsne/cppwrap.cpp(2541): error C2466: cannot allocate an array of constant size 0
fitsne/cppwrap.cpp(2541): error C2133: '__pyx_t_8': unknown size
Warning: passing language='c++' to cythonize() is deprecated. Instead, put "# distutils: language=c++" in your .pyx or .pxd file(s)
running bdist_wheel
running build
running build_py
running build_ext
building 'fitsne.cppwrap' extension
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ifitsne -Ic:\users\apalaci\appdata\local\continuum\miniconda3\envs\leap\include -Ic:\users\apalaci\appdata\local\continuum\miniconda3\envs\leap\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /EHsc /Tpfitsne/cppwrap.cpp /Fobuild\temp.win-amd64-3.6\Release\fitsne/cppwrap.obj -std=c++11 -O3 -pthread -lfftw3 -lm -stdlib=libc++
cl : Command line warning D9002 : ignoring unknown option '-std=c++11'
cl : Command line warning D9002 : ignoring unknown option '-O3'
cl : Command line warning D9002 : ignoring unknown option '-pthread'
cl : Command line warning D9002 : ignoring unknown option '-lfftw3'
cl : Command line warning D9002 : ignoring unknown option '-lm'
cl : Command line warning D9002 : ignoring unknown option '-stdlib=libc++'
cppwrap.cpp
fitsne/cppwrap.cpp(234): warning C4804: '/': unsafe use of type 'bool' in operation
fitsne/cppwrap.cpp(2541): error C2466: cannot allocate an array of constant size 0
fitsne/cppwrap.cpp(2541): error C2133: '__pyx_t_8': unknown size
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe' failed with exit status 2
Failed building wheel for fitsne
Running setup.py clean for fitsne
Failed to build fitsne
Installing collected packages: fitsne
Running setup.py install for fitsne ... error
Complete output from command c:\users\apalaci\appdata\local\continuum\miniconda3\envs\leap\python.exe -u -c "import setuptools, tokenize;file='C:\Users\apalaci\AppData\Local\Temp\pip-install-wag2_1al\fitsne\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\apalaci\AppData\Local\Temp\pip-record-u49d38h1\install-record.txt --single-version-externally-managed --compile:
Warning: passing language='c++' to cythonize() is deprecated. Instead, put "# distutils: language=c++" in your .pyx or .pxd file(s)
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
creating build\lib.win-amd64-3.6\fitsne
copying fitsne\cywrap.py -> build\lib.win-amd64-3.6\fitsne
copying fitsne_version.py -> build\lib.win-amd64-3.6\fitsne
copying fitsne_init_.py -> build\lib.win-amd64-3.6\fitsne
running build_ext
building 'fitsne.cppwrap' extension
creating build\temp.win-amd64-3.6
creating build\temp.win-amd64-3.6\Release
creating build\temp.win-amd64-3.6\Release\fitsne
creating build\temp.win-amd64-3.6\Release\fitsne\src
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ifitsne -Ic:\users\apalaci\appdata\local\continuum\miniconda3\envs\leap\include -Ic:\users\apalaci\appdata\local\continuum\miniconda3\envs\leap\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /EHsc /Tpfitsne/cppwrap.cpp /Fobuild\temp.win-amd64-3.6\Release\fitsne/cppwrap.obj -std=c++11 -O3 -pthread -lfftw3 -lm
cl : Command line warning D9002 : ignoring unknown option '-std=c++11'
cl : Command line warning D9002 : ignoring unknown option '-O3'
cl : Command line warning D9002 : ignoring unknown option '-pthread'
cl : Command line warning D9002 : ignoring unknown option '-lfftw3'
cl : Command line warning D9002 : ignoring unknown option '-lm'
cppwrap.cpp
fitsne/cppwrap.cpp(234): warning C4804: '/': unsafe use of type 'bool' in operation
fitsne/cppwrap.cpp(2541): error C2466: cannot allocate an array of constant size 0
fitsne/cppwrap.cpp(2541): error C2133: '__pyx_t_8': unknown size
Warning: passing language='c++' to cythonize() is deprecated. Instead, put "# distutils: language=c++" in your .pyx or .pxd file(s)
running install
running build
running build_py
running build_ext
building 'fitsne.cppwrap' extension
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ifitsne -Ic:\users\apalaci\appdata\local\continuum\miniconda3\envs\leap\include -Ic:\users\apalaci\appdata\local\continuum\miniconda3\envs\leap\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /EHsc /Tpfitsne/cppwrap.cpp /Fobuild\temp.win-amd64-3.6\Release\fitsne/cppwrap.obj -std=c++11 -O3 -pthread -lfftw3 -lm -stdlib=libc++
cl : Command line warning D9002 : ignoring unknown option '-std=c++11'
cl : Command line warning D9002 : ignoring unknown option '-O3'
cl : Command line warning D9002 : ignoring unknown option '-pthread'
cl : Command line warning D9002 : ignoring unknown option '-lfftw3'
cl : Command line warning D9002 : ignoring unknown option '-lm'
cl : Command line warning D9002 : ignoring unknown option '-stdlib=libc++'
cppwrap.cpp
fitsne/cppwrap.cpp(234): warning C4804: '/': unsafe use of type 'bool' in operation
fitsne/cppwrap.cpp(2541): error C2466: cannot allocate an array of constant size 0
fitsne/cppwrap.cpp(2541): error C2133: '__pyx_t_8': unknown size
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe' failed with exit status 2
----------------------------------------
Command "c:\users\apalaci\appdata\local\continuum\miniconda3\envs\leap\python.exe -u -c "import setuptools, tokenize;file='C:\Users\apalaci\AppData\Local\Temp\pip-install-wag2_1al\fitsne\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\apalaci\AppData\Local\Temp\pip-record-u49d38h1\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\apalaci\AppData\Local\Temp\pip-install-wag2_1al\fitsne\
I followed the instruction (with miniconda) in the webpage https://pypi.org/project/fitsne/
but still could not install fitsne.
I have tried both gcc-7 and gcc-8 on a linuxmint machine. FFTW installed.
The major error is (I think)
gcc: error: unrecognized command line option ‘-stdlib=libc++’
while the full error log
ERROR: Complete output from command /home/XXX/miniconda3/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-9dhds9j9/fitsne/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-xlep26va --python-tag cp37:
ERROR: Warning: passing language='c++' to cythonize() is deprecated. Instead, put "# distutils: language=c++" in your .pyx or .pxd file(s)
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.7
creating build/lib.linux-x86_64-3.7/fitsne
copying fitsne/_version.py -> build/lib.linux-x86_64-3.7/fitsne
copying fitsne/__init__.py -> build/lib.linux-x86_64-3.7/fitsne
copying fitsne/cywrap.py -> build/lib.linux-x86_64-3.7/fitsne
running build_ext
building 'fitsne.cppwrap' extension
creating build/temp.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/fitsne
creating build/temp.linux-x86_64-3.7/fitsne/src
gcc -pthread -B /home/XXX/miniconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Ifitsne -I/home/shao/miniconda3/include/python3.7m -c fitsne/cppwrap.cpp -o build/temp.linux-x86_64-3.7/fitsne/cppwrap.o -std=c++11 -O3 -pthread -lfftw3 -lm
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
gcc -pthread -B /home/XXX/miniconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Ifitsne -I/home/XXX/miniconda3/include/python3.7m -c fitsne/src/nbodyfft.cpp -o build/temp.linux-x86_64-3.7/fitsne/src/nbodyfft.o -std=c++11 -O3 -pthread -lfftw3 -lm
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from fitsne/src/nbodyfft.cpp:4:
fitsne/src/nbodyfft.h:7:10: fatal error: fftw3.h: No such file or directory
#include <fftw3.h>
^~~~~~~~~
compilation terminated.
Warning: passing language='c++' to cythonize() is deprecated. Instead, put "# distutils: language=c++" in your .pyx or .pxd file(s)
running bdist_wheel
running build
running build_py
running build_ext
building 'fitsne.cppwrap' extension
gcc -pthread -B /home/XXX/miniconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Ifitsne -I/home/XXX/miniconda3/include/python3.7m -c fitsne/cppwrap.cpp -o build/temp.linux-x86_64-3.7/fitsne/cppwrap.o -std=c++11 -O3 -pthread -lfftw3 -lm -stdlib=libc++
gcc: error: unrecognized command line option ‘-stdlib=libc++’
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for fitsne
Hi,
It appears the df
parameter shown in the FIt-SNE example notebook is missing from the python wrapper. I am not sure if it would be difficult to add this feature as it looks quite useful.
Thanks
It looks like there is a syntax issue in the setup.py file for install the package via pip (Pypi). That is, if you try to install the most recent version of the package via pip install fitsne
, you get the following error message:
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/b3/j6sb_hk15t710xrbs7x3fvsc0000gn/T/pip-install-qebngw5i/fitsne/setup.py", line 16
download_url=f"https://github.com/KlugerLab/pyFIt-SNE/archive/{__version__}.tar.gz"
^
SyntaxError: invalid syntax
The version number is missing. You need to write is as:
"https://github.com/KlugerLab/pyFIt-SNE/archive/{"+__version__+"}.tar.gz"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.