turicreate
turicreate copied to clipboard
cannot enable executable stack as shared object requires: Invalid argument
Hi all, I'm using turi in the WSL of win10. I install the Ubuntu, log on "bash" in the cmd.exe. Then I input these commands:
sudo apt-get install build-essential
cd /mnt/d/Anaconda bash Anaconda3-5.1.0-Linux-x86_64.sh
sudo apt-get install -y libblas3 liblapack3 libstdc++6 python-setuptools sudo easy_install pip wget http://security.ubuntu.com/ubuntu/pool/main/g/gcc-5/gcc-5-base_5.4.0-6ubuntu1~16.04.9_amd64.deb wget http://security.ubuntu.com/ubuntu/pool/main/g/gcc-5/libstdc++6_5.4.0-6ubuntu1~16.04.9_amd64.deb sudo dpkg -i gcc-5-base_5.4.0-6ubuntu1~16.04.9_amd64.deb sudo dpkg -i libstdc++6_5.4.0-6ubuntu1~16.04.9_amd64.deb
conda create -n turi python=3.6 anaconda cd /mnt/d/"Program Files"/"jupyter notebook"/ipynb source activate turi pip install -U turicreate jupyter-notebook password jupyter notebook
Then I open Chrome in win10, and type in:
http://127.0.0.1:8888/tree
Then I type in the login password of Jupyter notebook, write a ipynb with following codes:
import turicreate as tc img_folder = 'image' data = tc.image_analysis.load_images(img_folder, with_path=True) data['label'] = data['path'].apply(lambda path: 'good' if 'good' in path else 'bad') data.explore() train_data, test_data = data.random_split(0.8, seed=2) > model = tc.image_classifier.create(train_data, target='label')
The last command is my doom. The Jupyter notebook inform me that:
OSError: /home/w/anaconda3/envs/turi/lib/python3.6/site-packages/mxnet/libmxnet.so: cannot enable executable stack as shared object requires: Invalid argument
I cannot fix this, so I repeat the above commands to uninstall and re-install the turicreate expect:
conda create -n turi python=2.7 anaconda
I only modify the above operations with the version of the envs of Python. Then I run Jupyter notebook, open Chrome in win10 and login, and run the codes. Then at the code:
> model = tc.image_classifier.create(train_data, target='label')
It inform me:
---> 30 from . import libinfo ImportError: cannot import name libinfo
What happened? I just wish to run the turi in the Chrome as usual... Can anyone help me? Thanks.
Hmm. I suspect the first issue you ran into is a bug in WSL (looks like https://github.com/Microsoft/WSL/issues/916 ). I'll see if there is any way we can work around this on our end.
The second issue looks like the environment isn't set up correctly. Is it possible that the jupyter
command is running from a different conda env than the one you created with that command? I have found that commands running from different envs (for instance, if which jupyter
or which ipython
returns a different location than which conda
or which pip
) it can cause issues finding packages on import.
Need to try the workaround given in https://github.com/Microsoft/WSL/issues/916#issuecomment-365898305
The workaround is when using turicreate in a virtual environment is
sudo apt-get install prelink
sudo execstack -c ./{virtual_environment_name}/local/lib/python2.7/site-packages/mxnet/libmxnet.so
This is ultimately an issue in mxnet. For now, it's not actionable on our end -- but we will leave the issue open until it's fixed. In the meantime, please use the workaround given above.
@kld123509945 - MXNet has been removed as a dependency. Please try using TuriCreate again with Jupyter Notebook and WSL. If you get an error, please share the entire stack trace.