zoukankan      html  css  js  c++  java
  • Python虚拟环境- 构建或安装包过程中出现的错误

    1. lxml 依赖库问题:

    1,安装的libxml2
    tar -xzvf libxml2-2.9.0.tar.gz
    ./configure --prefix=/home/was/software/lxml_libxml2 --without-python
    make
    make install
    2,安装的libxslt
    ./configure --prefix=/home/was/software/lxml_libxml2 --without-crypto --without-python --with-libxml-prefix=/home/was/software/lxml_libxml2/
    make
    make install
    3,安装LXML
    tar -xzvf lxml-4.2.3.tar.gz
    cd lxml-4.2.3
    # 解压缩、编译
    /home/was/software/python27/bin/python ./setup.py build --with-xslt-config=/home/was/software/lxml_libxml2/bin/xslt-config
    # 虚拟环境下的 安装:
    python ./setup.py install
    
    # 指定在 本地python
    ```python
    /home/was/software/python27/bin/
    
    python ./setup.py build --with-xslt-config=/home/was/env/bin/xslt-config 
    lxml
    ./configure --prefix=/home/was/env --without-python
    
    ./configure --prefix=/home/was/env --without-crypto --without-python --with-libxml-prefix=/home/was/env/
    

    2. mkvirtualenv异常时

    mkvirtualenv misc --no-setuptools --no-pip
    

    3. 在生成镜像时,安装指定python包时报错

    > RUN pip install -i https://doubanio.com/simple/ -r requirement.txt
    ERROR: Could not install packages due to an EnvironmentError: [Errno 39] Directory not empty: '/usr/local/python3/lib/python3.6/site-packages/certifi-2018.11.29.dist-info/'
    

    解决方案
    发现还是权限问题,故需加入参数--user解决
    RUN pip install --user -i https://doubanio.com/simple/ -r requirement.txt

  • 相关阅读:
    前端常用模板引擎- artTemplate
    Vue-多级组件嵌套传值
    echarts图表常用到的设置
    react-基础入门分享
    vue中 export const 和 export default的区别
    vue安装依赖报错
    nvm-node版本控制工具
    gulp-入门
    vue 中使用 iconfont
    c3中基本动画
  • 原文地址:https://www.cnblogs.com/sunxiuwen/p/13538087.html
Copyright © 2011-2022 走看看