egg

pycharm导包错误处理办法

给你一囗甜甜゛ 提交于 2020-03-12 07:47:51
今天写了一个项目,从虚拟机里面到出到物理机里面重新验证的时候导入requirements.txt里面的包报错,然后搜索一大堆,然后升级一堆东西,没用.于是又从报错代码入手,下面是报错代码↓↓↓↓↓ Command “python setup.py egg_info” failed with error code 1 in C:\Users\xxhaa\AppData\Local\Temp\pip-install-0eis_4zw\django-haystack\ 翻译过来没什么用这个代码,于是从最开始的错误地方开始.代码如下 Complete output from command python setup.py egg_info: Download error on https://pypi.org/simple/setuptools_scm/: ssl.c:761: The handshake operation timed out – Some packages may not be found! Download error on https://pypi.org/simple/setuptools-scm/: The read operation timed out – Some packages may not be found! Couldn’t find index

Python 和 egg 文件

天大地大妈咪最大 提交于 2020-03-02 05:28:22
不会安装python的egg文件,在网上搜索了一下,被“蟒蛇蛋”这个词雷到了,记录下。 随着对python的逐渐使用,发现一些python组件是用一个包管理器发布的,今天搞了快一个小时,终于搞定了,这方面中文资料比较少,都是看英文资料。如果你以前没有包管理器,可能会摸不着头脑。不过只要理解了一些概念,几步简单的操作就搞定了,关键是对于你以后安装和管理python包很方便,而且如果你更进一步的话,你还可以自己制作“蛇蛋包”,呵呵。今天时间有限,一会儿还要帮喵喵看flash文件出错原因,所以今天就简单写写了。 1. 问题的由来 有的网页下载源代码中没有申明编码方式,因此需要有一个程序自动判断编码方式,因此我找到了一个开源的python工具,据说Mozilla中就是用的这个,chardet开源软件。不过包下载下来了,解压出来就一个光秃秃的文件,没有任何说明,用EditPlus打开,发现有一些信息,在末尾还看到setup段,但是不知道怎么装啊,郁闷了好一会儿,开始寻找方法。后来发现他是通过包管理工具setuptools发布的。因此我找到了setuptools,在官方网站上有安装部分的说明,不过说得比较含糊了,让我找一个exe的安装文件,哪有啊,郁闷的。后来知道了,setuptools的安装方法也很独特的,下面我就介绍怎么安装setuptools 2. 安装setup tools 下载文件:

Excluding source files from built rpm distribution with setuptool

谁都会走 提交于 2020-01-16 07:56:50
问题 I have a typical project structure that looks as follows: EngineEmulator src ship engine emulator mapping tests emulator mapping utils common doc .... tools .... setup.py MANIFEST.in setup.cfg README.rst My setup.py looks as follows: from setuptools import setup, find_packages setup( name='Engine', version=1.0.0, description='Engine Project', package_dir={'': 'src'}, packages=find_packages( 'src', exclude=["*.tests", "*.tests.*", "tests.*", "tests"]), install_requires =['pycrypto', 'kombu >=1

apache user can not write to .python-eggs

强颜欢笑 提交于 2020-01-03 20:58:22
问题 I have read that I need to set the PYTHON_EGG_CACHE environment variable, or install the python library as an uncompressed .egg Which do you suggest? 回答1: I got it working by uncompressing the .egg so it did not require the cache directory: Install MySQLdb (for python) as non-compressed egg 回答2: It totally depends on if you want to make the egg available as a generally available library or just for a single (or a handful of applications). Are you talking about a Trac installation? If so,

What is the point of Python egg files?

◇◆丶佛笑我妖孽 提交于 2020-01-03 08:21:26
问题 When I run python setup.py install django, it generates an egg file. What is the usefulness of Python egg files? 回答1: A small introduction to Python Eggs. 回答2: The "egg" is Python's binary distribution format. It's basically a zipped file with some extra metadata that you can give another Python user. He can "install" and use them. For details on what they are, please refer to http://peak.telecommunity.com/DevCenter/PythonEggs. Since it's a "native" format, Python can employ custom importers

How does Python keep track of modules installed with eggs?

大憨熊 提交于 2020-01-01 08:17:27
问题 If I have a module, foo , in Lib/site-packages , I can just import foo and it will work. However, when I install stuff from eggs, I get something like blah-4.0.1-py2.7-win32.egg as a folder, with the module contents inside, yet I still only need do import foo , not anything more complicated. How does Python keep track of eggs? It is not just dirname matching as if I drop that folder into a Python installation without going through dist-utils, it does not find the module. To be clearer: I just

How do I deactivate an egg?

流过昼夜 提交于 2020-01-01 07:08:07
问题 I've installed cx_Oracle (repeatedly) and I just can't get it to work on my Intel Mac. How do I deactivate/uninstall it? 回答1: You simply delete the .egg file On OS X they are installed into /Library/Python/2.5/site-packages/ - in that folder you should find a file named cx_Oracle.egg or similar. You can simple delete this file and it will be gone. One way of finding the file is, if you can import the module, simply displaying the repr() of the module: >>> import urllib >>> urllib <module

Problem accessing config files within a Python egg

最后都变了- 提交于 2020-01-01 04:41:04
问题 I have a Python project that has the following structure: package1 class.py class2.py ... package2 otherClass.py otherClass2.py ... config dev_settings.ini prod_settings.ini I wrote a setup.py file that converts this into an egg with the same file structure. (When I examine it using a zip program the structure seems identical.) The funny thing is, when I run the Python code from my IDE it works fine and can access the config files; but when I try to run it from a different Python script using

How to tell Buildout to install a egg from a URL (w/o pypi)

早过忘川 提交于 2019-12-30 19:04:07
问题 I have some egg accessible as a URL, say http://myhosting.com/somepkg.egg . Now I don't have this somepkg listed on pypi. How do I tell buildout to fetch and install it for me. I have tried a few recipes but no luck so far. TIA 回答1: You should just be able to add a 'find-links' option to your [buildout] section within the buildout.cfg file. I just tested this internally with the following buildout.cfg. [buildout] find-links = http://buildslave01/eggs/hostapi.core-1.0_r102-py2.4.egg parts =

How do I manage third-party Python libraries with Google App Engine? (virtualenv? pip?)

安稳与你 提交于 2019-12-27 10:43:52
问题 What's the best strategy for managing third-party Python libraries with Google App Engine? Say I want to use Flask, a webapp framework. A blog entry says to do this, which doesn't seem right: $ cd /tmp/ $ wget http://pypi.python.org/packages/source/F/Flask/Flask-0.6.1.tar.gz $ tar zxf Flask-0.6.1.tar.gz $ cp -r Flask-0.6.1/flask ~/path/to/project/ (... repeat for other packages ...) There must be a better way to manage third-party code, especially if I want to track versions, test upgrades or