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

  • 相关阅读:
    Nginx+Keepalived(双机热备)搭建高可用负载均衡环境(HA)
    库管理系统-- 后台管理开源啦,源码大放送
    .NET Core R2
    Linux gdb调试
    webpack React+ES6
    绿卡排队
    ABP分层设计
    vscode编写插件
    控制台程序的参数解析类库 CommandLine
    Net Core MVC6 RC2 启动过程分析
  • 原文地址:https://www.cnblogs.com/sunxiuwen/p/13538087.html
Copyright © 2011-2022 走看看