can someone help me im trying to run a training script for a module and the first error i got in the command prompt is this :
ModuleNotFoundError: No module named ‘torch’
but i already have it installed here are the commands i ran and outputs i got :
C:UsersmohamDesktopmohamadunithesis>pip install torch
Requirement already satisfied: torch in c:usersmohamappdatalocalpackagespythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0localcachelocal-packagespython310site-packages (2.2.2)
Requirement already satisfied: filelock in c:usersmohamappdatalocalpackagespythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0localcachelocal-packagespython310site-packages (from torch) (3.13.1)
Requirement already satisfied: typing-extensions>=4.8.0 in c:usersmohamappdatalocalpackagespythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0localcachelocal-packagespython310site-packages (from torch) (4.9.0)
Requirement already satisfied: sympy in c:usersmohamappdatalocalpackagespythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0localcachelocal-packagespython310site-packages (from torch) (1.12)
Requirement already satisfied: networkx in c:usersmohamappdatalocalpackagespythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0localcachelocal-packagespython310site-packages (from torch) (3.2.1)
Requirement already satisfied: jinja2 in c:usersmohamappdatalocalpackagespythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0localcachelocal-packagespython310site-packages (from torch) (3.1.3)
Requirement already satisfied: fsspec in c:usersmohamappdatalocalpackagespythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0localcachelocal-packagespython310site-packages (from torch) (2024.2.0)
Requirement already satisfied: MarkupSafe>=2.0 in c:usersmohamappdatalocalpackagespythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0localcachelocal-packagespython310site-packages (from jinja2->torch) (2.1.5)
Requirement already satisfied: mpmath>=0.19 in c:usersmohamappdatalocalpackagespythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0localcachelocal-packagespython310site-packages (from sympy->torch) (1.3.0)
C:UsersmohamDesktopmohamadunithesis>where python
C:Usersmoham.pyenvpyenv-winshimspython
C:Usersmoham.pyenvpyenv-winshimspython.bat
C:UsersmohamAppDataLocalMicrosoftWindowsAppspython.exe
C:UsersmohamDesktopmohamadunithesis>python -c “import site; print(site.getsitepackages())”
[‘C:Usersmoham.pyenv\pyenv-winversions3.13.0a6’, ‘C:Usersmoham.pyenvpyenv-winversions3.13.0a6Libsite-packages’]
C:UsersmohamDesktopmohamadunithesis>pip install torch
C:UsersmohamDesktopmohamadunithesis>where python
C:UsersmohamDesktopmohamadunithesis>python -c “import site; print(site.getsitepackages())”
New contributor
moemoussa is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.