Python PyTorch install tips

If you pinpoint this error, go to PyTorch Forums. .. ..

import torchvision.transforms as transforms Traceback (most recent call last): File "", line 1, in File "/home/hogehoge/anaconda3/envs/py36/lib/python3.6/site-packages/torchvision-0.1.8-py3.6.egg/torchvision/init.py", line 2, in File "/home/hogehoge/anaconda3/envs/py36/lib/python3.6/site-packages/torchvision-0.1.8-py3.6.egg/torchvision/datasets/init.py", line 1, in File "/home/hogehoge/anaconda3/envs/py36/lib/python3.6/site-packages/torchvision-0.1.8-py3.6.egg/torchvision/datasets/lsun.py", line 2, in File "/home/hogehoge/anaconda3/envs/py36/lib/python3.6/site-packages/PIL/Image.py", line 56, in from . import _imaging as core ImportError: /home/hogehoge/anaconda3/envs/py36/lib/python3.6/site-packages/PIL/_imaging.cpython-36m-x86_64-linux-gnu.so: undefined symbol: PySlice_Unpack

Well, I've been suffering from this error for a long time. My environment is python 3.6 conda install pytorch torchvision -c soumith Created with.

The solution is to change to python 3.5. that's all

$ conda create -n py35 python=3.5
$ conda activate py35
(py35)$ conda install pytorch torchvision -c soumith

So, it works for the time being. that's all

Recommended Posts

Python PyTorch install tips
Install pytorch
install python
python tips
Install PyTorch
Python Tips
Python tips
Install Pytorch on Blender 2.90 python on Windows
Python Conda Tips
Python debugging tips
Python click tips
Install Python locally
Unexpectedly (?) Python tips
Install NAOqi python
Install Python Control
CentOS8 --Install --Python3
Install python on WSL
Python and numpy tips
Install Python on Pidora.
Install Scrapy on python3
Install Python on Mac
How to install python
Install Python 3 on Mac
Install python from source
Install Python3.4 on CentOS 6.6
Python beginners touch Pytorch (3)
Install Python Jupyter lab
Install python external library
Python Tips (my memo)
Install Voluptuous with Python 2.5
Install python on windows
Install torch-scatter with PyTorch 1.7
Install Python 2.7.3 on CentOS 5.4
Install python with pyenv
Python beginners touch Pytorch (1)
Python beginners touch Pytorch (2)
Install Python 3.3 on Ubuntu 12.04
Install Python 3.4 on Mac
[Blender x Python] Blender Python tips (11/100)
Install Python 3.6 on Docker
Install Python (for Windows)
[2020.8 latest] How to install Python
Python / Numpy np.newaxis thinking tips
How to install Python [Windows]
Install Python 3.8 on RHEL 8 (AppStream)
PyTorch C ++ VS Python (2019 Edition)
Install Python and Flask (Windows 10)
Install Python environment with Anaconda
Install pygame on python3.4 on mac
Windows10: Install python dlib library
Install Python 3.8 on CentOS 7 (SCL)
Receiving standard input tips @ python
Install external libraries with Python
Install multiple versions of Python
Install pandas 0.14 on python3.4 [on Mac]
Install Python 3.7 and Django 3.0 (CentOS)
Install OpenCV on Ubuntu + python
Python --Install MySQLDB on EC2
Install pyenv from Homebrew, install Python from pyenv
[Mac] Tips: Install pyquery on Mac [pyquery]
Install Python 3.8 on CentOS 8 (AppStream)