• python venv 打包,更换路径后,仍然读取到旧路径 ,最好别换路径,采用docker封装起来


    机械盘路径

    /home/yeqiang/code/xxx

    移动到

    /opt/xxx

    编辑/opt/xxx/venv/bin/activate

    VIRTUAL_ENV="/home/yeqiang/code/xxx/venv"

    改为

    VIRTUAL_ENV="/opt/xxx/venv"

    下面还有这么多,参考:

    (venv) yeqiang@yeqiang-MS-7B23:/opt/roop/venv$ grep "home/yeqiang" * -rn  --binary-files=without-match
    bin/ttx:1:#!/home/yeqiang/code/s0md3v-roop/venv/bin/python3
    bin/pyrsa-encrypt:1:#!/home/yeqiang/code/s0md3v-roop/venv/bin/python3
    bin/tflite_convert:1:#!/home/yeqiang/code/s0md3v-roop/venv/bin/python3
    bin/convert-onnx-to-caffe2:1:#!/home/yeqiang/code/s0md3v-roop/venv/bin/python3.10
    bin/pyrsa-keygen:1:#!/home/yeqiang/code/s0md3v-roop/venv/bin/python3
    bin/f2py3.10:1:#!/home/yeqiang/code/s0md3v-roop/venv/bin/python3
    bin/pyrsa-verify:1:#!/home/yeqiang/code/s0md3v-roop/venv/bin/python3
    bin/cpack:1:#!/home/yeqiang/code/s0md3v-roop/venv/bin/python3.10
    bin/isympy:1:#!/home/yeqiang/code/s0md3v-roop/venv/bin/python3.10
    bin/lit:1:#!/home/yeqiang/code/s0md3v-roop/venv/bin/python3.10
    bin/pyrsa-sign:1:#!/home/yeqiang/code/s0md3v-roop/venv/bin/python3
    bin/cythonize:1:#!/home/yeqiang/code/s0md3v-roop/venv/bin/python3
    bin/cmake:1:#!/home/yeqiang/code/s0md3v-roop/venv/bin/python3.10
    bin/wheel:1:#!/home/yeqiang/code/s0md3v-roop/venv/bin/python3
    bin/gdown:1:#!/home/yeqiang/code/s0md3v-roop/venv/bin/python3
    bin/pip:1:#!/home/yeqiang/code/s0md3v-roop/venv/bin/python3
    bin/saved_model_cli:1:#!/home/yeqiang/code/s0md3v-roop/venv/bin/python3
    bin/tensorboard:1:#!/home/yeqiang/code/s0md3v-roop/venv/bin/python3
    bin/cygdb:1:#!/home/yeqiang/code/s0md3v-roop/venv/bin/python3
    bin/insightface-cli:1:#!/home/yeqiang/code/s0md3v-roop/venv/bin/python
    bin/estimator_ckpt_converter:1:#!/home/yeqiang/code/s0md3v-roop/venv/bin/python3
    bin/check-model:1:#!/home/yeqiang/code/s0md3v-roop/venv/bin/python3
    bin/tf_upgrade_v2:1:#!/home/yeqiang/code/s0md3v-roop/venv/bin/python3
    bin/futurize:1:#!/home/yeqiang/code/s0md3v-roop/venv/bin/python3
    bin/pyrsa-priv2pub:1:#!/home/yeqiang/code/s0md3v-roop/venv/bin/python3
    bin/toco_from_protos:1:#!/home/yeqiang/code/s0md3v-roop/venv/bin/python3
    bin/pip3.10:1:#!/home/yeqiang/code/s0md3v-roop/venv/bin/python3
    bin/imageio_remove_bin:1:#!/home/yeqiang/code/s0md3v-roop/venv/bin/python3
    bin/yapf-diff:1:#!/home/yeqiang/code/s0md3v-roop/venv/bin/python3
    bin/import_pb_to_tensorboard:1:#!/home/yeqiang/code/s0md3v-roop/venv/bin/python3
    bin/pasteurize:1:#!/home/yeqiang/code/s0md3v-roop/venv/bin/python3
    bin/activate.fish:36:set -gx VIRTUAL_ENV "/home/yeqiang/code/s0md3v-roop/venv"
    bin/pyrsa-decrypt:1:#!/home/yeqiang/code/s0md3v-roop/venv/bin/python3
    bin/humanfriendly:1:#!/home/yeqiang/code/s0md3v-roop/venv/bin/python3.10
    bin/backend-test-tools:1:#!/home/yeqiang/code/s0md3v-roop/venv/bin/python3
    bin/tqdm:1:#!/home/yeqiang/code/s0md3v-roop/venv/bin/python3
    bin/markdown_py:1:#!/home/yeqiang/code/s0md3v-roop/venv/bin/python3
    bin/numba:1:#!/home/yeqiang/code/s0md3v-roop/venv/bin/python3
    bin/pyftsubset:1:#!/home/yeqiang/code/s0md3v-roop/venv/bin/python3
    bin/f2py3:1:#!/home/yeqiang/code/s0md3v-roop/venv/bin/python3
    bin/imageio_download_bin:1:#!/home/yeqiang/code/s0md3v-roop/venv/bin/python3
    bin/coloredlogs:1:#!/home/yeqiang/code/s0md3v-roop/venv/bin/python3.10
    bin/check-node:1:#!/home/yeqiang/code/s0md3v-roop/venv/bin/python3
    bin/google-oauthlib-tool:1:#!/home/yeqiang/code/s0md3v-roop/venv/bin/python3
    bin/toco:1:#!/home/yeqiang/code/s0md3v-roop/venv/bin/python3
    bin/convert-caffe2-to-onnx:1:#!/home/yeqiang/code/s0md3v-roop/venv/bin/python3.10
    bin/pip3:1:#!/home/yeqiang/code/s0md3v-roop/venv/bin/python3
    bin/lsm2bin:1:#!/home/yeqiang/code/s0md3v-roop/venv/bin/python3
    bin/activate.csh:11:setenv VIRTUAL_ENV "/home/yeqiang/code/s0md3v-roop/venv"
    bin/torchrun:1:#!/home/yeqiang/code/s0md3v-roop/venv/bin/python3.10
    bin/f2py:1:#!/home/yeqiang/code/s0md3v-roop/venv/bin/python3
    bin/tiffcomment:1:#!/home/yeqiang/code/s0md3v-roop/venv/bin/python3
    bin/fonttools:1:#!/home/yeqiang/code/s0md3v-roop/venv/bin/python3
    bin/normalizer:1:#!/home/yeqiang/code/s0md3v-roop/venv/bin/python3.10
    bin/ctest:1:#!/home/yeqiang/code/s0md3v-roop/venv/bin/python3.10
    bin/yapf:1:#!/home/yeqiang/code/s0md3v-roop/venv/bin/python3
    bin/cython:1:#!/home/yeqiang/code/s0md3v-roop/venv/bin/python3
    bin/tifffile:1:#!/home/yeqiang/code/s0md3v-roop/venv/bin/python3
    bin/onnxruntime_test:1:#!/home/yeqiang/code/s0md3v-roop/venv/bin/python3
    bin/tiff2fsspec:1:#!/home/yeqiang/code/s0md3v-roop/venv/bin/python3
    bin/pyftmerge:1:#!/home/yeqiang/code/s0md3v-roop/venv/bin/python3
    lib/python3.10/site-packages/easydict-1.10.dist-info/direct_url.json:1:{"archive_info": {}, "url": "file:///home/yeqiang/code/s0md3v-roop/requirements-offline/easydict-1.10.tar.gz"}
    lib/python3.10/site-packages/insightface-0.7.3.dist-info/direct_url.json:1:{"archive_info": {}, "url": "file:///home/yeqiang/code/s0md3v-roop/requirements-offline/insightface-0.7.3.tar.gz"}
    lib64/python3.10/site-packages/easydict-1.10.dist-info/direct_url.json:1:{"archive_info": {}, "url": "file:///home/yeqiang/code/s0md3v-roop/requirements-offline/easydict-1.10.tar.gz"}
    lib64/python3.10/site-packages/insightface-0.7.3.dist-info/direct_url.json:1:{"archive_info": {}, "url": "file:///home/yeqiang/code/s0md3v-roop/requirements-offline/insightface-0.7.3.tar.gz"}
     

    code bin目录,替换

     

  • 相关阅读:
    如何选择正确的文档归档解决方案
    Spring Boot
    【C语言】指针的“最后一站”【进阶版】
    Linux引导故障排除:从问题到解决方案的详细指南
    HDFS 高可用分布式环境搭建
    RK3288 Android11 RTL8723DS WiFi 和 蓝牙Bluetooth 适配
    【云原生 | Kubernetes 系列】---Consul 安装配置
    【RV1106/RV1103】RV1103增加RTL8723BS
    vue 如何判断元素内容是否超过宽度的方式
    《windows 程序设计》读书笔记 三
  • 原文地址:https://blog.csdn.net/hknaruto/article/details/132538913