no module named rsi2 in python? cannot import through pip

165 views Asked by At

I'm new to python, and trying to get a simple backtest to work using these examples pyalgotrade examples however when I try to run the line:

import rsi2

in an IPython Notebook I get:

ModuleNotFoundError: No module named 'rsi2'

Since every other import line works I'm not sure what I am missing. I tried:

  • searching the python package documentation for rsi2, but nothing showed up
  • searching StackOverflow, but none of these helped: here here (returned no matching distribution found)
1

There are 1 answers

1
jwodder On BEST ANSWER

The pyalgotrade examples you linked to include a block of code with the heading "Save this code as rsi2.py:". This file is the rsi2 that import rsi2 is trying to import. You need to save the given code as rsi2.py and store it in your working directory, next to any other files that contain "import rsi2".