-
Notifications
You must be signed in to change notification settings - Fork 70
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
wrap_train #28
Comments
There seems some problems with my pre-built wheel package. I will rebuild them. |
I rebuilt them and uploaded to https://github.com/peterwittek/somoclu/releases/tag/1.6 because pypi doesn' t allow files with the same name get reuploaded after deletion. And I remember it may not a building problem as https://github.com/peterwittek/somoclu/tree/master/src/Python#installation documented, before you try the new built packages, you can try using Dependency Walker on |
It must have been the build, cause I reinstalled it using the new 1.6 which you uploaded and it seems to be working fine. |
OK. Thanks for pointing this out. Closing this. |
Hi, I still have the error with os x 10.10 and somoclu 1.6.1. |
Apologies for checking but did you delete all somoclu files and reinstalled fresh? |
@wooandoo Which Python version? How did you install? Wheel package or running setup.py? |
@wooandoo I just built a wheel package for 3.5 you can try installing it https://pypi.python.org/packages/3.5/s/somoclu/somoclu-1.6.1-cp35-cp35m-macosx_10_11_x86_64.whl#md5=e8aef774e93fe47a990798e7771173a2 |
Hi, I keep getting the import error: "Warning: training function cannot be imported. Only pre-trained maps can be analyzed." so wrap_train never gets imported from .somoclu_wrap and thus global name 'wrap_train' is not defined |
@arhuang How did you install? |
I first did it using pip and then the 1.6 version linked above. |
@arhuang What' s your platform and Python version? |
osx 10.11 python 2.7 |
@arhuang Are you using the python installed by |
I am using python installed by homebrew, is that wheel package the one installed with pip? |
@arhuang It should be. You can try downloading the wheel to make sure. |
Am I missing .somoclu_wrap? I get the warning both when i import somoclu and when i use train. |
@arhuang Can you find |
sorry where is the site-packages directory? |
I found a site packages directory in ~Library/Python/2.7/site-packages but it does not include somoclu |
I found somoclu_wrap.py in site packages but not somoclu_wrap.so |
oh wait sorry, I found somoclu_wrap.so |
ok sorry, I think the somoclu_wrap.so didn't install the first time, everything works now. Thanks for your help |
I'm getting the same problem "Warning: training function cannot be imported. Only pre-trained maps can be analyzed." using Python 2.7 (default and virtualenv) on OSX El Capitan. Hopefully someone can help me. I tried installing directly from pip and the wheel package with no luck. |
@kevinayuque Do you mean the system python by "default"? Have you tried the brew python? |
I'm using the python located on /usr/local/bin/python which I think is the homebrew python. This are all the files I have related to somoclu: |
I tried with python3 and still get the same problem. som.train() |
Warning is gone, so I hope it is fine now. Thanks |
I'm having the same problem with installing somoclu on Windows 10 Python 2.7 (using 32 bit). It gives me the same warning and then the error name 'wrap_train' is not defined. I have installed through pip using the whl as well as the executable. I've uninstalled through pip and just deleting the folder. I've installed Visual C++ 2008 express, as well as the redistributable. I've also tried it through winpython https://winpython.github.io/ (64 and 32 bit versions). I was surprised that didn't work and I get the same errors. I tried anaconda and that did work. I tried copying the dll files that come with that version and paste them in the System32 folder to see if that would do it but it didn't. Any other suggestions? Is there a way to test it with winpython? |
Is your Windows 10 32bit or 64bit? |
It's a 64bit version of windows, but 32bit python. It is an installation of python that comes installed with ArcGIS software. Maybe that's the issue. I've managed to get myself setup with Anaconda, so I will use that instead. Thank you, though. |
I am using Windows 10 Python 2.7.11 (using 64 bit). It gives me the same warning and then the error name 'wrap_train' is not defined. Plz help. I installed using pip and wheel for somoclu - 1.7 and before that 1.6.1 too. |
@Apoorvakuril Have you tried adding some dlls as above comments said? |
For Mac users: |
@bennsandoval, thanks for this. If libiomp was migrated to the boneyard, it surely isn't a future-proof solution. As far as I understand, Xcode's clang still does not support OpenMP. On Linux with clang 3.9, the code compiles with OpenMP without any issue. Do you see a better way forward? I can't test it, but would llvm work? |
@peterwittek I tried llvm and did not work. |
Thanks for checking it. I just pushed commit c542db9 to update the Mac-related documentation. |
Facing the same issue on linux machine with python 2.7, using the python installed by anaconda. I'm trying to use pip to install somoclu but getting the 'Warning: training function cannot be imported. Only pre-trained maps can be analyzed' error . Any idea what the issue could be? |
You probably lack a compiler. Either install it from your distribution's repo, or install Anaconda's own by 'conda install gcc'. |
@peterwittek did you manage to fix it for Python 3.5, mac OS 64bit? I proceeded with all the tips listed above, and still get the error: "Warning: training function cannot be imported. Only pre-trained maps can be analyzed. |
The wheel file on PyPI was compiled with Python 3.6. Either upgrade your Python version, or go through the instructions of how to compile it from scratch. |
Sorry currently there is no binary for macOS on pypi now since I have no access to a mac. |
Hi, @xgdgsc & @peterwittek
more info: https://a.pomf.space/zilkxsyxitvy.htm Can you suggest something? |
This usually relates to glibc version, maybe you can try using system python. |
That is precisely the problem. The system GCC and the one that Anaconda was compiled with are different. Either use the system Python or try the experimental conda recipe. |
Thank you @xgdgsc ! installed with pip: |
When you run |
I belive I have CUDAHOME set:
here is the log from my BTW, this I found in setup.py and corrected: |
The log looks fine to me. The CUDA compiler is verbose, but the output is a series of irrelevant warnings. Please try the conda recipe that we are trying to put together. I just tried it, and if you set CUDAHOME, it compiles with GPU kernel and it works from Anaconda. |
I got this error on my fresh install of Windows 10. An easy fix is to download a "Visual C++ Redistributable for Visual Studio 2015" installer or newer. It contains the OpenMP libraries in an easy single click install. Edit: Using Windows 10 64bit, Python 3.6.5 64bit, and SOMOCLU via pip3. |
@xgdgsc I have not \site-packages_somoclu_wrap.[YOUR ARCH].pyd under my python directory. I have try to add MSVCP90.DLL and VCOMP90.DLL to C:\Windows\System32. But it didn't work. How should I fix this problem. |
Hello.
While using somoclu (windows7, python3.4) and calling the som.train() command (with and without args), I get the following error:
som.train(epochs=epochs, radius0=radius0, scale0=scale0)
File "C:\Python34\lib\site-packages\somoclu\train.py", line 158, in train
wrap_train(np.ravel(self._data), epochs, self._n_columns, self._n_rows,
NameError: name 'wrap_train' is not defined
Any ideas?
Thank you!
The text was updated successfully, but these errors were encountered: