Failed to create virtualenv

Ubuntu 16.04 64位,跑VTS时报错,之后无法正常测试,重装python 环境也不行。

03-28 18:47:01 D/RunUtil: Running [virtualenv, /tmp/2dda8284800eb328b87b7161c94104e2-virtualenv1403893971550289422]
03-28 18:47:17 D/RunUtil: [virtualenv, /tmp/2dda8284800eb328b87b7161c94104e2-virtualenv1403893971550289422] command failed. return code 1
03-28 18:47:17 E/VtsPythonVirtualenvPreparer: Failed to create virtualenv with : /tmp/2dda8284800eb328b87b7161c94104e2-virtualenv1403893971550289422.
03-28 18:47:17 E/ModuleDef: TargetSetupError in preparer: com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer
03-28 18:47:17 E/TestInvocation: Unexpected exception when running invocation: java.lang.RuntimeException: com.android.tradefed.targetprep.TargetSetupError: Failed to create virtualenv
03-28 18:47:17 E/TestInvocation: com.android.tradefed.targetprep.TargetSetupError: Failed to create virtualenv
java.lang.RuntimeException: com.android.tradefed.targetprep.TargetSetupError: Failed to create virtualenv
at com.android.compatibility.common.tradefed.testtype.ModuleDef.runPreparerSetup(ModuleDef.java:354)
at com.android.compatibility.common.tradefed.testtype.ModuleDef.runPreparerSetups(ModuleDef.java:288)
at com.android.compatibility.common.tradefed.testtype.ModuleDef.run(ModuleDef.java:250)
at com.android.compatibility.common.tradefed.testtype.CompatibilityTest.run(CompatibilityTest.java:477)
at com.android.tradefed.invoker.TestInvocation.runTests(TestInvocation.java:796)
at com.android.tradefed.invoker.TestInvocation.prepareAndRun(TestInvocation.java:471)
at com.android.tradefed.invoker.TestInvocation.performInvocation(TestInvocation.java:322)
at com.android.tradefed.invoker.TestInvocation.invoke(TestInvocation.java:984)
at com.android.tradefed.command.CommandScheduler$InvocationThread.run(CommandScheduler.java:558)
Caused by: com.android.tradefed.targetprep.TargetSetupError: Failed to create virtualenv
at com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer.startVirtualenv(VtsPythonVirtualenvPreparer.java:281)
at com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer.setUp(VtsPythonVirtualenvPreparer.java:98)
at com.android.compatibility.common.tradefed.testtype.ModuleDef.runPreparerSetup(ModuleDef.java:344)
… 8 more

$pip -V

Traceback (most recent call last):
File “/usr/bin/pip”, line 9, in <module>
from pip import main
File “/usr/lib/python2.7/dist-packages/pip/__init__.py”, line 4, in <module>
import locale
File “/usr/lib/python2.7/locale.py”, line 13, in <module>
import encodings
ImportError: No module named encodings

作者: RESSRC

个人资源站

发表评论

电子邮件地址不会被公开。 必填项已用*标注