Microsoft Visual C++ 14.0 以上が必要です 環境設定がおかしい


序文

gensim のインストール中にエラーが発生しました


Microsoft Visual C++ 14.0 以降が必要です。

gensimのインストール時に以下のエラーが発生

    copying gensim\test\test_data\old_w2v_models\w2v_3.0.0.mdl -> build\lib.win-amd64-3.6\gensim\test\test_data\old_w2v_models
    copying gensim\test\test_data\old_w2v_models\w2v_3.1.0.mdl -> build\lib.win-amd64-3.6\gensim\test\test_data\old_w2v_models
    copying gensim\test\test_data\old_w2v_models\w2v_3.2.0.mdl -> build\lib.win-amd64-3.6\gensim\test\test_data\old_w2v_models
    copying gensim\test\test_data\old_w2v_models\w2v_3.3.0.mdl -> build\lib.win-amd64-3.6\gensim\test\test_data\old_w2v_models
    copying gensim\test\test_data\old_w2v_models\w2v_3.4.0.mdl -> build\lib.win-amd64-3.6\gensim\test\test_data\old_w2v_models
    running build_ext
    building 'gensim.models.word2vec_inner' extension
    error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/

    ----------------------------------------
Command "D:\Anaconda\envs\pytorch\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\thy-DELL\\AppData\\Local\\Temp\\pip-build-vl3hce16\\gensim\\set
up.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\th
y-DELL\AppData\Local\Temp\pip-q0d9ly16-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\thy-DELL\AppDat
a\Local\Temp\pip-build-vl3hce16\gensim\

エラーメッセージ

解決

インストーラー: Microsoft Visual C++ Build Tools 2015、事故がなければ、インストール パッケージが破損しているというバグを報告します
Microsoft Visual C++ Build Tools 2015 インストール インターフェイス

そこで、新たな問題を解決するためにオフラインインストールを採用しており、Baiduのクラウドリンクは以下の通り。解凍後は3つのファイルがあり、exeファイルをダブルクリックするだけでデフォルトでインストールされ、今度はプログレスバーが動くようになります。

リンク:https
://pan.baidu.com/s/10wegoiIz278Tr9OCVPD0nQ抽出コード:g80i
作成時間:2022.6.11

解凍後のフォルダ
インストール成功
さあ、gensimをインストールしてください

インストール成功

参照ブログ、助けてくれてありがとう

https://blog.csdn.net/weixin_40547993/article/details/89399825
https://blog.csdn.net/Zhou_Yulong/article/details/117264550

おすすめ

転載: blog.csdn.net/qq_37386752/article/details/125237065