求教使用 conda 管理 Python 的包,可是有些包在默认的源里面没有,要如何安装呢?比如 flask-notifications.

2017-07-01 02:42:23 +08:00
 jahan
求教使用 conda 管理 python 的包,可是有些包在默认的源里面没有,要如何安装呢?比如 flask-notifications.
用过 conda skeleton pipy install 之类,貌似没成功。
其实感觉 pypi 里面的包是最全的,不过现在只添加了清华的第三方源,不知道 pypi 怎么添加
2912 次点击
所在节点    Python
19 条回复
sosu72
2017-07-01 04:13:20 +08:00
-c
hugo775128583
2017-07-01 04:21:55 +08:00
anaconda search
hu6360567
2017-07-01 07:31:11 +08:00
conda-forge
congeec
2017-07-01 08:57:53 +08:00
就用 pip,conda 这个发行版有 pip 的
jahan
2017-07-01 09:07:10 +08:00
@sosu72
@hugo775128583
@hu6360567

感谢提示。
conda install -c 这个是从 anaconda 源里面选择吧,可是 flask-notifications ( https://flask-notifications.readthedocs.io/en/latest/不在 anaconda 里面,在 pypi 里面。
anaconda search 找不到这个 flask-notifications
conda-forge:conda config --add channels 读了 conda-forge 的文档,感觉这个就是添加源的,问题是不知道 pypi 的源怎么写地址?

问题很 low,谢谢大家指点。
jahan
2017-07-01 09:08:29 +08:00
@congeec 直接 pip ?不是说这样用了之后就不能在 conda 下面管理了吗
WildCat
2017-07-01 09:09:29 +08:00
@jahan 那怕啥,一般我们搞 DL 都是这么来
jahan
2017-07-01 09:10:48 +08:00
@congeec pip install Flask-Notifications
Could not find a version that satisfies the requirement flask-notifications.
sosu72
2017-07-01 09:32:43 +08:00
conda create --name XXXX python=x flask-notifications
est
2017-07-01 09:55:21 +08:00
miniconda/bin/pip install flask-notifications


miniconda/bin/python -m pip install flask-notifications
jahan
2017-07-01 10:05:11 +08:00
@est Could not find a version that satisfies the requirement flask-notifications.

@sosu72 创建一个新的环境?
est
2017-07-01 10:19:44 +08:00
@jahan 估计多半是 py2 py3 的问题。
est
2017-07-01 10:20:46 +08:00
另外 flask-notifications 这个库看上去写得不是特别烂也是一般烂了。
jahan
2017-07-01 10:21:00 +08:00
@est 机器之安装了 py3 还是 anaconda 自带的。
jahan
2017-07-01 10:21:58 +08:00
@est 主要就犯懒,看起来还是要自己写,不过可能写的更烂………………
ipwx
2017-07-01 10:40:41 +08:00
pip install 呗,还能怎么样
xiaozizayang
2017-07-01 10:41:41 +08:00
source 进对应的版本 直接 pip 安装的话就是安装在对应的虚拟环境
hu6360567
2017-07-01 16:43:57 +08:00
conda 是一个类似 pypi 的库管理,conda-forge 是 conda 的一个社区维护的列表,类似于 brew cask 之于 brew。一般情况下 forge 已经包含很多常用的库,可以尝试用 conda 直接安装
iwhales
2019-03-08 16:07:13 +08:00
If a package is not available from conda or Anaconda.org, you may be able to find and install the package with another package manager like pip.
详见 https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-pkgs.html#installing-non-conda-packages

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/372279

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX