简体   繁体   English

整理Python库和文件夹

[英]Organizing Python Libraries and Folders

I'm having a lot of issues managing my python folders and directories. 我在管理python文件夹和目录时遇到很多问题。 I installed python normally, had my happy "C:\\Python27" setup just like one would want. 我通常安装了python,并按照我的意愿进行了满意的“ C:\\ Python27”设置。

Then, I decided to install WinPython, to get all the numeric and plotting packages it offered. 然后,我决定安装WinPython,以获取它提供的所有数字和绘图软件包。 This made a mess of things, as I could only use the extras packages, such as "numpy" and "scipy", from the "python.exe" installed at the Winpython folder. 这使事情变得一团糟,因为我只能使用Winpython文件夹中安装的“ python.exe”中的附加程序包,例如“ numpy”和“ scipy”。

This prompted me to reset all my environment variables to that python.exe, allowing me to use the packages I needed. 这促使我将所有环境变量重置为该 python.exe,从而允许我使用所需的软件包。 I also took great use if IPython notebook, which came with WinPython. 如果WinPython附带的IPython笔记本,我也非常有用。

Then, I took to downloading some different packages, such as py2exe, and also pip.exe, which installed themselves on the original "C:\\Python27\\Scripts" directory. 然后,我开始下载一些不同的软件包,例如py2exe和pip.exe,这些软件包将自己安装在原始的“ C:\\ Python27 \\ Scripts”目录中。

Now I've really made a mess of things, and I'm afraid of making this even bigger. 现在,我真的把事情弄得一团糟,而且我担心会变得更大。 I know this is a weird question, but I'm having more trouble with this than I'd care to admit. 我知道这是一个很奇怪的问题,但与此相比,我遇到的麻烦要多得多。

How do I salvage the libraries I already have and be happy using just one simple python.exe program, on one, simple, 'C:\\Python27\\' directory, without messing things up? 如何在一个简单的“ C:\\ Python27 \\”目录上使用一个简单的python.exe程序来挽救已经拥有的库并感到满意,而又不会搞砸呢?

WinPython is separate Python distribution - bundle of python and libraries. WinPython是独立的Python发行版-python和库的捆绑。 It won't play well with official Python distribution. 它在正式的Python发行版中无法正常运行。 You need to install libraries packaged for standard Python binaries. 您需要安装为标准Python二进制文件打包的库。 If you need SciPy stack, Windows installer can be downloaded from here: http://www.lfd.uci.edu/~gohlke/pythonlibs/ (search for Scipy-stack). 如果您需要SciPy堆栈,可以从此处下载Windows安装程序: http ://www.lfd.uci.edu/~gohlke/pythonlibs/(搜索Scipy-stack)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM