Sublime Text 3 and Terminus how to point to the correct path/pyenv

Viewed 57

When I try to import pytorch, I get this error:

Traceback (most recent call last):   File "/Users/Username/Documents/hello_test.py", line 1, in <module> import torch 
ModuleNotFoundError: No module named 'torch' [Finished in 36ms with exit code 1] 
[cmd: ['python3', '-u', '/Users/Username/Documents/hello_test.py']] 
[dir: /Users/Username/Documents] 
[path: /opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin]

I've seen some other posts saying path is not needed and such, but I don't know where to edit the path out or what to do. In addition, I actually use pyenv. Is there a way to use pyenv with terminus in sublime text 3 (a lot of the other posts seem to deal with windows instead of mac, and mine is arm64) so I'm not sure where to even begin. How can I point my build to the correct path/pyenv?

Any help will be much appreciated

Edit: Extra info When i type:

import sys
print (sys.version)
print ("hello world")

I get:

3.8.9 (default, Aug  3 2021, 19:21:54) 
[Clang 13.0.0 (clang-1300.0.29.3)]
hello world
[Finished in 35ms]

So i guess it kind of works, just that it doesn't have access to the packages?

0 Answers
Related