Hi guys,
I am getting this error even after running the following codes and activate quantra_py
ModuleNotFoundError: No module named 'data_modules'
- A) For creating new environment with machine learning libraries:
conda env create -f https://quantra.quantinsti.com/downloads/machinelearning/environment.yml
- B) For creating new environment without machine learning libraries:
conda env create -f https://quantra.quantinsti.com/downloads/general/environment.yml
I am stuck, and really won't to proceed.
Will appreciate your reply
Hey Saurabh,
I believe this is similar to a query posted in another thread. As mentioned, I think if you download all the files from the last section of the course, then you should be able to run the files without any issue.
Hope it works for you and you begin your journey in the world of algo trading with no obstacles further.
Thanks.
I am facing with the same problems, Could you please help me with the files that I need to download.
Hi Shubham,
Typically, all the strategy as well as concept related notebooks which are present in the course, can be downloaded as a zip file from the last section of the said course.
Once you download the zip file, you can unzip it to find folders which are named according to the sections of the course. Apart from that, there is a folder named "data_modules" which consists of the data as well as the modules which were used in the course.
For example, if you are going through the course getting market data, you will find mention of the module "FMDA_quantra" in the notebook code.
Since the Quantra portal has all the files, you can simply run it in the browser. When it comes to running it on a local system, you need to make sure this file is present on your system as well.
Don't worry, you will find this file in the downloaded zip file at the end of the couse.
Let’s say the function “get_twitter_tokens” is stored in the “FMDA_quantra.py” file. As specified earlier, the module is in the data_modules folder.
The location is given as .“C:\Users\rekhi\Downloads\Tweets_Data\data_modules”,
and the notebook “Fetch_Tweets_using_Search_Method.ipynb” is in the folder “C:\Users\rekhi\Downloads\Tweets_Data”.
2. You would first write the line "import os" and
“import sys” which will help you in importing functions in modules.
3. You would then write “sys.path.append(“…”)” so that we can add a specific path for the interpreter to search.
4. Finally, we specify the name of the file and function we want to import. Here the name of the file is "get_twitter_tokens" and the function name is "FMDA_quantra".
Thus, the code will be as follows
import os
import sys
sys.path.append("…")
from data_modules.FMDA_quantra import get_twitter_tokens