FreeBSD 13.1-REL
Python 3.11 (installed from packages)
VS Code OSS 1.70.2 (installed from packages)
I'm a beginner python programmer, so please be gentle. I've been working through Python exercises using the VS Code IDE. Although FreeBSD had Python 3.9 baked-in, I wanted to learn on the latest version so I installed Python 3.11. So now I have both it and 3.9 co-existing. That has seemed fine.
I'm learning to use pytest now, and while the tutorials instruct installing it via pip, it seems pip on FreeBSD is a bit of a minefield. It seems the recommended way is to install things from packages/ports when possible. I did find py-pytest in packages so I installed that. It runs fine from the command line manually, although it's configured to use Python 3.9. That hasn't seemed to be an issue.
However, now I need to be able to include pytest in code while working in the VS Code IDE. It doesn't seem to be able to find pytest using its normal methods. I do have the Python path set to /usr/local/bin/python3.11 which has been working fine. I also see that pytest is installed in /usr/local/bin . How do I get python3.11 (or perhaps it's VS Code) to be able to find pytest so that I can "import pytest"?
Thanks!
Python 3.11 (installed from packages)
VS Code OSS 1.70.2 (installed from packages)
I'm a beginner python programmer, so please be gentle. I've been working through Python exercises using the VS Code IDE. Although FreeBSD had Python 3.9 baked-in, I wanted to learn on the latest version so I installed Python 3.11. So now I have both it and 3.9 co-existing. That has seemed fine.
I'm learning to use pytest now, and while the tutorials instruct installing it via pip, it seems pip on FreeBSD is a bit of a minefield. It seems the recommended way is to install things from packages/ports when possible. I did find py-pytest in packages so I installed that. It runs fine from the command line manually, although it's configured to use Python 3.9. That hasn't seemed to be an issue.
However, now I need to be able to include pytest in code while working in the VS Code IDE. It doesn't seem to be able to find pytest using its normal methods. I do have the Python path set to /usr/local/bin/python3.11 which has been working fine. I also see that pytest is installed in /usr/local/bin . How do I get python3.11 (or perhaps it's VS Code) to be able to find pytest so that I can "import pytest"?
Thanks!