pytorch minimum version isn't specified
See original GitHub issueš Bug
Describe the bug
Pytorch minimum version isnāt specified in the setup.py
, but it should be because (e.g) torchtext 0.7 cannot be used with pytorch 1.4 nor 1.5 (it crashes on import).
To Reproduce
(venv) $ pip install torch==1.4 torchtext==0.7
...
(venv) $ python -c 'import torchtext'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "venv/lib/python3.7/site-packages/torchtext/__init__.py", line 42, in <module>
_init_extension()
File "venv/lib/python3.7/site-packages/torchtext/__init__.py", line 38, in _init_extension
torch.ops.load_library(ext_specs.origin)
File "venv/lib/python3.7/site-packages/torch/_ops.py", line 106, in load_library
ctypes.CDLL(path)
File "/home/andrei/.pyenv/versions/3.7.5/lib/python3.7/ctypes/__init__.py", line 364, in __init__
self._handle = _dlopen(self._name, mode)
OSError: libtorch_cpu.so: cannot open shared object file: No such file or directory
and with torch 1.5:
(venv) $ pip install torch==1.5 torchtext==0.7
...
(venv) $ python3 -c 'import torchtext'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "venv/lib/python3.7/site-packages/torchtext/__init__.py", line 42, in <module>
_init_extension()
File "venv/lib/python3.7/site-packages/torchtext/__init__.py", line 38, in _init_extension
torch.ops.load_library(ext_specs.origin)
File "venv/lib/python3.7/site-packages/torch/_ops.py", line 105, in load_library
ctypes.CDLL(path)
File "/home/andrei/.pyenv/versions/3.7.5/lib/python3.7/ctypes/__init__.py", line 364, in __init__
self._handle = _dlopen(self._name, mode)
OSError: venv/lib/python3.7/site-packages/torchtext/_torchtext.so: undefined symbol: _ZN3c1023_fastEqualsForContainerERKNS_6IValueES2_
It does work fine with torch 1.6:
(venv) $ pip install torch==1.6 torchtext==0.7
...
(venv) $ python3 -c 'import torchtext'
Expected behavior Either the torchtext package should specify a minimum version of pytorch so that it doesnāt get accidentally installed when Iām using an older torch version, or it should work with older versions of pytorch.
Screenshots n/a
Environment
- PyTorch Version (e.g., 1.0): 1.4.0 and 1.5.0
- OS (e.g., Linux): Linux
- How you installed PyTorch (
conda
,pip
, source): pip - Build command you used (if compiling from source): n/a
- Python version: 3.7
- CUDA/cuDNN version: n/a
- GPU models and configuration: n/a
- Any other relevant information:
Additional context Add any other context about the problem here.
Issue Analytics
- State:
- Created 3 years ago
- Comments:15 (5 by maintainers)
Top Results From Across the Web
[SOLVED] PyTorch no longer supports this GPU because it ...
Recently, I update the pytorch version to '0.3.1'. I have received the following warning message while running code: āPyTorch no longerĀ ...
Read more >Updating pytorch issues
I update my pytorch source code version from github when I install it I got many errors related to this error: there are...
Read more >Start Locally | PyTorch
To install PyTorch via pip, and do have a CUDA-capable system, in the above selector, choose OS: Linux, Package: Pip, Language: Python and...
Read more >Minimum CUDA compute compatibility for PyTorch 1.3
No, I am using Linux, and according to nvidia, the minimum driver for Linux is ... I don't think I am using a...
Read more >GPU compute capability support for each pytorch version
uses a ācuda versionā that supports a certain compute capability, that pytorch might not support that compute capability. The installationĀ ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Iāll open a PR for this, because I notice thereās a āversion compatibilityā table in the README, but that should really be encoded in the setup.py.
@wconstab This issue isnāt really about pip vs conda, itās more that new versions of torchtext are compiled against specific torch versions and you have to use compatible versions.
How come youāre unwilling to encode that information in
setup.py
?