Requirement already satisfied: wsproto>=0.14 in c:\users\huhanyu\desktop\python\lib\site-packages (from trio-websocket~=0.9->selenium) (1.2.0) Requirement already satisfied: pysocks!=1.5.7,<2.0,>=1.5.6 in c:\users\huhanyu\desktop\python\lib\site-packages (from urllib3[socks]<3,>=1.26->selenium) (1.7.1) Requirement already satisfied: pycparser in c:\users\huhanyu\desktop\python\lib\site-packages (from cffi>=1.14->trio~=0.17->selenium) (2.21) Requirement already satisfied: h11<1,>=0.9.0 in c:\users\huhanyu\desktop\python\lib\site-packages (from wsproto>=0.14->trio-websocket~=0.9->selenium) (0.14.0)
时间: 2023-09-12 11:06:53 浏览: 94
这个输出结果显示 Selenium 的依赖库已经安装成功。你可以尝试在 Python 程序中导入 Selenium 库,看看是否能够正常使用。如果你仍然无法导入 Selenium 库,可能是因为 Python 程序无法找到该库的安装路径。你可以尝试检查一下环境变量是否配置正确,或者使用绝对路径来导入 Selenium 库。
相关问题
{'体育': 0, '数字化': 1, '文化旅游': 2, '新能源': 3, '旅游': 4, '轨道交通': 5, '中医药': 6, '物联网': 7, '大数据': 8, '新一代信息技术': 9, '互联网+': 10, '人工智能': 11, '区块链': 12, '数字经济': 13, '生命': 14} Requirement already satisfied: matplotlib in /Users/hh/anaconda3/lib/python3.10/site-packages (3.7.0) Requirement already satisfied: cycler>=0.10 in /Users/hh/anaconda3/lib/python3.10/site-packages (from matplotlib) (0.11.0) Requirement already satisfied: contourpy>=1.0.1 in /Users/hh/anaconda3/lib/python3.10/site-packages (from matplotlib) (1.0.5) Requirement already satisfied: fonttools>=4.22.0 in /Users/hh/anaconda3/lib/python3.10/site-packages (from matplotlib) (4.25.0) Requirement already satisfied: packaging>=20.0 in /Users/hh/anaconda3/lib/python3.10/site-packages (from matplotlib) (22.0) Requirement already satisfied: pyparsing>=2.3.1 in /Users/hh/anaconda3/lib/python3.10/site-packages (from matplotlib) (3.0.9) Requirement already satisfied: kiwisolver>=1.0.1 in /Users/hh/anaconda3/lib/python3.10/site-packages (from matplotlib) (1.4.4) Requirement already satisfied: python-dateutil>=2.7 in /Users/hh/anaconda3/lib/python3.10/site-packages (from matplotlib) (2.8.2) Requirement already satisfied: numpy>=1.20 in /Users/hh/anaconda3/lib/python3.10/site-packages (from matplotlib) (1.23.5) Requirement already satisfied: pillow>=6.2.0 in /Users/hh/anaconda3/lib/python3.10/site-packages (from matplotlib) (9.4.0) Requirement already satisfied: six>=1.5 in /Users/hh/anaconda3/lib/python3.10/site-packages (from python-dateutil>=2.7->matplotlib) (1.16.0)
根据你提供的词典token到id的映射关系,以及你已经安装了matplotlib库,你应该可以成功绘制热力图了。
请确保在绘制热力图之前,你已经执行了以下代码来加载数据和设置词典:
```python
import pickle
import gensim
import matplotlib.pyplot as plt
# 加载语料库
text_corpus = pickle.load(open('/Users/hh/Desktop/11_14/十一五-十四五产业规划bow.pkl', mode='rb'))
# 创建词典
dictionary = gensim.corpora.Dictionary(text_corpus)
# 设置词典的token到id映射关系
token2id = dictionary.token2id
# 打印词典的token到id映射关系
print(token2id)
# 其他代码...
```
接下来,你可以使用你提供的绘制热力图的代码来绘制热力图。确保在绘制热力图之前,`data`变量中包含了正确的数据。
希望这次能成功绘制热力图!如果还有其他问题,请随时提问。
Requirement already satisfied: pandas in e:\projects\venv\lib\site-packages (2.0.2) Requirement already satisfied: python-dateutil>=2.8.2 in e:\projects\venv\lib\site-packages (from pandas) (2.8.2) Requirement already satisfied: pytz>=2020.1 in e:\projects\venv\lib\site-packages (from pandas) (2023.3) Requirement already satisfied: tzdata>=2022.1 in e:\projects\venv\lib\site-packages (from pandas) (2023.3) Requirement already satisfied: numpy>=1.21.0 in e:\projects\venv\lib\site-packages (from pandas) (1.24.3) Requirement already satisfied: six>=1.5 in e:\projects\venv\lib\site-packages (from python-dateutil>=2.8.2->pandas) (1.16.0)
看起来你的 Pandas 版本已经是最新的 2.0.2 版本了。
如果你想在 Pandas 2.0.2 版本中使用 `to_excel()` 方法的话,可以尝试使用其他参数来替代 `dtype` 参数,例如:
- `engine`:指定写入 Excel 文件的引擎,可选值为 "openpyxl" 或 "xlsxwriter",默认值为 "xlsxwriter"。
- `float_format`:指定浮点数的输出格式,例如 "%.2f"。
- `index`:指定是否将索引写入 Excel 文件中,默认值为 True。
- `header`:指定是否将列名称写入 Excel 文件中,默认值为 True。
具体用法可以参考 Pandas 的官方文档。
阅读全文