The pypy python3 interpreter won't recognize a folder within the current directory

37 views Asked by At

I have recently downloaded pypy via homebrew with brew install pypy in my home directory. However, when I went into VScode and tried running my program with pypy:

pypy won't recognize a folder in my current directory.

Heres is the format:

Analyzer
- testSingularSTOCH.py
- src
   - WMA (inside contains get_WMA)

I'm running this command in the Analyzer directory:

pypy testSingularSTOCH.py

And I'm receiving an error of

  File "testSingularSTOCH.py", line 3, in <module>
    from src.WMA import get_WMA
ImportError: No module named src

How would I fix this error?

I tried changing src.WMA --> WMA however, it still gave the error.

I tried removing src.WMA, but the problem seems to occur with the srcLONGTERM directory too.

Solution: brew install pypy installs python 2 version, must install pypy via brew for python version 3

0

There are 0 answers