virtualenv一旦复制到同一个拱形机器就不会工作 - 说"没有模块名为copy"

时间:2014-11-30 22:09:36

标签: python virtualenv

Python deployment with virtualenv (on a no-internet-access server)

中的建议相关

我在一台服务器上构建了一个virtualenv,将其压缩并将其复制到无需互联网的prod服务器。

在源计算机上一切正常:

(test_scikit)[s-machine]$ uname -a
Linux truein03.fsc.local 2.6.32-279.el6.x86_64 #1 SMP Fri Jun 22 12:19:21 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
(test_scikit)[s-machine]$ cat /etc/*rel*
CentOS release 6.3 (Final)
LSB_VERSION=base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
(test_scikit)[s-machine]$ which python
~/virtualenvs/test_scikit/bin/python
(test_scikit)[s-machine]$ python --version
Python 2.7.5
(test_scikit)[s-machine]$  python -c "from copy import deepcopy"

但是在目标机器上它甚至找不到内置的复制模块!

(test_scikit)[t-machine]$ uname -a
Linux lvshdc2en0012 2.6.32-279.5.2.el6.x86_64 #1 SMP Tue Aug 14 11:36:39 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux
(test_scikit)[t-machine]$ cat /etc/*rel*
Red Hat Enterprise Linux Server release 6.3 (Santiago)
(test_scikit)[t-machine]$ which python
~/webcat_svm_poc/test_scikit/bin/python
(test_scikit)[t-machine]$ python --version
Python 2.7.5
(test_scikit)[t-machine]$ python -c "from copy import deepcopy"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named copy

是因为次要的os分发不兼容吗?

0 个答案:

没有答案