I installed Anaconda3 in my computer and created a virtualenv named Python27 with python version 2.7, I want to install several packages in my virtualenv, but conda install or pip install works for some packages and not for others, for example, I was not able to install csv, a package to manage comma separated values documents, this is the output I get using conda install:
$ conda install csv
Fetching package metadata .........
PackageNotFoundError: Packages missing in current channels:
- csv
We have searched for the packages in the following channels:
- https://repo.continuum.io/pkgs/free/linux-64
- https://repo.continuum.io/pkgs/free/noarch
- https://repo.continuum.io/pkgs/r/linux-64
- https://repo.continuum.io/pkgs/r/noarch
- https://repo.continuum.io/pkgs/pro/linux-64
- https://repo.continuum.io/pkgs/pro/noarch
and using pip install:
$ pip install csv
Collecting csv
Could not find a version that satisfies the requirement csv (from versions: )
No matching distribution found for csv
How do I install the package csv in my virtualenv or any other package I was not able to install this way?
Thanks in advance.
You cannot install csv, because it is already included in your python installation.
Just go
import csv
It's a standard library module: csv
. It should be available without installation.
Just to make sure I tested it with a clean environment.
$ conda create -n test python # new environment without any additional packages
$ activate test # go to that environment
$ python # start the python interpreter
>>> import csv # importing it works!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.