美文网首页
Python - 安装第三方

Python - 安装第三方

作者: Ego_1973 | 来源:发表于2017-05-19 17:38 被阅读0次

    环境:mac 终端

    安装pip 输入命令: easy_install pip
    安装到python2.7:pip install beautifulsoup4
    安装到python3: pip3 install beautifulsoup4
    其他库也是同理

    这里举个特殊的🌰: pip3 install lxml

      Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
    Perhaps try: xcode-select --install
    (原谅我不知道怎么换行😂)*********************************************************************************
    error: command '/usr/bin/clang' failed with exit status 1
    
    ----------------------------------------
    Command "/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/var/folders/_g/86nkv4gj1n73jq7qjqzvtqgc0000gn/T/pip-build-e9lbyjew/lxml/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/_g/86nkv4gj1n73jq7qjqzvtqgc0000gn/T/pip-i49olh35-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/_g/86nkv4gj1n73jq7qjqzvtqgc0000gn/T/pip-build-e9lbyjew/lxml/
    

    这时你需要在终端输入:

     xcode-select --install
    
    Simona_Test1 Simona_Test2

    安装成功后再:

    pip3 install lxml 

    相关文章

      网友评论

          本文标题:Python - 安装第三方

          本文链接:https://www.haomeiwen.com/subject/hunyxxtx.html