来自pip install --help:
--user Install to the Python user install directory for your platform. Typically ~/.local/, or %APPDATA%\Python on
Windows. (See the Python documentation for site.USER_BASE for full details.)
Run Code Online (Sandbox Code Playgroud)
site.USER_BASE的文档是一个令人讨厌的虫洞,有趣的*NIX主题,我不明白.
--user简明英语的目的是什么?为什么要将包裹装入~/.local/物质?为什么不在我的$ PATH中放置一个可执行文件?
我一直在尝试在“Visual Studio Code”中使用 pandas、numpy、matplotlib、seaborn 包,但程序一直向我显示以下消息:
“无法从源 Pylance 解析导入 pandas(reportMissingModuleSource)”
之前在 Visual Studio Code 中,我安装了“Anaconda”来使用 Jupyter,现在它说我有现有的包(pandas、numpy...),但不断出现此消息,不允许我在 Visual Studio 中使用 pandas 。
任何人都可以帮我解决这个问题吗?
我尝试再次安装所有软件包以检查它们是否不存在,但显然已安装所有软件包,但在另一条路线中。我不知道如何放置它们,以便 Visual Studio Code 能够识别它们并且我可以使用它们。
在我的项目文件夹中,创建了venv文件夹。
python -m venv venv
Run Code Online (Sandbox Code Playgroud)
当我在VS Code中运行命令时,select python interpreter我的venv文件夹未显示。我像这里建议的那样上了一层,但是VS Code没有看到我的虚拟解释器。
我错过了什么?
我正在尝试显示我的数据头,但收到错误消息: NameError:名称“ display”未定义
import pandas as pd
data = pd.DataFrame(data=[tweet.text for tweet in tweets], columns=['Tweets'])
display(data.head(10))
Run Code Online (Sandbox Code Playgroud)
有想法该怎么解决这个吗?
python ×3
anaconda ×1
display ×1
ipython ×1
pandas ×1
pip ×1
pylance ×1
python-3.x ×1
virtualenv ×1