pandas_csv_sniffer installation fails using either conda, pip, or setup.py

71 Views Asked by At

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:

  1. 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.

  2. 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
  1. 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

1

There are 1 best solutions below

0
On

Repo on GitHub has name pandas_csv_sniffer but Python module has name csv_sniffer.

See image with Jupyter on GitHub - it shows line import csv_sniffer

So after python setup.py install you should test import csv_sniffer
instead of import pandas_csv_sniffer. And this works on my computer.