Giter Club home page Giter Club logo

Comments (44)

eardic avatar eardic commented on May 27, 2024 21

I added '-DCMAKE_GENERATOR_PLATFORM=x64' flag to the setup.py and the problem solved in Win64 (Win10) and Python 3.5.4.

if 0 != execute(['cmake',
'-DCMAKE_GENERATOR_PLATFORM=x64', <----- THIS
'-DCMAKE_BUILD_TYPE={}'.format(build_type),
'-DCMAKE_VERBOSE_MAKEFILE={}'.format(int(self.verbose)),

from multicore-tsne.

michaelthwan avatar michaelthwan commented on May 27, 2024 11

The above solution works for me. Let me summarize the solution:

  1. If you installed package before, pip uninstall MulticoreTSNE
  2. Clone the source git clone https://github.com/DmitryUlyanov/Multicore-TSNE.git
  3. Edit /Multicore-TSNE/setup.py,

Find these piece of code and add one line

if 0 != execute(['cmake',
'-DCMAKE_GENERATOR_PLATFORM=x64', <----- THIS
'-DCMAKE_BUILD_TYPE={}'.format(build_type),
'-DCMAKE_VERBOSE_MAKEFILE={}'.format(int(self.verbose)),
  1. install by source
cd /Multicore-TSNE
pip install .

from multicore-tsne.

jroakes avatar jroakes commented on May 27, 2024 8

The problem I am having is that the file tsne_multicore.dll has been compiled with i386 architecture (32-bit) so it will not work on 64-bit systems, thus the "error 0xc1". I am not sure if this is the correct answer for everyone, but I was able to add:

    if 0 != execute(['cmake',
		 '-GMinGW Makefiles',  <----------This
                     '-DCMAKE_BUILD_TYPE={}'.format(build_type),
                     '-DCMAKE_VERBOSE_MAKEFILE={}'.format(int(self.verbose)),

to the setup.py file to get it to compile with MinGW for WIndows which works and produces the right files for the architecture.

from multicore-tsne.

mpenagar avatar mpenagar commented on May 27, 2024 6

I got the same problem with python 3.4 when running the example inside the installation directory "Multicore-TSNE"

Worked if I run python outside the installation directory.

from multicore-tsne.

jonimatix avatar jonimatix commented on May 27, 2024 3

I added '-DCMAKE_GENERATOR_PLATFORM=x64' flag to the setup.py and the problem solved in Win64 (Win10) and Python 3.5.4.
if 0 != execute(['cmake',
'-DCMAKE_GENERATOR_PLATFORM=x64', <----- THIS
'-DCMAKE_BUILD_TYPE={}'.format(build_type),
'-DCMAKE_VERBOSE_MAKEFILE={}'.format(int(self.verbose)),

Thanx this solved my problem on win10 & python 3.5.4

This works for me as well. If you had already installed the package, just type pip uninstall MulticoreTSNE and then reinstall it..

from multicore-tsne.

arianhosseini avatar arianhosseini commented on May 27, 2024 1

I had the same problem. This is how I fixed it:

  • go to the parent directory
  • run pip install Multicore-TSNE/
    then the egg is added to /usr/local/lib/python2.7/dist-packages/. Same can be done on python3.x with pip3.

from multicore-tsne.

haltuf avatar haltuf commented on May 27, 2024 1

I have same problem on Win 10, tried to install using all methods mentioned.

from multicore-tsne.

RichardMeyes avatar RichardMeyes commented on May 27, 2024 1

@jroakes THX! That worked perfectly!

from multicore-tsne.

mukesh5 avatar mukesh5 commented on May 27, 2024 1

I added '-DCMAKE_GENERATOR_PLATFORM=x64' flag to the setup.py and the problem solved in Win64 (Win10) and Python 3.5.4.

if 0 != execute(['cmake',
'-DCMAKE_GENERATOR_PLATFORM=x64', <----- THIS
'-DCMAKE_BUILD_TYPE={}'.format(build_type),
'-DCMAKE_VERBOSE_MAKEFILE={}'.format(int(self.verbose)),

Thanx this solved my problem on win10 & python 3.5.4

from multicore-tsne.

guenteru avatar guenteru commented on May 27, 2024

I just tried to replicate this and it works fine for me (python 3.6.2).
Which python version are you running?

from multicore-tsne.

SumNeuron avatar SumNeuron commented on May 27, 2024

from multicore-tsne.

guenteru avatar guenteru commented on May 27, 2024

which command did you use to install?

from multicore-tsne.

SumNeuron avatar SumNeuron commented on May 27, 2024
git clone https://github.com/DmitryUlyanov/Multicore-TSNE.git
cd Multicore-TSNE/
pip install --no-cache-dir .

from multicore-tsne.

guenteru avatar guenteru commented on May 27, 2024

try without --no-cache-dir

from multicore-tsne.

SumNeuron avatar SumNeuron commented on May 27, 2024

from multicore-tsne.

AndrewCurran avatar AndrewCurran commented on May 27, 2024

I am having the same problem on 3.6.2.

from multicore-tsne.

heurainbow avatar heurainbow commented on May 27, 2024

same problem

from multicore-tsne.

overdrivek avatar overdrivek commented on May 27, 2024

any updates regarding this? i have the same issue.

from multicore-tsne.

DmitryUlyanov avatar DmitryUlyanov commented on May 27, 2024

Please try to install with python setup.py install

from multicore-tsne.

akupemula avatar akupemula commented on May 27, 2024

I solved the problem by compiling the shared .so file manually using g++

from multicore-tsne.

LukasMosser avatar LukasMosser commented on May 27, 2024

Python 2.7
Compiled using windows build tools 2017
Installed via pip install. and python setup.py install
Neither work.
Any idea why?

from multicore-tsne.

darthdeus avatar darthdeus commented on May 27, 2024

Tried both python setup.py install, running pip install . and running pip install Multicore-TSNE from the parent dir, neither works on Windows 10 with 2017 devtools.

from multicore-tsne.

abrahamnunes avatar abrahamnunes commented on May 27, 2024

I was experiencing this on one of my machines and so I just updated numpy in my Anaconda distribution. That seemed to fix it.

from multicore-tsne.

fingoldo avatar fingoldo commented on May 27, 2024

@DmitryUlyanov could you kindly take a look, there is still a problem on Windows...
UPD
After server reboot somehow it started working.. )

from multicore-tsne.

adrisede avatar adrisede commented on May 27, 2024

Hi, I also have the same problem on Win 10, and also tried with all the methods mentioned and couldn't make it to work.

from multicore-tsne.

RebekkaWegmann avatar RebekkaWegmann commented on May 27, 2024

I also have the same issue on Win 10.

from multicore-tsne.

IrisStark avatar IrisStark commented on May 27, 2024

Same issue on Win 10. Tried everything above.

from multicore-tsne.

rajbhatti avatar rajbhatti commented on May 27, 2024

Did anyone find any solution? I am getting the same error

from multicore-tsne.

worm6206 avatar worm6206 commented on May 27, 2024

If you are on Windows,

  1. Install MinGW 64. I had it already, but you can install from http://mingw-w64.org/doku.php.
  2. Then add MinGW flag as #32 (comment) describes.
  3. Next, build with python setup.py install
  4. and install with pip install .

from multicore-tsne.

bscully27 avatar bscully27 commented on May 27, 2024

I spent an hour trying different installs with cmd, mingw, pip, setup.py. I'm using python 2.7.10 on windows7. Nothing worked.

I then tried on python3.6, worked immediately.

from multicore-tsne.

mosynaq avatar mosynaq commented on May 27, 2024

I built the lib using MSVS 2017 and it worked. I can share the file. But there is an easier way: use pypi wheel package (pip regular installation process)! It simply works!

from multicore-tsne.

ZippoML avatar ZippoML commented on May 27, 2024

I added '-DCMAKE_GENERATOR_PLATFORM=x64' flag to the setup.py and the problem solved in Win64 (Win10) and Python 3.5.4.

if 0 != execute(['cmake',
'-DCMAKE_GENERATOR_PLATFORM=x64', <----- THIS
'-DCMAKE_BUILD_TYPE={}'.format(build_type),
'-DCMAKE_VERBOSE_MAKEFILE={}'.format(int(self.verbose)),

thx, solved my problem. win 10

from multicore-tsne.

Po-Shin avatar Po-Shin commented on May 27, 2024

Hi, I used pip install MulticoreTSNE and got the same error while running my code. Anyone got the solution to fix it?

thanks!

from multicore-tsne.

ghayth82 avatar ghayth82 commented on May 27, 2024

I added '-DCMAKE_GENERATOR_PLATFORM=x64' flag to the setup.py and the problem solved in Win64 (Win10) and Python 3.5.4.
if 0 != execute(['cmake',
'-DCMAKE_GENERATOR_PLATFORM=x64', <----- THIS
'-DCMAKE_BUILD_TYPE={}'.format(build_type),
'-DCMAKE_VERBOSE_MAKEFILE={}'.format(int(self.verbose)),

thx, solved my problem. win 10

where I can find the setup.py file, please?

from multicore-tsne.

ghayth82 avatar ghayth82 commented on May 27, 2024

If you are on Windows,

  1. Install MinGW 64. I had it already, but you can install from http://mingw-w64.org/doku.php.
  2. Then add MinGW flag as #32 (comment) describes.
  3. Next, build with python setup.py install
  4. and install with pip install .

hi
can you help me , what do you mean by "build with python setup.py install" then install with pip install .` ?
can you provide me with full commands please

from multicore-tsne.

ZippoML avatar ZippoML commented on May 27, 2024

If you are on Windows,

  1. Install MinGW 64. I had it already, but you can install from http://mingw-w64.org/doku.php.
  2. Then add MinGW flag as #32 (comment) describes.
  3. Next, build with python setup.py install
  4. and install with pip install .

hi
can you help me , what do you mean by "build with python setup.py install" then install with pip install .` ?
can you provide me with full commands please

I alrdy forgot what i did to solve the problem. But i think the steps are:

  1. download package from here https://github.com/DmitryUlyanov/Multicore-TSNE
  2. open setup.py install with notepad or jupyter
  3. change the code as was written above
  4. install the pakage by command in cmd. python setup.py install

from multicore-tsne.

arikanev avatar arikanev commented on May 27, 2024

Also having this issue on OSX, @akupemula, can you expand on how to compile the .so with g++ manually? Thanks!

from multicore-tsne.

ntr34g avatar ntr34g commented on May 27, 2024

i've done everything mentioned here #32 (comment)
compiled with cmake x64 and mingw-w64\x86_64-8.1.0-posix-sjlj-rt_v6-rev0

but still getting
"RuntimeError: Cannot find/open tsne_multicore shared library"

from multicore-tsne.

bscully27 avatar bscully27 commented on May 27, 2024

from multicore-tsne.

ntr34g avatar ntr34g commented on May 27, 2024

I added '-DCMAKE_GENERATOR_PLATFORM=x64' flag to the setup.py and the problem solved in Win64 (Win10) and Python 3.5.4.

if 0 != execute(['cmake',
'-DCMAKE_GENERATOR_PLATFORM=x64', <----- THIS
'-DCMAKE_BUILD_TYPE={}'.format(build_type),
'-DCMAKE_VERBOSE_MAKEFILE={}'.format(int(self.verbose)),

this helped me on win 10 x64 python 3.6.8

from multicore-tsne.

Applenice avatar Applenice commented on May 27, 2024

I added '-DCMAKE_GENERATOR_PLATFORM=x64' flag to the setup.py and the problem solved in Win64 (Win10) and Python 3.5.4.

if 0 != execute(['cmake',
'-DCMAKE_GENERATOR_PLATFORM=x64', <----- THIS
'-DCMAKE_BUILD_TYPE={}'.format(build_type),
'-DCMAKE_VERBOSE_MAKEFILE={}'.format(int(self.verbose)),

Thank you very much, this solved my problem,this helped me on windows 10 x64 python 3.6.5

from multicore-tsne.

xDarkLemon avatar xDarkLemon commented on May 27, 2024

Does anyone know hot to fix it on Mac OS?

from multicore-tsne.

zfhxi avatar zfhxi commented on May 27, 2024

Problem:

demo:

from sklearn.datasets import load_digits
from MulticoreTSNE import MulticoreTSNE as TSNE
from matplotlib import pyplot as plt

digits = load_digits()
embeddings = TSNE(n_jobs=4).fit_transform(digits.data)
vis_x = embeddings[:, 0]
vis_y = embeddings[:, 1]
plt.scatter(vis_x, vis_y, c=digits.target, cmap=plt.cm.get_cmap("jet", 10), marker='.')
plt.colorbar(ticks=range(10))
plt.clim(-0.5, 9.5)
plt.show()

If you run this demo, the error may occurr:

Traceback (most recent call last):
  File "/xxxx/miniconda3/xxx/test_MultiCore_TSNE.py", line 10, in <module>
    embeddings = TSNE(n_jobs=4).fit_transform(digits.data)
  File "/xxxx/miniconda3/xxx/site-packages/MulticoreTSNE/__init__.py", line 103, in __init__
    raise RuntimeError('Cannot find/open tsne_multicore shared library')
RuntimeError: Cannot find/open tsne_multicore shared library

Explore:

Open /xxx//miniconda3/xxx/site-packages/MulticoreTSNE/__init__.py to check what makes it happen,and locate to around line 103:

path = os.path.dirname(os.path.realpath(__file__))
try:
    sofile = (glob(os.path.join(path, "libtsne*.so")) + glob(os.path.join(path, "*tsne*.dll")))[0]
    self.C = self.ffi.dlopen(os.path.join(path, sofile))
except (IndexError, OSError):
    raise RuntimeError('Cannot find/open tsne_multicore shared library')

To get more concrete information about this error, we can modified this source code as follow:

path = os.path.dirname(os.path.realpath(__file__))
try:
    sofile = (glob(os.path.join(path, "libtsne*.so")) + glob(os.path.join(path, "*tsne*.dll")))[0]
    self.C = self.ffi.dlopen(os.path.join(path, sofile))
# except (IndexError, OSError):
# raise RuntimeError('Cannot find/open tsne_multicore shared library')

except IndexError as e:
    print(e)
    exit(-1)

except OSError as e1:
    print(e1)
    exit(-1)

Then run the demo again, errors may occurr as follow:

cannot load library '/xxxx/miniconda3/xxx/site-packages/MulticoreTSNE/libtsne_multicore.so':
 /xxxx/miniconda3/xxx/site-packages/scipy/_lib/_uarray/../../../../../libstdc++.so.6: version `GLIBCXX_3.4.29' not found
 (required by /xxxx/miniconda3/xxx/site-packages/MulticoreTSNE/libtsne_multicore.so)

From this information, we can see that there's no GLIBCXX_3.4.29 in libstdc++.so.6. Test it as follow:

$ real path /xxxxx/miniconda3/xxx/scipy/_lib/_uarray/../../../../../libstdc++.so.6
$ /xxxx/miniconda3/xxx/lib/libstdc++.so.6.0.26
$ strings /xxxx/miniconda3/xxx/lib/libstdc++.so.6.0.26  | grep GLIBCXX_3.4.29
$ # return nothing

Solution

Reference:https://blog.csdn.net/qq_39295044/article/details/86685729

We can find /usr/lib/libstdc++.so.6.0.29 contains GLIBCXX_3.4.29, test it:

$ strings /usr/lib/libstdc++.so.6 | grep GLIBCXX_3.4.29
GLIBCXX_3.4.29
GLIBCXX_3.4.29

This lib file satisfies the requirement, so we can replace /xxxx/miniconda3/xxx/lib/libstdc++.so.6.0.26 with /usr/lib/libstdc++.so.6.0.29:

$ mv /xxxx/miniconda3/xxx/lib/libstdc++.so.6.0.26 /xxxx/miniconda3/xxx/lib/libstdc++.so.6.0.26_bak
$ ln -s /usr/lib/libstdc++.so.6.0.29 /xxxx/miniconda3/xxx/lib/libstdc++.so.6.0.26

Run the demo again, good lucky!

from multicore-tsne.

shayantabatabaee avatar shayantabatabaee commented on May 27, 2024

I also encountered a similar issue, but I managed to resolve it by following these steps:

  1. First, I downloaded the Mingw64 compiler for Windows from the official website: https://winlibs.com/#download-release.

  2. Once the download was complete, I installed the Mingw64 compiler on my system.

  3. After installing Mingw64, I changed the following code to build the project:

if 0 != execute(['cmake',  
                         '-G', 'MinGW Makefiles',  <----- This Line
                         '-DCMAKE_BUILD_TYPE={}'.format(build_type),
  1. I compiled the project using the Mingw64 compiler, and fortunately, it worked perfectly fine.

By following these steps and utilizing the Mingw64 compiler, I was able to overcome the problem.

MulticoreTSNE-0.1-cp37-cp37m-win_amd64.zip

from multicore-tsne.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.