Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip install torchtext==0.7.0 installs incompatible PyTorch 1.7.0 #1063

Closed
da03 opened this issue Oct 29, 2020 · 7 comments 路 Fixed by #1067
Closed

pip install torchtext==0.7.0 installs incompatible PyTorch 1.7.0 #1063

da03 opened this issue Oct 29, 2020 · 7 comments 路 Fixed by #1067

Comments

@da03
Copy link

da03 commented Oct 29, 2020

馃悰 Bug

Describe the bug
Recently, after I do pip install torchtext==0.7.0, import torchtext would cause segmentation fault. I found that degrading pytorch to 1.6.0 fixes this issue.

To Reproduce
Steps to reproduce the behavior:

  1. pip install torchtext==0.7.0 (assuming that pytorch is not installed yet, and this command will install the latest pytorch)
  2. python -c "import torchtext"

Expected behavior
Segmentation Fault

Environment

  • PyTorch Version (e.g., 1.0): 1.7.0
  • OS (e.g., Linux): Linux/MacOS
  • Python: 3.8.3
@zhangguanheng66
Copy link
Contributor

Yup. That's expected. Since we add cpp extension in torchtext, we have to publish torchtext and pytorch together for compatibility. You should use torchtext=0.8.0 with torch=1.7.0. Any version before 0.7.0 has python only so the compatibility is not an issue. Feel free to re-open the issue if you still have questions.

@mthrok
Copy link
Contributor

mthrok commented Oct 29, 2020

But, shouldn't pip install torchtext==0.7.0 install pytorch==1.6 then?

@zhangguanheng66
Copy link
Contributor

But, shouldn't pip install torchtext==0.7.0 install pytorch==1.6 then?

It should but obviously it didn't. If users would like the access to the previous version, please follow the version compatibility on README file of the repo.

@da03
Copy link
Author

da03 commented Nov 3, 2020

But, shouldn't pip install torchtext==0.7.0 install pytorch==1.6 then?

It should but obviously it didn't. If users would like the access to the previous version, please follow the version compatibility on README file of the repo.

Is it possible for you to fix this such that pip install torchtext==0.7.0 automatically installs pytorch==1.6 ? torchtext 0.7.0 was released only a few months ago and lots of users are still using that due to the overhaul of code in later versions (such as the retiring of Field and Batch).

@zhangguanheng66
Copy link
Contributor

zhangguanheng66 commented Nov 3, 2020

Let me follow-up with @seemethere

@mthrok mthrok changed the title Torchtext 0.7.0 does not work with pytorch 1.7.0 pip install torchtext==0.7.0 installs incompatible PyTorch 1.7.0 Nov 3, 2020
@seemethere
Copy link
Member

Yup looks like this is a real bug, we don't actually set a specific torch version in the setup.py

https://github.com/pytorch/text/blob/v0.8.0-rc2/setup.py#L85

@zhangguanheng66
Copy link
Contributor

zhangguanheng66 commented Nov 3, 2020

This will be addressed in the next release to fix the torch/torchtext version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants