egg

AssertionError: Egg-link .. does not match installed location of ReviewBoard (at /…)

好久不见. 提交于 2019-12-09 08:23:48
问题 AssertionError: Egg-link /home/daniel/other-rb/reviewboard does not match installed location of ReviewBoard (at /home/daniel/reviewboard) I believe this was caused by me installing a package at an additional location using the same virtualenv. How can I fix this problem? I'm guessing I need to redirect the Egg-link to match the installed location? Stack trace: (reviewboard-3.0) daniel@beepboop ~/reviewboard $ ./setup.py develop /home/daniel/envs/reviewboard-3.0/local/lib/python2.7/site

How to determine the name of an egg for a Python package on Github?

若如初见. 提交于 2019-12-09 07:53:33
问题 I know I can install with $ pip install -e git+https://git.repo/some_pkg#egg=SomePackage but -- when I'm trying to use somebody else's package -- how do I determine what the name of the egg is? 回答1: Look at the git repo, find the setup.py file in the root and find what is passed to the name keyword in the setup() function call. For example, the Pyramid setup.py has: setup(name='pyramid', so you'd use: $ pip install -e git+https://github.com/Pylons/pyramid.git#egg=pyramid 来源: https:/

Command “python setup.py egg_info” failed with error code 1

北城余情 提交于 2019-12-08 13:35:27
问题 Extracting in C:\Users\hkpra\AppData\Local\Temp\tmp3esvodcb Traceback (most recent call last): File "c:\program files\python35\lib\site-packages\ez_setup.py", line 143, in use_setuptools raise ImportError ImportError During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<string>", line 1, in <module> File "C:\Users\hkpra\AppData\Local\Temp\pip-build-imphcwak\unroll\setup.py", line 2, in <module> ez_setup.use_setuptools() File "c:\program

Why would one use an egg over an sdist?

﹥>﹥吖頭↗ 提交于 2019-12-08 04:00:29
问题 About the only reason I can think of to distribute a python package as an egg is so that you can not include the .py files with your package (and only include .pyc files, which is a dubious way to protect your code anyway). Aside from that, I can't really think of any reason to upload a package as an egg rather than an sdist. In fact, pip doesn't even support eggs. Is there any real reason to use an egg rather than an sdist? 回答1: One reason: eggs can include compiled C extension modules so

转载:谷歌面试题之2 Egg Problem

为君一笑 提交于 2019-12-07 15:50:30
2 Egg Problem 继续我们的推理问题之旅,今天我们要对付的是一个Google的面试题:Two Egg Problem. 我们开始吧! No.2 Google Interview Puzzle : 2 Egg Problem * You are given 2 eggs. * You have access to a 100-storey building. * Eggs can be very hard or very fragile means it may break if dropped from the first floor or may not even break if dropped from 100th floor. Both eggs are identical. * You need to figure out the highest floor of a 100-storey building an egg can be dropped without breaking. Now the question is how many drops you need to make. You are allowed to break 2 eggs in the process 分析与解答: 题目要求试的最大次数最小。首先,讨论两个比较trivial的方案。

How to include and use .eggs/pkg_resources within a project directory targeting python 2.5.1

旧时模样 提交于 2019-12-07 14:37:33
问题 I have python .egg files that are stored in a relative location to some .py code. The problem is, I am targeting python 2.5.1 computers which require my project be self contained in a folder (hundreds of thousands of OLPC XO 8.2.1 release laptops running Sugar). This means I cannot just ./ez_install to perform a system-wide setuptools/pkg_resources installation. Example directory structure: My Application/ My Application/library1.egg My Application/libs/library2.egg My Application/test.py I

Python Packaging Documentation

末鹿安然 提交于 2019-12-07 08:05:42
问题 Where is the current reference for packaging python modules with Python 2.x? http://guide.python-distribute.org/ The Hitchhiker’s Guide to Packaging (last update from july 2010) http://docs.python.org/2.7/distutils/index.html distutils: Distributing Python Modules https://python-packaging-user-guide.readthedocs.org/en/latest/ Python Packaging User Guide (fork of hitchhiker guide, alive) I found the above versions. Which one should I follow? My modules are simple. Some Python files, some

pip install matplotlib fails: 'cannot build package freetype; “python setup.py egg_info” failed with error code 1'

有些话、适合烂在心里 提交于 2019-12-07 02:23:08
问题 I want to use matplotlib.pyplot. I can't because altoidnerd@LEPTON:~/ $ pip install matplotlib is failing on ubuntu 14 giving an egg_info error, and warning "cannot build package freetype" * The following required packages can not be built: * freetype ---------------------------------------- Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-8UvQcW/matplotlib But altoidnerd@LEPTON:~/$ dpkg -L libfreetype6 /. /usr /usr/lib /usr/lib/x86_64-linux-gnu /usr/lib/x86_64

Why would one use an egg over an sdist?

烂漫一生 提交于 2019-12-06 21:25:47
About the only reason I can think of to distribute a python package as an egg is so that you can not include the .py files with your package (and only include .pyc files, which is a dubious way to protect your code anyway). Aside from that, I can't really think of any reason to upload a package as an egg rather than an sdist. In fact, pip doesn't even support eggs. Is there any real reason to use an egg rather than an sdist? One reason: eggs can include compiled C extension modules so that the end user does not need to have the necessary build tools and possible additional headers and

What is a good computer vision library for Python that will allow me to me to find faces in a Flash/HTML5 video?

非 Y 不嫁゛ 提交于 2019-12-06 09:53:23
问题 I need to develop a script utilizing computer vision that will: Scan all frames of an Flash/HTML5 video for people's faces Identify the video frames that shows the faces looking directly at the camera Crop the face in a perfect square Copy the cropped face to a .PNG file Any recommendations for a Python computer vision library that could help me develop this script? 回答1: As jonesy said opencv is your best bet for facedetection "out of the box". To use flash video as imput you'd need something