使用conda、pip或setup.py安装pandas_csv_sniffer失败求助
求助:Python3.11+pandas2.1.2环境下无法安装pandas_csv_sniffer包
我在Python 3.11、pandas 2.1.2的环境中,无法安装pandas_csv_sniffer包——这个包能提供Jupyter Notebook GUI工具,帮助为pandas.read_csv函数匹配合适的参数。
我优先考虑conda安装,但找不到对应的conda包,也不知道怎么重建并发布标准conda包;试过已弃用的setup.py安装方法,过程看似成功但导入时提示找不到模块;setup.cfg和pyproject.toml也没法帮我理清依赖关系,Stack Overflow上也搜不到相关问题,想请教最佳安装方式是什么?
尝试的安装方式及结果
conda安装
执行命令:conda install -c conda-forge pandas_csv_sniffer
结果:失败,报错提示"package not available in conda channels",确认无对应conda包。pip安装
执行命令:pip install pandas_csv_sniffer
结果:失败,报错信息如下:(base) C:\Users\hilar>pip install pandas_csv_sniffer ERROR: Could not find a version that satisfies the requirement pandas_csv_sniffer (from versions: none) ERROR: No matching distribution found for pandas_csv_sniffersetup.py安装
执行命令:python setup.py install
结果:安装过程看似成功,但导入包时失败,报错如下:(pandas_tools2) C:\Users\hilar\Desktop\00_PythonWIP\pandas_csv_sniffer>python Python 3.11.6 | packaged by conda-forge | (main, Oct 3 2023, 10:29:11) [MSC v.1935 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. import pandas_csv_sniffer Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'pandas_csv_sniffer'
当前环境快照(执行setup.py安装后)
执行pip list得到以下提示:
(pandas_tools2) C:\Users\hilar\Desktop\00_PythonWIP\pandas_csv_sniffer>pip list DEPRECATION: Loading egg at c:\programdata\anaconda3\envs\pandas_tools2\lib\site-packages\csv_sniffer_jdfekete-0.1-py3.11.egg is deprecated. pip 24.3 will enforce this behaviour change. A possible replacement is to use pip for package installation.. Discussion can be found at pypa/pip#12330 DEPRECATION: Loading egg at c:\programdata\anaconda3\envs\pandas_tools2\lib\site-packages\fsspec-2023.10.0-py3.11.egg is deprecated. pip 24.3 will enforce this behaviour change. A possible replacement is to use pip for package installation.. Discussion can be found at pypa/pip#12330
注:完整环境包列表可参考我在该项目仓库提交的issue内容。
内容的提问来源于stack exchange,提问作者Hilary
相关产品推荐
相关产品推荐

