Yardım Python import problemi

Bu konuyu okuyanlar

NKG

Öğrenci
Katılım
13 Şubat 2022
Mesajlar
2
Reaksiyon puanı
0
Puanları
1
Yaş
21
Yeni python öğreniyorum ve requests'i import etmem gerekiyor gerekli işlemleri yaptım ve pip list yazdığımda requests'in kurulu olduğunu görebiliyorum ama import requests yazdığımda 'Import "requests" could not be resolved from source' sorunuyla karşılaşıyorum. lib/site-packages dosyası içimde de requestsin kurulu olduğunu görüyorum .

Powershellde çalıştırdığımda istediğim sonucu alıyorum orda çalışıyor ama VSCode'da bu sorunla karşılaşıyorum.

pip güncel
requests güncel
python güncel
vsc da güncel
 

NKG

Öğrenci
Katılım
13 Şubat 2022
Mesajlar
2
Reaksiyon puanı
0
Puanları
1
Yaş
21
Import could not be resolved/could not be resolved from source Pylance in VS Code using Python 3.9.2 on Windows 10 Powershell
If you are using a virtual environment, and even after trying pip installing all the necessary libraries, you have to select the python interpreter that exists in the virtual environment folder.

(Ctrl+Shift+P) then search for "Python: Select Interpreter"
Click "Enter interpreter path" followed by "Find.."
Navigate to your project virtual environment folder
Go into "Scripts" folder and then select "python.exe" as the interpreter.
These steps allow you to select the right python interpreter associated with the project's virtual environment.

PROBLEMİ BU ŞEKİLDE ÇÖZDÜM BAŞKASI YAŞARSA BUNU DENEYEBİLİR
 

Son mesajlar

Üst