install python-csv on a linux machine

i am on MX-linux version 19.1 and i have installed python 3.7.xy

i have also pip installed - but i do not know how to install the csv package

i tried out many comands

sudo apt-get install python-pip
sudo apt-get install python3-pandas
sudo apt-get install python3-csv
sudo apt-get install python-csv
pip install python-csv

and

python -m pip install csv

i used the install-manual

but see what i get

Collecting python-csv
Downloading Complete output from command python setup.py egg_info: Traceback (most recent call last): File "<string>", line 1, in <module> ImportError: No module named setuptools
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-DachfY/python-csv/
root@mx:/home/martin# ^C
root@mx:/home/martin# 

can you give me a hint..!?

1 Answer

You need to install the following packages and Python modules first:

apt-get install python-setuptools python-dev gcc g++
pip install wheel

You can then:

pip install python-csv

If you want to install csv for Python 3, then you'll need to install python3-setuptools and python3-dev and then pip3 install csv.

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like