python-2.7csvkit

How can I import the csvsql to Python 2.7


I have successfuly installed csvkit using conda install ...

However, when I try to import the libraries in Python 2.7 Spyder, I get error messages:

     import csvsql
     Traceback (most recent call last):

      File "<ipython-input-5-303a60a6b1ac>", line 1, in <module>

     import csvsql

     ImportError: No module named csvsql

     import csvkit
     Traceback (most recent call last):

      File "<ipython-input-7-ca8a99ae9834>", line 1, in <module>
      import csvkit

      ImportError: No module named csvkit

I looked at the documentation -- they describe the installation process but not how the library is loaded in Python.

Moreover, I had an analogous problem with httplib2. I installed it successfuly but when I tried to import it in Spyder I received an analogous error message (No module named httplib2).

(I use Anaconda 3 and Spyder on Windows 11)

Any ideas? Thank you in advance.


Solution

  • I asked this question on the csvkit GitHub / issues forum. The answer given was: You should use agate on which csvkit now relies for all its operations. See https://github.com/wireservice/agate.

    I'm with you -- it would be wonderful to use csvkit as a command-line tool and a library, but it's authors don't see it that way. The full issue: https://github.com/wireservice/csvkit/issues/670