zoukankan      html  css  js  c++  java
  • pipenv使用经验

    1 使用腾讯源

    Linux系统:

    1.编辑/etc/profile文件(对所有用户永久生效)

    vi /etc/profile

    2.添加系统环境变量,并保存

    # /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
    # and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).
    export PIPENV_PYPI_MIRROR=https://mirrors.cloud.tencent.com/pypi/simple

    3.使系统环境变量立即生效

    source /etc/profile

    4.以后使用Pipenv安装包,速度就会快很多啦

    pipenv install <package>

    2 指定虚拟环境使用的python

    pipenv --python python3.7 shell

    3 使用-v看看发生什么

    pipenv -v install

    4 还有问题直接使用pip install -r requirements.txt 安装并检查问题

    例如:makeupsafe1.0就有坑,python3.7环境下安装会发生下面问题,直接在requirements.txt里面把makeupsafe升级到1.1.1就行

    Traceback (most recent call last):
      File "setup.py", line 6, in <module>
        from distutils.core import setup, Extension, Feature
    ImportError: cannot import name Feature

     5 一直locking太慢,可以设置 --skip-lock 加快速度

    6 包输入错误时,需要手动修改Pipfile删除错误的包,否则无法继续后续安装。pipenv install 会按照Pipfile从头到尾把包全部安装一遍

    pipenv site-packages路径:/Users/h/.local/share/virtualenvs/syncer-m5MA0jdJ/lib/python2.7/site-packages/

    推出pipenv: ctrl+d

    当前环境:pipenv --venv

  • 相关阅读:
    Effective.Java第67-77条(异常相关)
    淘宝店的图片哪里来的
    SEO高手在扯蛋?
    多少人,没能熬过那最初的三厘米!
    网站要提高权重要总结三点
    真正的干货是什么?
    google打不开怎么办?谷歌打不开的解决方法
    StatCounter
    教你如何抢注一个快过期的域名
    正确识别希捷Backup Plus新睿品1TB正品,杜绝奸商猖獗
  • 原文地址:https://www.cnblogs.com/instant7/p/12507077.html
Copyright © 2011-2022 走看看