I have done the following:
- Installed miniconda in my environment using brew (currently using a mac)
- Successfully created an environment
conda create -name marcelo
- Go to my dev directory and did
code .
- Make sure to configure the correct interpreter by doing
CMD+SHIFT+p
and selectedmarcelo
in the drop down - Configure the tests for pythong by doing
CMD+SHIFT+p
and selectedpytest
and the directory - Install all my dependencies by doing
pip install -r requirements.txt
- Validated that I have all the requirements by doing the following
pip list
. I am using the moduleccxt
so I was able to check the dependency on the list and it is there - Created a small integration test using ccxt within my test
- When trying to debug the test, I got the following error:
ModuleNotFoundError: No module named 'ccxt'
- When I did the following on the terminal
pytest mlthon/tests/ccxt/kraken/kraken_client_test.py
it is successful with all the test - I figured that the problem is with the
debugpy
and it is not using the current virtual environmentmarcelo
set up in my conda profiles - Setup the following
launch.json
below; however, I am still not able to run my test in the debug because it is still not able to find theccxt
module. I also noticed that I am not seeing my pytest forccxt
in the testing screen
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python Debugger: Current File",
"type": "debugpy",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"python": "/usr/local/Caskroom/miniconda/base/envs/marcelo/bin/python",
"pathMappings": [
{
"localRoot": "${workspaceFolder}",
"remoteRoot": "."
}
]
}
],
"python.defaultInterpreterPath": "/usr/local/Caskroom/miniconda/base/envs/marcelo//bin/python",
"python.envPath": "/usr/local/Caskroom/miniconda/base/envs/marcelo/",
"python.linting.enabled": true,
"python.linting.pylintEnabled": true,
"python.testing.pytestEnabled": true,
"python.linting.pycodestyleEnabled": false,
"python.linting.flake8Enabled": false,
"python.testing.unittestEnabled": false,
"python.testing.nosetestsEnabled": false,
"python.envFile": "${workspaceFolder}/.env",
"python.testing.pytestArgs": ["mlthon/tests"],
"python.pythonPath": "/usr/local/Caskroom/miniconda/base/envs/marcelo//bin/python",
}