0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

jetson nano上でpytorchをimportしようとするもエラー(ImportError: No module named builtins)

Posted at

jetson nano上でpytorchをimportしようとするもエラー

# python -c 'import torch; print(torch.__version__) '
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/torch/__init__.py", line 19, in <module>
    from ._six import string_classes as _string_classes
  File "/usr/local/lib/python2.7/dist-packages/torch/_six.py", line 23, in <module>
    import builtins
ImportError: No module named builtins

こちらこちらを参考に、futureをインストールして解決。

# pip install future
Collecting future
  Downloading https://files.pythonhosted.org/packages/45/0b/38b06fd9b92dc2b68d58b75f900e97884c45bedd2ff83203d933cf5851c9/future-0.18.2.tar.gz (829kB)
    100% |################################| 829kB 416kB/s 
Building wheels for collected packages: future
  Running setup.py bdist_wheel for future ... done
  Stored in directory: /root/.cache/pip/wheels/8b/99/a0/81daf51dcd359a9377b110a8a886b3895921802d2fc1b2397e
Successfully built future
Installing collected packages: future
Successfully installed future-0.18.2
# python -c 'import torch; print(torch.__version__) '
1.4.0a0+7f73f1d

参考

https://stackoverflow.com/questions/27495752/no-module-named-builtins
ytorch-for-jetson-version-1-7-0-now-available

0
0
0

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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?