我最近将conda发行版从Python 3.6(使用conda install python=3.7
命令)升级到Python 3.7。
我没有意识到此升级会破坏我使用virtualenv创建的所有现有虚拟环境。我天真地认为,即使升级了发行版,虚拟环境也包含了运行所需的所有python库。
如果我运行'source venv / bin / activate',则可以运行虚拟环境,但是如果尝试启动python,则会收到错误消息:
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Fatal Python error: Py_Initialize: unable to load the file system codec
ModuleNotFoundError: No module named 'encodings'
Current thread 0x00007fff92b5f380 (most recent call first):
Abort trap: 6
我认为问题在于virtualenv库链接到bin / python3.6,但是该文件夹不再存在。我怎么解决这个问题?我真的不想重新创建虚拟环境,因为其中一些构建和使用需要很长时间才能从源代码构建的库的时间很长。
我试图恢复到conda 3.6,但是失败了,因为存在太多的冲突。
谢谢您的帮助!
答案 0 :(得分:0)
尝试使用以下命令将环境克隆到新环境:
<template>
...
</template>
<script>
export default {
name: 'app-container'
props: {
source: String,
},
data: () => ({
drawer: null,
}),
}
</script>