問題描述
我已經設置了 anaconda 并創建了一個 python 3.3 環境.現在我想安裝一些包(dataset).安裝說明要求克隆 git repo 并運行
I've setup anaconda and created a python 3.3 environment. Now I wanted to install some package (dataset). The install instructions ask to clone the git repo and run
python setup.py install
但現在這些包沒有安裝到環境站點包文件夾,而是安裝到不同的 anaconda 位置.
but now the packages are not installed to the environments site-packages folder but to a different anaconda location.
解決該問題的常規步驟是什么?新手兼容的解決方案是首選.操作系統是MacOSX,只是大小寫,是相關的.
What are the normal steps to solve that problem? Newbie-compatible solutions are preferred. The OS is MacOSX, just is case, it is relevant.
推薦答案
看起來 conda 會自動將 pip 添加到你的 conda 環境中,所以在你 source 你的 conda 環境之后,即:
It looks like conda automatically adds pip to your conda environment, so after you source your conda environment, i.e.:
source activate ~/anaconda/envs/dataset
你應該可以這樣安裝它:
you should be able to install it like this:
git clone git://github.com/pudo/dataset.git
pip install ./dataset
編輯
以下是我采取的具體步驟:
Here are the exact steps I took:
$ conda create -p ~/anaconda/envs/py33 python=3.3 anaconda pip
$ source activate ~/anaconda/envs/py33
$ which pip
~/anaconda/envs/py33/bin/pip
$ pip install ./dataset/
這篇關于安裝python包以糾正anaconda環境的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!