Попытался импортировать Pandas в VS -коде с
import pandas
< /code>
и получил < /p>
Traceback (most recent call last):
File "c:\Users\xxxx\hello\sqltest.py", line 2, in
import pandas
ModuleNotFoundError: No module named 'pandas'
Попытался установить Pandas с
pip install pandas
pip3 install pandas
python -m pip install pandas
< /code>
отдельно, что вернулось < /p>
(.venv) PS C:\Users\xxxx\hello> pip3 install pandas
Requirement already satisfied: pandas in c:\users\xxxx\hello\.venv\lib\site-packages (1.1.0)
Requirement already satisfied: pytz>=2017.2 in c:\users\xxxx\hello\.venv\lib\site-packages (from pandas) (2020.1)
Requirement already satisfied: numpy>=1.15.4 in c:\users\xxxx\hello\.venv\lib\site-packages (from pandas) (1.19.1)
Requirement already satisfied: python-dateutil>=2.7.3 in c:\users\xxxx\hello\.venv\lib\site-packages (from pandas) (2.8.1)
Requirement already satisfied: six>=1.5 in c:\users\xxxx\hello\.venv\lib\site-packages (from python-dateutil>=2.7.3->pandas) (1.15.0)
< /code>
Пробое: < /p>
sudo pip install pandas
< /code>
и получил < /p>
(.venv) PS C:\Users\xxxx\hello> sudo pip install pandas
sudo : The term 'sudo' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ sudo pip install pandas
+ ~~~~
+ CategoryInfo : ObjectNotFound: (sudo:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
< /code>
Я также пытался изменить путь Python в настройках рабочей области после этого ответа. С C: \ users \ xxxx \ appdata \ local \ microsoft \ windowsapps \ python.exe , который является путем Python, который я нашел в командной строке, используя, где Python , но не работал.
Затем я попробовал < /p>
python -m venv .venv
< /code>
, который вернулся < /p>
(.venv) PS C:\Users\xxxx\hello> python -m venv .venv
Error: [Errno 13] Permission denied: 'C:\\Users\\xxxx\\hello\\.venv\\Scripts\\python.exe'
< /code>
Обновление: < /p>
Пробое < /p>
python3.8.5 -m pip install pandas
< /code>
и вернулся < /p>
(.venv) PS C:\Users\xxxx\hello> python3.8.5 -m pip install pandas
python3.8.5 : The term 'python3.8.5' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ python3.8.5 -m pip install pandas
+ ~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (python3.8.5:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Подробнее здесь: https://stackoverflow.com/questions/633 ... med-pandas
VS Code: ModulenotFounderror: Нет модуля с именем «Панды» ⇐ Python
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение