Closed ajdapretnar closed 5 years ago
Yes, I am aware of this issue. The problem is that the default C compiler on Macs - clang
- doesn't support openMP. openMP is required so we can make use of all the CPU cores, making things much faster. Installing the package through conda
should work fine.
I am looking into how to make compilation simpler on Macs.
Gotcha. 👌 I think conda should be ok for the time being. Two things though:
Is this alright now? It should be fixed on both pypi and conda. @ajdapretnar please confirm
Works for me, pip and conda.
Unfortunatly installation from source on Mac OSX still breaks when following your instructions on GitHub .
pip install -r requirements-core.txt # For Orange Python library
produces
(orange3venv) myMacBookPro:orange3 wolf$ pip install -r requirements-core.txt # For Orange Python library Requirement already satisfied: pip>=9.0 in /Users/wolf/orange3venv/lib/python3.6/site-packages (from -r requirements-core.txt (line 1)) (19.0.3) Requirement already satisfied: numpy>=1.13.0 in /Users/wolf/anaconda3/lib/python3.6/site-packages (from -r requirements-core.txt (line 2)) (1.14.3) Requirement already satisfied: scipy>=0.16.1 in /Users/wolf/anaconda3/lib/python3.6/site-packages (from -r requirements-core.txt (line 3)) (1.1.0) Requirement already satisfied: scikit-learn>=0.20.0 in /Users/wolf/anaconda3/lib/python3.6/site-packages (from -r requirements-core.txt (line 4)) (0.20.0) Requirement already satisfied: bottleneck>=1.0.0 in /Users/wolf/anaconda3/lib/python3.6/site-packages (from -r requirements-core.txt (line 5)) (1.2.1) Requirement already satisfied: xlrd>=0.9.2 in /Users/wolf/anaconda3/lib/python3.6/site-packages (from -r requirements-core.txt (line 7)) (1.1.0) Requirement already satisfied: xlsxwriter in /Users/wolf/anaconda3/lib/python3.6/site-packages (from -r requirements-core.txt (line 9)) (1.0.4) Requirement already satisfied: chardet>=3.0.2 in /Users/wolf/anaconda3/lib/python3.6/site-packages (from -r requirements-core.txt (line 11)) (3.0.4) Requirement already satisfied: joblib>=0.9.4 in /Users/wolf/anaconda3/lib/python3.6/site-packages (from -r requirements-core.txt (line 13)) (0.12.2) Requirement already satisfied: keyring in /Users/wolf/anaconda3/lib/python3.6/site-packages (from -r requirements-core.txt (line 14)) (13.2.1) Requirement already satisfied: keyrings.alt in /Users/wolf/anaconda3/lib/python3.6/site-packages (from -r requirements-core.txt (line 15)) (3.0) Requirement already satisfied: setuptools>=36.3 in /Users/wolf/orange3venv/lib/python3.6/site-packages (from -r requirements-core.txt (line 16)) (40.8.0) Requirement already satisfied: serverfiles in /Users/wolf/anaconda3/lib/python3.6/site-packages (from -r requirements-core.txt (line 17)) (0.2.1) Requirement already satisfied: networkx in /Users/wolf/anaconda3/lib/python3.6/site-packages (from -r requirements-core.txt (line 18)) (2.1) Requirement already satisfied: python-louvain in /Users/wolf/anaconda3/lib/python3.6/site-packages (from -r requirements-core.txt (line 19)) (0.11) Requirement already satisfied: requests in /Users/wolf/anaconda3/lib/python3.6/site-packages (from -r requirements-core.txt (line 20)) (2.18.4) Collecting fastTSNE==0.2.13 (from -r requirements-core.txt (line 21)) Using cached https://files.pythonhosted.org/packages/1c/13/71542e5e685e4a452f94761d8e9265b790af2b6837b8c674bbd955e84f03/fastTSNE-0.2.13.tar.gz Requirement already satisfied: entrypoints in /Users/wolf/anaconda3/lib/python3.6/site-packages (from keyring->-r requirements-core.txt (line 14)) (0.2.3) Requirement already satisfied: six in /Users/wolf/anaconda3/lib/python3.6/site-packages (from keyrings.alt->-r requirements-core.txt (line 15)) (1.11.0) Requirement already satisfied: decorator>=4.1.0 in /Users/wolf/anaconda3/lib/python3.6/site-packages (from networkx->-r requirements-core.txt (line 18)) (4.3.0) Requirement already satisfied: idna<2.7,>=2.5 in /Users/wolf/anaconda3/lib/python3.6/site-packages (from requests->-r requirements-core.txt (line 20)) (2.6) Requirement already satisfied: urllib3<1.23,>=1.21.1 in /Users/wolf/anaconda3/lib/python3.6/site-packages (from requests->-r requirements-core.txt (line 20)) (1.22) Requirement already satisfied: certifi>=2017.4.17 in /Users/wolf/anaconda3/lib/python3.6/site-packages (from requests->-r requirements-core.txt (line 20)) (2018.11.29) Requirement already satisfied: numba>=0.38.1 in /Users/wolf/anaconda3/lib/python3.6/site-packages (from fastTSNE==0.2.13->-r requirements-core.txt (line 21)) (0.38.1+1.gc42707d0f.dirty) Requirement already satisfied: llvmlite>=0.23.0dev0 in /Users/wolf/anaconda3/lib/python3.6/site-packages (from numba>=0.38.1->fastTSNE==0.2.13->-r requirements-core.txt (line 21)) (0.23.1) Building wheels for collected packages: fastTSNE Building wheel for fastTSNE (setup.py) ... error Complete output from command /Users/wolf/orange3venv/bin/python3 -u -c "import setuptools, tokenize;file='/private/var/folders/w6/lwrdy85n3j11tzwc85hb4w8r0000gp/T/pip-install-nta8ue90/fastTSNE/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 /private/var/folders/w6/lwrdy85n3j11tzwc85hb4w8r0000gp/T/pip-wheel-og3xffyx --python-tag cp36: xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun running bdist_wheel running build running build_py creating build creating build/lib.macosx-10.7-x86_64-3.6 creating build/lib.macosx-10.7-x86_64-3.6/tests copying tests/test_correctness.py -> build/lib.macosx-10.7-x86_64-3.6/tests copying tests/test_affinities.py -> build/lib.macosx-10.7-x86_64-3.6/tests copying tests/init.py -> build/lib.macosx-10.7-x86_64-3.6/tests copying tests/test_tsne.py -> build/lib.macosx-10.7-x86_64-3.6/tests creating build/lib.macosx-10.7-x86_64-3.6/fastTSNE copying fastTSNE/metrics.py -> build/lib.macosx-10.7-x86_64-3.6/fastTSNE copying fastTSNE/affinity.py -> build/lib.macosx-10.7-x86_64-3.6/fastTSNE copying fastTSNE/init.py -> build/lib.macosx-10.7-x86_64-3.6/fastTSNE copying fastTSNE/nearest_neighbors.py -> build/lib.macosx-10.7-x86_64-3.6/fastTSNE copying fastTSNE/initialization.py -> build/lib.macosx-10.7-x86_64-3.6/fastTSNE copying fastTSNE/callbacks.py -> build/lib.macosx-10.7-x86_64-3.6/fastTSNE copying fastTSNE/tsne.py -> build/lib.macosx-10.7-x86_64-3.6/fastTSNE creating build/lib.macosx-10.7-x86_64-3.6/examples copying examples/init.py -> build/lib.macosx-10.7-x86_64-3.6/examples copying examples/utils.py -> build/lib.macosx-10.7-x86_64-3.6/examples creating build/lib.macosx-10.7-x86_64-3.6/benchmarks copying benchmarks/init.py -> build/lib.macosx-10.7-x86_64-3.6/benchmarks copying benchmarks/benchmark_tsne.py -> build/lib.macosx-10.7-x86_64-3.6/benchmarks creating build/lib.macosx-10.7-x86_64-3.6/fastTSNE/pynndescent copying fastTSNE/pynndescent/distances.py -> build/lib.macosx-10.7-x86_64-3.6/fastTSNE/pynndescent copying fastTSNE/pynndescent/rp_trees.py -> build/lib.macosx-10.7-x86_64-3.6/fastTSNE/pynndescent copying fastTSNE/pynndescent/init.py -> build/lib.macosx-10.7-x86_64-3.6/fastTSNE/pynndescent copying fastTSNE/pynndescent/utils.py -> build/lib.macosx-10.7-x8664-3.6/fastTSNE/pynndescent copying fastTSNE/pynndescent/pynndescent.py -> build/lib.macosx-10.7-x86_64-3.6/fastTSNE/pynndescent creating build/lib.macosx-10.7-x86_64-3.6/fastTSNE/_matrix_mul copying fastTSNE/_matrix_mul/init.py -> build/lib.macosx-10.7-x86_64-3.6/fastTSNE/_matrix_mul running build_ext building 'fastTSNE.quad_tree' extension creating build/temp.macosx-10.7-x86_64-3.6 creating build/temp.macosx-10.7-x86_64-3.6/fastTSNE gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/wolf/anaconda3/include -arch x86_64 -I/Users/wolf/anaconda3/include -arch x86_64 -I/Users/wolf/anaconda3/lib/python3.6/site-packages/numpy/core/include -I/Users/wolf/anaconda3/include/python3.6m -c fastTSNE/quad_tree.c -o build/temp.macosx-10.7-x86_64-3.6/fastTSNE/quad_tree.o -O3 xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun error: command 'gcc' failed with exit status 1
Failed building wheel for fastTSNE Running setup.py clean for fastTSNE Failed to build fastTSNE Installing collected packages: fastTSNE Found existing installation: fastTSNE 0.2.12 Not uninstalling fasttsne at /Users/wolf/anaconda3/lib/python3.6/site-packages, outside environment /Users/wolf/orange3venv Can't uninstall 'fastTSNE'. No files were found to uninstall. Running setup.py install for fastTSNE ... error Complete output from command /Users/wolf/orange3venv/bin/python3 -u -c "import setuptools, tokenize;file='/private/var/folders/w6/lwrdy85n3j11tzwc85hb4w8r0000gp/T/pip-install-nta8ue90/fastTSNE/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /private/var/folders/w6/lwrdy85n3j11tzwc85hb4w8r0000gp/T/pip-record-sqx4p_z8/install-record.txt --single-version-externally-managed --compile --install-headers /Users/wolf/orange3venv/include/site/python3.6/fastTSNE: xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun running install running build running build_py creating build creating build/lib.macosx-10.7-x86_64-3.6 creating build/lib.macosx-10.7-x86_64-3.6/tests copying tests/test_correctness.py -> build/lib.macosx-10.7-x86_64-3.6/tests copying tests/test_affinities.py -> build/lib.macosx-10.7-x86_64-3.6/tests copying tests/init.py -> build/lib.macosx-10.7-x86_64-3.6/tests copying tests/test_tsne.py -> build/lib.macosx-10.7-x86_64-3.6/tests creating build/lib.macosx-10.7-x86_64-3.6/fastTSNE copying fastTSNE/metrics.py -> build/lib.macosx-10.7-x86_64-3.6/fastTSNE copying fastTSNE/affinity.py -> build/lib.macosx-10.7-x86_64-3.6/fastTSNE copying fastTSNE/init.py -> build/lib.macosx-10.7-x86_64-3.6/fastTSNE copying fastTSNE/nearest_neighbors.py -> build/lib.macosx-10.7-x86_64-3.6/fastTSNE copying fastTSNE/initialization.py -> build/lib.macosx-10.7-x86_64-3.6/fastTSNE copying fastTSNE/callbacks.py -> build/lib.macosx-10.7-x86_64-3.6/fastTSNE copying fastTSNE/tsne.py -> build/lib.macosx-10.7-x86_64-3.6/fastTSNE creating build/lib.macosx-10.7-x86_64-3.6/examples copying examples/init.py -> build/lib.macosx-10.7-x86_64-3.6/examples copying examples/utils.py -> build/lib.macosx-10.7-x86_64-3.6/examples creating build/lib.macosx-10.7-x86_64-3.6/benchmarks copying benchmarks/init.py -> build/lib.macosx-10.7-x86_64-3.6/benchmarks copying benchmarks/benchmark_tsne.py -> build/lib.macosx-10.7-x86_64-3.6/benchmarks creating build/lib.macosx-10.7-x86_64-3.6/fastTSNE/pynndescent copying fastTSNE/pynndescent/distances.py -> build/lib.macosx-10.7-x86_64-3.6/fastTSNE/pynndescent copying fastTSNE/pynndescent/rp_trees.py -> build/lib.macosx-10.7-x86_64-3.6/fastTSNE/pynndescent copying fastTSNE/pynndescent/init.py -> build/lib.macosx-10.7-x86_64-3.6/fastTSNE/pynndescent copying fastTSNE/pynndescent/utils.py -> build/lib.macosx-10.7-x8664-3.6/fastTSNE/pynndescent copying fastTSNE/pynndescent/pynndescent.py -> build/lib.macosx-10.7-x86_64-3.6/fastTSNE/pynndescent creating build/lib.macosx-10.7-x86_64-3.6/fastTSNE/_matrix_mul copying fastTSNE/_matrix_mul/init.py -> build/lib.macosx-10.7-x86_64-3.6/fastTSNE/_matrix_mul running build_ext building 'fastTSNE.quad_tree' extension creating build/temp.macosx-10.7-x86_64-3.6 creating build/temp.macosx-10.7-x86_64-3.6/fastTSNE gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/wolf/anaconda3/include -arch x86_64 -I/Users/wolf/anaconda3/include -arch x86_64 -I/Users/wolf/anaconda3/lib/python3.6/site-packages/numpy/core/include -I/Users/wolf/anaconda3/include/python3.6m -c fastTSNE/quad_tree.c -o build/temp.macosx-10.7-x86_64-3.6/fastTSNE/quad_tree.o -O3 xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun error: command 'gcc' failed with exit status 1
----------------------------------------
Can't roll back fastTSNE; was not uninstalled Command "/Users/wolf/orange3venv/bin/python3 -u -c "import setuptools, tokenize;file='/private/var/folders/w6/lwrdy85n3j11tzwc85hb4w8r0000gp/T/pip-install-nta8ue90/fastTSNE/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /private/var/folders/w6/lwrdy85n3j11tzwc85hb4w8r0000gp/T/pip-record-sqx4p_z8/install-record.txt --single-version-externally-managed --compile --install-headers /Users/wolf/orange3venv/include/site/python3.6/fastTSNE" failed with error code 1 in /private/var/folders/w6/lwrdy85n3j11tzwc85hb4w8r0000gp/T/pip-install-nta8ue90/fastTSNE/ (orange3venv) myMacBookPro:orange3 wolf$ (orange3venv) myMacBookPro:orange3 wolf$
Could you please verify you have the latest version of Orange. It seems that you're trying to install fastTSNE, whereas if you look at the latest release requirements-core.txt
, you'll notice that this has been replaced by openTSNE
. Hopefully, this will solve your problem.
Hi,
I do have the latest version, because I just downloaded it from GiTHUB source code. I have to add a minor functionality for the neural network widget, to control the initial value of the randomizer. This helps me for reproducing ANN results in some cases.
But the only way todo this is to change the source code.
And requirements-core.txt still refer to the fastTSNE when doing a linux/OSX install. It did work in an older release. But now it is broken. Only when I install through „conda-install" openTSNE is used, for some reason I did not figure out yet.
Regards, Wolfram
Am 08.03.2019 um 08:44 schrieb Pavlin Poličar notifications@github.com<mailto:notifications@github.com>:
Could you please verify you have the latest version of Orange. It seems that you're trying to install fastTSNE, whereas if you look at the latest release requirements-core.txthttps://github.com/biolab/orange3/blob/3.20.1/requirements-core.txt#L21, you'll notice that this has been replaced by openTSNE. Hopefully, this will solve your problem.
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/pavlin-policar/openTSNE/issues/30#issuecomment-470836806, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AevvIHhBna_1Sb9u_aoF7zBMp8Ud8iCrks5vUhT2gaJpZM4YZo3x.
It would be very helpful if you are able to publish a working installation instruction from source for MacOS Mojave, as some of the commands in your source code installation fails with error.
Am 08.03.2019 um 08:44 schrieb Pavlin Poličar notifications@github.com<mailto:notifications@github.com>:
Could you please verify you have the latest version of Orange. It seems that you're trying to install fastTSNE, whereas if you look at the latest release requirements-core.txthttps://github.com/biolab/orange3/blob/3.20.1/requirements-core.txt#L21, you'll notice that this has been replaced by openTSNE. Hopefully, this will solve your problem.
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/pavlin-policar/openTSNE/issues/30#issuecomment-470836806, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AevvIHhBna_1Sb9u_aoF7zBMp8Ud8iCrks5vUhT2gaJpZM4YZo3x.
I have the same issue with clang and openmp now for openTSNE. It occurred when using pip install opentsne==0.3.2 but for pip install opentsne=0.3.0 it works
Thanks for bringing this up @bingert, clearly there's still something going on with the Mac installation and I'll look into it as soon as I find the time.
To be quite frank, this is quite puzzling. Looking at the diff between v0.3.2 and v0.3.0, there is nothing that could have broken (or in fact, changed!) the way the module is compiled on any system. The updates between these two versions were entirely documentation based with the exception of some typo fixes and package includes.
I will look into this further when I have access to a Mac machine, but most of the time I do not. However, if you find the time to look into it I would appreciate any more information on this.
Dear @pavlin-policar , thanks for reply. I will try to have a look as soon as possible. In the meanwhile I used a completely fresh OSX 10.14.4 and it worked with v0.3.2.
On macOS, I was able to solve this issue with:
brew install llvm
Set:
export LDFLAGS="-L/usr/local/opt/llvm/lib"
export CPPFLAGS="-I/usr/local/opt/llvm/include"
export PATH="/usr/local/opt/llvm/bin:$PATH"
Install:
pip install opentsne
Expected behaviour
fastTSNE can be easily complied on OSX.
Actual behaviour
fastTSNE fails.
Steps to reproduce the behavior
Run pip install fasttsne on OSX.