I am having difficulty installing the pandas_csv_sniffer Python package with the current versions of pandas, Python, conda, and pip.
(This package provides a helpful jupyter notebook GUI for finding good parameters to the pandas.csv_read function.)
A conda package would be the most robust, but I don't know how to rebuild and distribute this as a standard conda package. I even tried using the setup.py file, which is a deprecated method.
The setup.cfg and pyproject.toml files were not helpful to figure out package dependencies.
I searched and could not find any questions or answers related this package on Stack Overflow. What is the best way to install this?
I am using the following relevant package versions:
- Python v3.11
- pandas v2.1.2
WHAT I TRIED: I tried several ways to install this package:
conda install -c conda-forge pandas_csv_sniffer
---> FAILED
This fails with a message "package not available in conda channels", so this means there is no condda package.pip install pandas_csv_sniffer
---> FAILED
(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_sniffer
python setup.py install
: The setup.py installation method seemed to work, but then when I try to import it the package cannot be found.
(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'
Here is a snapshot of the current environment, created specifically to try to install this package (conda and pip install commands failed, then "python setup.py install" was used).
(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
Package version: full list of packages in my environment
Repo on
GitHub
has namepandas_csv_sniffer
but Python module has namecsv_sniffer
.See image with
Jupyter
onGitHub
- it shows lineimport csv_sniffer
So after
python setup.py install
you should testimport csv_sniffer
instead of
import pandas_csv_sniffer
. And this works on my computer.