Python 无法安装 csv 模块

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/44988459/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 00:42:43  来源:igfitidea点击:

Can't install csv module

pythonmacoscsvpip

提问by saasa

I am a mac user and today I tried installing csvtoday and here is command pip install csv.But unfortunately it returned the following error

我是 mac 用户,今天我尝试安装csv,这是命令 pip install csv。但不幸的是它返回了以下错误

Could not find a version that satisfies the requirement csv (from versions: )
No matching distribution found for csv

I have Python version 2.7.13 and I have installed other dependencies like scikit-learn,numpy and matplotlib, but for some reason I can't install csv.

我有 Python 版本 2.7.13 并且我已经安装了其他依赖项,例如scikit-learn,numpy and matplotlib,但由于某种原因我无法安装csv.

回答by Micky Loo

csvis part of python's standard library so you don't need to install it with pip. Just use it with:

csv是 python 标准库的一部分,所以你不需要用 pip 安装它。只需将其用于:

import csv