ImportError: openpyxl adlı modül yok

0

Soru

Openpyxl'yi pıp3 üzerinden yükledim ancak komut dosyama aktarmaya çalıştığımda bu hatayı alıyorum:

"python -u "/Users/hectorv/zipcodes/zips.py"
hectorv@Hectors-MacBook-Air zipcodes % python -u "/Users/hectorv/zipcodes/zips.py"
Traceback (most recent call last):
  File "/Users/hectorv/zipcodes/zips.py", line 1, in <module>
    import openpyxl
ImportError: No module named openpyxl"

Tekrar yüklemeye çalıştığımda bunu alıyorum:

hectorv@Hectors-MacBook-Air zipcodes % pip3 install openpyxl
Requirement already satisfied: openpyxl in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (3.0.9)
Requirement already satisfied: et-xmlfile in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from openpyxl) (1.1.0)
openpyxl python visual-studio-code
2021-11-24 00:28:15
1

En iyi cevabı

1

Kullanıyorsunuz Code Runner değil mi?

Kullanmaktan kaçınabilirsiniz Code Runner. Uygun python yorumlayıcısını seçtikten sonra, Run Python File düğmesine basın veya sağ tıklayıp seçin Run Python File In Terminal komut.

enter image description here

enter image description here

enter image description here

Kullanmakta ısrar ederseniz Code Runner olabilir Ekle "code-runner.runInTerminal": true, ayarlarda.json dosyası. Çünkü eğer kaçarsan bu olur Code Runner doğrudan içinde OUTPUT panel, küresel avantajlardan yararlanacak python. python uzantısı tarafından seçilen python yorumlayıcısını yoksayma.

2021-11-24 02:19:06

evet kod koşucu uzantısı sorun oldu teşekkür ederim!
Hector

Diğer dillerde

Bu sayfa diğer dillerde

Русский
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................