• Anaconda 快速将某个虚拟环境A中的包在另一个虚拟环境B中安装


    前言

    有时无法避免使用的虚拟环境无法使用,但是前期又安装了许多包一个个安装费时费力。采用以下步骤可以便捷的新建一个虚拟环境,将以前虚拟环境中的包快速安装到新环境中。

    步骤

    1. 打开Anaconda Prompt:

    从开始菜单搜索并打开Anaconda Prompt。在Anaconda Prompt中,激活您的虚拟环境:

    conda activate LASimulation
    
    • 1
    1. 然后导出包列表到一个文件:
    pip freeze > LASimulation_packages.txt
    
    • 1
    1. 创建新的虚拟环境qtenv:
    conda create --name qtenv python
    
    • 1
    1. 激活新的qtenv虚拟环境:
    conda activate qtenv
    
    • 1
    1. 安装LASimulation_packages.txt中的包到qtenv环境:
    pip install -r LASimulation_packages.txt
    
    • 1

    以上步骤将帮助您在Windows系统的Anaconda环境中复制一个虚拟环境。这里pip freeze命令导出的是使用pip安装的包,而conda list --export命令则会导出使用conda安装的包。如果您同时使用了conda和pip来管理包,您可能需要分别导出两个列表,并在新环境中相应地使用conda install和pip install来安装它们。

    各类问题汇总

    WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1131)'))': /simple/bista/
    WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1131)'))': /simple/bista/
    WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1131)'))': /simple/bista/
    WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1131)'))': /simple/bista/
    WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1131)'))': /simple/bista/
    Could not fetch URL https://pypi.org/simple/bista/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/bista/ (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1131)'))) - skipping
    ERROR: Could not find a version that satisfies the requirement bista (from versions: none)
    ERROR: No matching distribution found for bista
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9

    更换源

    pip install pyarmor -i http://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com
    
    • 1
  • 相关阅读:
    vm虚拟机克隆ubuntu
    ZYNQ_project:key_beep
    内存卡里的照片删了怎么恢复?
    Polar Web【简单】login
    网络安全——(黑客)自学
    RunnerGo怎么做性能测试
    【RocketMQ】RocketMQ快速入门
    《熟悉List集合》第一弹
    要想后期修改少,代码重构要趁早
    亚马逊云科技数据分析为这伴科技赋能,实现“零”中断目标
  • 原文地址:https://blog.csdn.net/wokaowokaowokao12345/article/details/134325884