[英]Issues that could happen if importing site-packages from python2.6 to be used with python2.7?
I finally managed to install numpy, but it seems to only work in python2.6 . 我终于设法安装了numpy,但是它似乎只能在python2.6中工作。 I don't know how to install it in the 2.7 folder (been trying for hours, but I'm just a beginner developer in my first months).
我不知道如何将其安装在2.7文件夹中(已经尝试了几个小时,但是头几个月我只是一个初学者。) Anyway, if I use Python 2.7 and append the absolute path to sys.path, could there be problems?
无论如何,如果我使用Python 2.7并将绝对路径附加到sys.path,是否会出现问题?
Any suggestions? 有什么建议么?
Thank you. 谢谢。
It could partially work but this is a bad idea. 它可能会部分起作用,但这不是一个好主意。 Just don't do it.
只是不要这样做。 Even if it seems to work, it may not.
即使它看起来可行,也可能不起作用。 And if it really does, then it will fail randomly in the future.
如果确实如此,那么将来它将随机失败。
These are the potential problems that come into my mind: 这些是我想到的潜在问题:
There could be more. 可能还有更多。 You may actually try but be prepared that you may waste a lot of time trying to find out why something does not work as expected later.
您实际上可以尝试,但是要做好准备,可能会浪费大量时间试图找出为什么某些东西以后无法按预期工作的原因。
And unless I'm missing something, I think installing numpy for Python2.7 involves mostly running the setup using Python 2.7; 而且,除非我缺少任何东西,否则我认为为python2.7安装numpy主要涉及使用 python 2.7运行安装程序。 like:
喜欢:
python2.7 setup.py clean
python2.7 setup.py build
python2.7 setup.py install
Depending on your particular install/system, it may be preferable to use the package manager, binary bundle or a tool like pip
instead. 根据您的特定安装/系统,可能更可取的是使用软件包管理器,二进制捆绑软件或诸如
pip
类的工具。 If you'd like more details on how to enforce Python2.7 with those, you'd have to tell us which one is of your choice. 如果您想了解更多有关如何使用它们执行Python2.7的详细信息,则必须告诉我们您选择了哪个。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.