-
Notifications
You must be signed in to change notification settings - Fork 6
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
import cld3 -> not found after 'correct' pip install #5
Comments
@MariusMez I am actually having this same exact problem on a fresh test install |
Okay, it seems like this is related to the fact that the only wheel is for OS X 10.15 / CPython 3.7. I.e., installing on OS X with Python 3.7 will point pip/conda to the wheel (pycld3-0.16-cp37-cp37m-macosx_10_15_x86_64.whl), whereas installing with anything else (even just Python 3.8 on OS X 10.15) will download pycld3-0.16.tar.gz and build it locally: $ python -m pip install --no-cache-dir pycld3
Collecting pycld3
Downloading https://files.pythonhosted.org/packages/df/f9/8a3c0b13e94102aec5fdb7a0b9873dd093987739f83081248ccea02b4038/pycld3-0.16.tar.gz (721kB)
|████████████████████████████████| 727kB 3.8MB/s
Installing collected packages: pycld3
Running setup.py install for pycld3 ... done
Successfully installed pycld3-0.16
$ python
Python 3.8.1 (default, Jan 3 2020, 20:52:38)
[Clang 11.0.0 (clang-1100.0.33.12)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import cld3
>>> cld3
<module 'cld3' from '.../python3.8/site-packages/cld3.cpython-38-darwin.so'> ...so, I can only suspect this might be due to OS X minor version upgrade. I'm going to try either re-building the wheel or not distributing it at all. Ref: https://packaging.python.org/guides/distributing-packages-using-setuptools/#platform-wheels |
Hi @MariusMez , this should be fixed, can you try I uploaded a new version to PyPI which has fresh wheels built for Python 3.8 and uses source distribution for Python 3.7. Both of those are working for me and import okay. |
Hi @bsolomon1124 thanks for the new wheels.
Seems a bug related to Xcode version (I've the latest install, with xcode cli updated too) |
This is a tough one for me to debug since weirdly I am not seeing this on my own OS X @MariusMez. The difficulties of C++ extensions extra_compile_args=["-std=c++11"], we may want extra_compile_args=["-std=c++11", "-stdlib=libc++"], (Which on Mac actually gets passed to If you are up for it, would you mind trying that out? You can download https://files.pythonhosted.org/packages/44/15/77e4a9b53b53a6705727420a044c653d27ab49d4b6cd2336f056f134493c/pycld3-0.17.tar.gz, unzip, and change line 78 in Thank you for bearing with me here. |
Thank you for your help @bsolomon1124 :-) I managed to install it correctly with your recommendation and by adding an extra parameter: # https://docs.python.org/3/distutils/setupscript.html#describing-extension-modules
ext = [
Extension(
"cld3", # Name of the extension by which it can be imported
sources=SOURCES,
include_dirs=INCLUDES,
libraries=LIBRARIES,
language="c++",
extra_compile_args=["-std=c++11", "-stdlib=libc++"],
extra_link_args=['-stdlib=libc++']
)
] With that setup, install is a success! |
Related: ebca462 |
Hi @bsolomon1124
First of all, thanks for your work on this python module :-)
I try to use it on my mac (10.15.2, python 3.7.1 (conda env) and libprotoc 3.11.2) according to the readme (brew install protobuf too), the command
python -m pip install pycld3
works well (no errors)But when in my code I
import cld3
I have an error telling me :Library not loaded: /usr/local/opt/protobuf/lib/libprotobuf.21.dylib
After checking on my system, seems I have libprotobuf.22.dylib installed
Don't know what to do ?
The text was updated successfully, but these errors were encountered: