LoginSignup
1
1

More than 1 year has passed since last update.

初心者がimport torchではまった件

Last updated at Posted at 2022-03-08

機械学習プログラミング初心者がPyTorchのインポートではまった。

pip install  torch

を実行して

import torch

のコードを実行すると

NameError: name '_C' is not defined

というエラーが出た。
調べてみるとCythonのインストールが必要らしい。

pip install Cython

をターミナルで実行した後もう一度コードを実行してみると。

いけた。

【参照】
https://github.com/pytorch/pytorch/issues/1633

1
1
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1