DmitryUlyanov / Multicore-TSNE

Parallel t-SNE implementation with Python and Torch wrappers.
Other
1.89k stars 228 forks source link

package is now pip-installable #10

Closed guenteru closed 7 years ago

guenteru commented 7 years ago

Hi Dmtry!

This PR fixes problem #6

I did this by using setuptools install function instead of the one contained in distutils. In addition to that I slightly rewrote the custom install function in setup.py. This was necessary, since the original part didn't abort the installation process in the case cmake wasn't installed. For completeness I also added a gitignore file.

DmitryUlyanov commented 7 years ago

Hi @guenteru, big thanks for PR!

Still your installation process works for me exactly as the original code. What command do you use to install? I use

pip install .

and then if I examine the lib folder I see no .so file.

ls /home/dulyanov/miniconda2/lib/python2.7/site-packages/MulticoreTSNE
__init__.py  __init__.pyc

whereas if I do

python setup.py install

I get

ls /home/dulyanov/miniconda2/lib/python2.7/site-packages/MulticoreTSNE
__init__.py  __init__.pyc  libtsne_multicore.so

Important remark: pip install . works after I do python setup.py install at least once. The copying does not happen when you do it with pip. So can you please recheck if it works for you if you install in from scratch? Try to remove package completely, so that test.py throw an error, then clone you repo and do pip install . there, does it work for you?

Also urllib.request works only with python3, can you please make it conditional on python version?

guenteru commented 7 years ago

Interesting!

For testing purposes I used pip install --no-cache-dir . (which works) and I assumed it would work without the parameter as well. I was wrong as it seems!

You can verify this by comparing the output of pip install -vvv --no-cache-dir . with pip install -vvv . I don't see an fast and easy solution to that problem. The alternative would be to build the python package via cmake and then install via pip.

For now the easiest solution is probably to instruct people to use pip install --no-cache-dir .

HTH Дmitry :smiley:

DmitryUlyanov commented 7 years ago

Hi, looks like pip install --no-cache-dir . works indeed! That is cool. Can you please also change README installation part?

guenteru commented 7 years ago

Updated the README accordingly!

kind regards

DmitryUlyanov commented 7 years ago

Thanks!

guenteru commented 7 years ago

np!

mrgloom commented 6 years ago

Is it availible via pip install as MulticoreTSNE (0.0.1.1) ?

pip search tsne
barnes-hut-tsne (0.2.0)  - TSNE implementations for python
bhtsne (0.1.9)           - Python module for Barnes-Hut implementation of t-SNE (Cython)
django-whatsnew (1.0)    - Simple application to manage `what's new` screen.
fitsne (0.2.0)           - Fast Fourier Transform-accelerated Interpolation-based t-SNE (FIt-SNE)
MulticoreTSNE (0.0.1.1)  - Multicore version of t-SNE algorithm.
tsne (0.1.7)             - TSNE implementations for python
tsne_animate (0.1.3)     - Automated animation for scikit-learn's t-sne algorithm
Tsnewp (0.0.1)           - T-distributed stochastic neighbor embedding rewrite by ourselves
whatsnew (0.3)           - Simple application to manage `what's new` screen.