V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐学习书目
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 · Jul 1, 2017 · 3832 views
    This topic created in 3229 days ago, the information mentioned may be changed or developed.
    求教使用 conda 管理 python 的包,可是有些包在默认的源里面没有,要如何安装呢?比如 flask-notifications.
    用过 conda skeleton pipy install 之类,貌似没成功。
    其实感觉 pypi 里面的包是最全的,不过现在只添加了清华的第三方源,不知道 pypi 怎么添加
    19 replies    2019-03-08 16:07:13 +08:00
    sosu72
        1
    sosu72  
       Jul 1, 2017
    -c
    hugo775128583
        2
    hugo775128583  
       Jul 1, 2017 via Android
    anaconda search
    hu6360567
        3
    hu6360567  
       Jul 1, 2017 via iPhone
    conda-forge
    congeec
        4
    congeec  
       Jul 1, 2017
    就用 pip,conda 这个发行版有 pip 的
    jahan
        5
    jahan  
    OP
       Jul 1, 2017
    @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
       Jul 1, 2017
    @congeec 直接 pip ?不是说这样用了之后就不能在 conda 下面管理了吗
    WildCat
        7
    WildCat  
       Jul 1, 2017 via iPhone
    @jahan 那怕啥,一般我们搞 DL 都是这么来
    jahan
        8
    jahan  
    OP
       Jul 1, 2017
    @congeec pip install Flask-Notifications
    Could not find a version that satisfies the requirement flask-notifications.
    sosu72
        9
    sosu72  
       Jul 1, 2017
    conda create --name XXXX python=x flask-notifications
    est
        10
    est  
       Jul 1, 2017
    miniconda/bin/pip install flask-notifications


    miniconda/bin/python -m pip install flask-notifications
    jahan
        11
    jahan  
    OP
       Jul 1, 2017
    @est Could not find a version that satisfies the requirement flask-notifications.

    @sosu72 创建一个新的环境?
    est
        12
    est  
       Jul 1, 2017
    @jahan 估计多半是 py2 py3 的问题。
    est
        13
    est  
       Jul 1, 2017
    另外 flask-notifications 这个库看上去写得不是特别烂也是一般烂了。
    jahan
        14
    jahan  
    OP
       Jul 1, 2017
    @est 机器之安装了 py3 还是 anaconda 自带的。
    jahan
        15
    jahan  
    OP
       Jul 1, 2017
    @est 主要就犯懒,看起来还是要自己写,不过可能写的更烂………………
    ipwx
        16
    ipwx  
       Jul 1, 2017
    pip install 呗,还能怎么样
    xiaozizayang
        17
    xiaozizayang  
       Jul 1, 2017 via Android
    source 进对应的版本 直接 pip 安装的话就是安装在对应的虚拟环境
    hu6360567
        18
    hu6360567  
       Jul 1, 2017 via iPhone
    conda 是一个类似 pypi 的库管理,conda-forge 是 conda 的一个社区维护的列表,类似于 brew cask 之于 brew。一般情况下 forge 已经包含很多常用的库,可以尝试用 conda 直接安装
    iwhales
        19
    iwhales  
       Mar 8, 2019
    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
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2401 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 42ms · UTC 04:33 · PVG 12:33 · LAX 21:33 · JFK 00:33
    ♥ Do have faith in what you're doing.