Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation problems on Linux #35

Closed
lmweber opened this issue Sep 18, 2018 · 9 comments
Closed

Installation problems on Linux #35

lmweber opened this issue Sep 18, 2018 · 9 comments

Comments

@lmweber
Copy link

lmweber commented Sep 18, 2018

Hi, I had some difficulties installing FIt-SNE on our Linux server, which I thought I would mention here in case others have the same problems.

First, I installed FFTW from source, using the source tarball from the provided link. I installed it into my home directory using the standard commands ./configure --prefix=$HOME, make, and make install.

Then, I cloned the FIt-SNE GitHub repository and tried running the g++ compiler command provided on the readme page. However, this gave the following errors:

In file included from src/tsne.cpp:39:0:
src/nbodyfft.h:7:19: fatal error: fftw3.h: No such file or directory
compilation terminated.
In file included from src/nbodyfft.cpp:3:0:
src/nbodyfft.h:7:19: fatal error: fftw3.h: No such file or directory
compilation terminated.

and

/usr/bin/ld: cannot find -lfftw3
collect2: error: ld returned 1 exit status

I managed to fix this by adding extra arguments to specify the include and lib directories (where the FFTW files were installed) in the g++ call, as follows:

g++ -std=c++11 -O3 src/sptree.cpp src/tsne.cpp src/nbodyfft.cpp -I<path_to_include_directory> -L<path_to_lib_directory> -o bin/fast_tsne -pthread -lfftw3 -lm

I think it would be helpful to include a few comments on this on the readme page, for users who do not have a lot of experience using compilers.

@dkobak
Copy link
Collaborator

dkobak commented Sep 18, 2018

Good point. Note that if one installs FFTW without the --prefix then this is not needed and the g++ call works as is, but this probably requires root privileges and so I guess can be inconvenient on a server.

@lmweber
Copy link
Author

lmweber commented Sep 18, 2018

Thanks for the reply. Yes that makes sense, so this is probably only an issue for users who are installing without root privileges.

@msayhan
Copy link

msayhan commented Sep 25, 2018

Hi,
I just compiled FFTW version 3.3.8 and installed it under my home folder (Ubuntu 16.04) since I do not have sudo rights on our cluster. I want to point out a minor thing to avoid possible confusions for other users. In my case, there was no include folder. The header files were located under the api folder. Also, the lib is called .libs. As a result, I created the binary for fast_tsne using the following command:

g++ -std=c++11 -O3 src/sptree.cpp src/tsne.cpp src/nbodyfft.cpp -I ~/fftw-3.3.8/api/ -L ~/fftw-3.3.8/.libs/ -o bin/fast_tsne -pthread -lfftw3 -lm

Lastly, thanks for figuring out how to install FIt-SNE without privileges.

@yimingli
Copy link

I installed fftw using conda as suggested here: https://github.com/KlugerLab/pyFIt-SNE. But saw the same fftw3.h: No such file or directory error. Had to specify the fftw paths to make it work. Took me a while to find this post; I think it would be helpful to add some comments or a link to this issue.

@dkobak
Copy link
Collaborator

dkobak commented Oct 12, 2018

@yimingli A link to this issue is right here https://github.com/KlugerLab/FIt-SNE on the front page in the Installation/Linux section. How would you suggest to make it more prominent?

@yimingli
Copy link

yimingli commented Oct 12, 2018

@dkobak Ah, missed that. Thanks. I think I missed that because as a noob, I didn't know the error is related to sudo rights, until I saw your comment above. By the way I falled back to compile myself instead of pip install fitsne because pip install failed with the message:

Collecting fitsne
  Using cached https://files.pythonhosted.org/packages/46/1c/1f28558d49fbc8b719103cf999d12fa76f9e80959b1066803b0bc56bb015/fitsne-0.2.9.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-QvvPHM/fitsne/setup.py", line 10, in <module>
        with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
    TypeError: 'encoding' is an invalid keyword argument for this function

I was wondering if this error is related to the path issue.

@dkobak
Copy link
Collaborator

dkobak commented Oct 12, 2018

@yimingli Ah, I understand now. Sorry, I have no idea about this error. I haven't tried to install pyFIt-SNE myself, I am using the old-school Python wrapper in this package (FIt-SNE). Maybe George @linqiaozhi will be able to help.

@linqiaozhi
Copy link
Member

@yimingli Are you perhaps using Python2.x? That would explain this error, according to here. The version of FIt-SNE on PyPI requires Python 3. Could you make sure you're using Python3's pip?

Note that this is not really a necessary requirement--the person who made the PyPI version used some Python3 functions, and we never got around to making it backwards compatible.

Finally, if you're still having trouble, would you mind opening a new issue? This way if other users have the same problem they can find it, as it is not likely related to installing without root privileges as discussed here.

@Quetzalcohuatl
Copy link

For me, .libs was not in fftw-3.3.8 directory but instead was in the directory above it. I dont know why. But thanks mshayan, it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants