Does anyone else have this issue? For reference check this screenshot:
PIP is also up to date and I already tried reinstalling it but it didn’t work neither. I’m using VS Code. It also worked just fine yesterday but today it didn’t anymore for some reason.
The other solution can be to add the path of your package to sys.path:
import sys
my_pkgs_path = r'/home/.../my_pkgs'
if my_pkgs_path in sys.path:
print('already in sys.path')
else:
print('not found in sys.path')
sys.path.append(my_pkgs_path)
print('Added to sys.path')
If you are using multiple versions of python or use any python version in appdata, without venv, you can try running "pip install mss" from elevated (administrator) cmd instance within python install directory/scripts, shown on the console image above. If it is not the right python version used in the project, same applies to any installed python version. If IDE is used check interpreter setting to determine which one is in play.
4
Answers
you can try installing mss outside of the venv and see if that works. also check that the venv you’re using is the right one according to vscode
If you are using a virtual environment, you can install you package directly there. For windows:
More reading
The other solution can be to add the path of your package to
sys.path
:If you are using multiple versions of python or use any python version in appdata, without venv, you can try running "pip install mss" from elevated (administrator) cmd instance within python install directory/scripts, shown on the console image above. If it is not the right python version used in the project, same applies to any installed python version. If IDE is used check interpreter setting to determine which one is in play.
Your mss package is installed locally, but you are using a virtual environment to run code.
Two solutions:
1. Switch the interpreter to the local interpreter, which is the
c:UsersAnwenderAppDataLocal....
in your pictureCtrl+Shift+P to open the command palette, search for and select
Python:Select Interpreter
Select the interpreter with the
mss
package installed2. Install the
mss
package for your virtual environmentSelect the virtual environment interpreter in the selection panel
Create a new terminal activation environment
Install
mss
package using commandpip install mss