Closed Energyquantum closed 6 years ago
Does python -c 'import torch'
work? If not looks like you have a problem with your torch installation which is the first thing you should fix.
I too had this problem, and with python -c 'import torch'
working. What worked for me was to manually run each command for the targets in the Makefile
, and then no errors arose from import torch
. Because I normally reserve the command python
for working with 2.7
and command python3
for my current 3.x version (for which PyTorch is installed), interestingly doing an alias python=python3
also ended up in still having errors when running the Makefile
. But changing the Makefile
to use python3
wherever it stated python
, actually DID end up in being built successfully.
Hi,
I have successfully installed the following: virtualenv e2e_awni source e2e_awni/bin/activate cd speech pip install -r requirements.txt
As the next step, should I install pytorch while virtualenv is activated or not?
The following errors occur If I install pytorch when virtualenv is activated:
(e2e_awni)kevin@DEVBOX2:~$ pip install http://download.pytorch.org/whl/cu80/torch-0.4.1-cp27-cp27mu-linux_x86_64.whl torch-0.4.1-cp27-cp27mu-linux_x86_64.whl is not a supported wheel on this platform. Storing debug log for failure in /home/zhme/.pip/pip.log
(e2e_awni)kevin@DEVBOX2:~$ pip install http://download.pytorch.org/whl/cu80/torch-0.4.1-cp27-cp27m-linux_x86_64.whl torch-0.4.1-cp27-cp27m-linux_x86_64.whl is not a supported wheel on this platform. Storing debug log for failure in /home/zhme/.pip/pip.log
I can successfully install pytorch when virtualenv is deactivated. But the following errors occur when I run pytest under speech/tests after "make".
(e2e_awni)kevin@DEVBOX2:~/speech/tests$ pytest
================================================================================== ERRORS =================================================================================== _ ERROR collecting ctc_test.py __ ImportError while importing test module '/home/kevin/speech/tests/ctc_test.py'. Hint: make sure your test modules/packages have valid Python names. Traceback: ctc_test.py:2: in
import torch
E ImportError: No module named torch
____ ERROR collecting io_test.py ____
ImportError while importing test module '/home/kevin/speech/tests/io_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
io_test.py:3: in
import speech.models
E ImportError: No module named speech.models
__ ERROR collecting loader_test.py __
ImportError while importing test module '/home/kevin/speech/tests/loader_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
loader_test.py:3: in
from speech import loader
E ImportError: No module named speech
__ ERROR collecting model_test.py ___
ImportError while importing test module '/home/kevin/speech/tests/model_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
modeltest.py:3: in
import torch
E ImportError: No module named torch
ERROR collecting seq2seq_test.py __
ImportError while importing test module '/home/kevin/speech/tests/seq2seq_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
seq2seq_test.py:3: in
import torch
E ImportError: No module named torch
___ ERROR collecting wave_test.py ___
ImportError while importing test module '/home/kevin/speech/tests/wave_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
wave_test.py:4: in
import speech.utils.wave as wave
E ImportError: No module named speech.utils.wave
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 6 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
========================================================================== 6 error in 0.23 seconds ==========================================================================
Could you help me out?
Thank you.