Gensim was installed successfully, but a runtimeerror occurred during import
the runtime error is as follows:
runtimeerror: Python extensions are unavailable. Without them, this gensim functionality is disabled. If you’ve installed from a package, ask the package maintainer to include Python extensions. If you’re building gensim from source yourself, run python setup. py build_ Ext — inplace and retry.
after reading other users’ articles, it is found that numpy and SciPy are incompatible with gensim
The solution steps are as follows
-
- view the python adaptation information, download the adapted numpy and SciPy WHL files, install the WHL files, download the gensim again, and run successfully.
First, check the version information of your Python adaptation before downloading the file
Open CMD and directly enter PIP debug -- verbose
on the command line. The results are as follows
after finding it, go to the following link to download the adapted numpy and SciPy files
https://www.lfd.uci.edu/ ~gohlke/pythonlibs/
The corresponding downloaded file on my computer is
After downloading, enter CMD
CD to download SciPy and numpy + MKL
Python – M PIP install scipy-1.7.2-cp37-cp37m-win_ amd64.whl
python -m pip install numpy-1.21.4+mkl-cp37-cp37m-win_ amd64.whl
Then uninstall gensim and install gensim
finally, you can import
Read More:
- [Solved] Error d8021: invalid numeric parameter “/wno CPP” cython_bbox
- SharePoint site shows ‘Service Unavailable. HTTP Error 503. The service is unavailable’
- [Solved] Software Compile Error: xdo.c:29:34: fatal error: X11/extensions/XTest.h:
- Win10 ImportError: cannot import name NUMPY_MKL
- [Solved] Opencv Compile Error: (CMake Error: The following variables are used in this project, but they are set to not)
- [Solved] Vite Bulk Import import.meta.glob Error: ERR_ABORTED 403 (Forbidden)
- ValueError: Input 0 of node import/save/Assign was passed float from import/beta1_power:0 incompatib
- Keras-nightly Import package Error: cannot import name ‘Adam‘ from ‘keras.optimizers‘
- RuntimeError: implement_array_function method already has a docstring(Pycharm install package error)
- [Solved] error: db5 error(11) from dbenv->open: Resource temporarily unavailable
- [Solved] Eslint error: /xxx/components/xxx import should occur after import of /xxx/utils/xxx
- RuntimeError: Integer division of tensors using div or / is no longer supported, and in a future rel
- Widgets are not available. Please install widgetsnbextension or ipywidgets 4.0
- [Solved] MXNet Error: ImportError: cannot import name _LIB
- [Solved] graphviz Error: failed to execute [‘dot’, ‘-Tsvg’], make sure the Graphviz executables are on your systems’ PATH
- [Solved] MindSpore Error: “RuntimeError: Unable to data from Generator..”
- Mac Docker pull Error: Error response from daemon: Get https://xx.xx.xx.xx/v2/: Service Unavailable
- [Solved] LaTex Error: Critical Package ctex Error: CTeX fontset `fandol‘ is unavailable in current(ctex) mode. }
- [Solved] MindSpore Error: “RuntimeError: Invalid data, Page size.”
- [Solved] RuntimeError: each element in list of batch should be of equal size