V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
jahan
V2EX  ›  Python

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

  •  
  •   jahan · 2017-07-01 02:42:23 +08:00 · 2872 次点击
    这是一个创建于 2497 天前的主题,其中的信息可能已经有所发展或是发生改变。
    求教使用 conda 管理 python 的包,可是有些包在默认的源里面没有,要如何安装呢?比如 flask-notifications.
    用过 conda skeleton pipy install 之类,貌似没成功。
    其实感觉 pypi 里面的包是最全的,不过现在只添加了清华的第三方源,不知道 pypi 怎么添加
    19 条回复    2019-03-08 16:07:13 +08:00
    sosu72
        1
    sosu72  
       2017-07-01 04:13:20 +08:00
    -c
    hugo775128583
        2
    hugo775128583  
       2017-07-01 04:21:55 +08:00 via Android
    anaconda search
    hu6360567
        3
    hu6360567  
       2017-07-01 07:31:11 +08:00 via iPhone
    conda-forge
    congeec
        4
    congeec  
       2017-07-01 08:57:53 +08:00
    就用 pip,conda 这个发行版有 pip 的
    jahan
        5
    jahan  
    OP
       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
        6
    jahan  
    OP
       2017-07-01 09:08:29 +08:00
    @congeec 直接 pip ?不是说这样用了之后就不能在 conda 下面管理了吗
    WildCat
        7
    WildCat  
       2017-07-01 09:09:29 +08:00 via iPhone
    @jahan 那怕啥,一般我们搞 DL 都是这么来
    jahan
        8
    jahan  
    OP
       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
        9
    sosu72  
       2017-07-01 09:32:43 +08:00
    conda create --name XXXX python=x flask-notifications
    est
        10
    est  
       2017-07-01 09:55:21 +08:00
    miniconda/bin/pip install flask-notifications


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

    @sosu72 创建一个新的环境?
    est
        12
    est  
       2017-07-01 10:19:44 +08:00
    @jahan 估计多半是 py2 py3 的问题。
    est
        13
    est  
       2017-07-01 10:20:46 +08:00
    另外 flask-notifications 这个库看上去写得不是特别烂也是一般烂了。
    jahan
        14
    jahan  
    OP
       2017-07-01 10:21:00 +08:00
    @est 机器之安装了 py3 还是 anaconda 自带的。
    jahan
        15
    jahan  
    OP
       2017-07-01 10:21:58 +08:00
    @est 主要就犯懒,看起来还是要自己写,不过可能写的更烂………………
    ipwx
        16
    ipwx  
       2017-07-01 10:40:41 +08:00
    pip install 呗,还能怎么样
    xiaozizayang
        17
    xiaozizayang  
       2017-07-01 10:41:41 +08:00 via Android
    source 进对应的版本 直接 pip 安装的话就是安装在对应的虚拟环境
    hu6360567
        18
    hu6360567  
       2017-07-01 16:43:57 +08:00 via iPhone
    conda 是一个类似 pypi 的库管理,conda-forge 是 conda 的一个社区维护的列表,类似于 brew cask 之于 brew。一般情况下 forge 已经包含很多常用的库,可以尝试用 conda 直接安装
    iwhales
        19
    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
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2410 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 13:33 · PVG 21:33 · LAX 06:33 · JFK 09:33
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.