簡體   English   中英

無法使用conda install或pip install安裝某些軟件包

[英]can't install some packages with conda install or pip install

我在計算機上安裝了Anaconda3,並使用python 2.7版創建了一個名為Python27的virtualenv,我想在virtualenv中安裝多個軟件包,但是conda install或pip install適用於某些軟件包而不適用於其他軟件包,例如,我無法安裝csv,一個用於管理逗號分隔值文檔的軟件包,這是我使用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

並使用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

如何在我的virtualenv或無法通過這種方式安裝的任何其他軟件包中安裝csv軟件包?

提前致謝。

您無法安裝csv,因為它已包含在python安裝中。

去吧

import csv

這是一個標准的庫模塊: csv 它應該沒有安裝就可用。

只是為了確保我在干凈的環境中對其進行了測試。

$ 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!

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM