pypi

How can you bundle all your python code into a single zip file?

女生的网名这么多〃 提交于 2019-12-03 04:16:09
问题 It would be convenient when distributing applications to combine all of the eggs into a single zip file so that all you need to distribute is a single zip file and an executable (some custom binary that simply starts, loads the zip file's main function and kicks python off or similar). I've seen some talk of doing this online, but no examples of how to actually do it. I'm aware that you can (if its zip safe) convert eggs into zip files. What I'm not sure about is: Can you somehow combine all

Python package dependency tree

こ雲淡風輕ζ 提交于 2019-12-03 03:45:38
问题 I would like to analyze the dependency tree of Python packages. How can I obtain this data? Things I already know setup.py sometimes contains a requires field that lists package dependencies PyPi is an online repository of Python packages PyPi has an API Things that I don't know Very few projects (around 10%) on PyPi explicitly list dependencies in the requires field but pip/easy_install still manage to download the correct packages. What am I missing? For example the popular library for

Install py2exe for python 2.7 over pip: this package requires Python 3.3 or later

旧街凉风 提交于 2019-12-03 03:32:58
问题 >>> python -c "import sys; print sys.version" 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)] >>> pip --version pip 1.5.5 from C:\Python27\lib\site-packages (python 2.7) >>> pip install py2exe <mumble grumble..> RuntimeError: This package requires Python 3.3 or later though official py2exe download page says they have exactly what I need: So how to install py2exe over pip? 回答1: It is missing from pypi, if you click on the 0.6.9 link it brings you to the 0.9.2.0 python 3

urllib2.HTTPError: HTTP Error 403: SSL is required when installing nltk==2.0.5

匿名 (未验证) 提交于 2019-12-03 02:52:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: When installing nltk==2.0.5, I get the error urllib2.HTTPError: HTTP Error 403: SSL is required . Really, I'm trying to install newspaper , but it's failing when trying to install this package. A minimal Dockerfile to reproduce the issue: FROM ubuntu:16.04 RUN apt-get update RUN apt-get install -y python-pip # problem occurs with or without the following line RUN pip install --upgrade pip CMD ["pip", "install", "nltk==2.0.5"] 回答1: wget https://pypi.python.org/packages/source/d/nltk/nltk-2.0.5.tar.gz tar -xzf nltk-2.0.5.tar.gz change DEFAULT

What is the difference between installing a package using pip vs. apt-get?

匿名 (未验证) 提交于 2019-12-03 02:45:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to deploy a Django site on an Ubuntu machine. I need to install Psycopg2 and PIL but it seems that I'm able to install them using either apt-get or using pip. Is there a difference in installing by the two methods? I know that using pip, I'm able to install it into a virtual environment but with apt-get it installs in the global python environment. 回答1: You probably already know the benefits of apt-get. Automatic update notifications, other apt-installed packages that need those tools know they're installed, etc. With pip, you

How do I automatically install missing python modules? [duplicate]

安稳与你 提交于 2019-12-03 02:40:41
问题 This question already has answers here : Installing python module within code (16 answers) Closed 3 years ago . I would like to be able to write: try: import foo except ImportError: install_the_module("foo") What is the recommended/idiomatic way to handle this scenario? I've seen a lot of scripts simply print an error or warning notifying the user about the missing module and (sometimes) providing instructions on how to install. However, if I know the module is available on PyPI, then I could

pip: Any workaround to avoid --allow-external?

大兔子大兔子 提交于 2019-12-03 02:37:00
Recent versions of pip installer hasn’t installed packages that do not upload their package files to PyPI unless the user explicitly provide --allow-external option ( related answer ). I want to distribute my package that depend on such library like dirspec . Currently I have to tell users of my package to install my package by the following command: $ pip install --allow-external dirspec MyPackage It becomes more problematic when it comes to library packaging. If my package is a library I also have to tell authors of packages that depend on my package to tell their users to install their

PIP Could not find any downloads that satisfy the requirement SQLAlchemy

匿名 (未验证) 提交于 2019-12-03 02:14:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Ubuntu 12.04 Apache 2.2.22 pip has stopped working on my ubuntu server and gives the below error when I try to download anything. $ sudo pip install SQLAlchemy Downloading/unpacking SQLAlchemy Cannot fetch index base URL http://pypi.python.org/simple/ Could not find any downloads that satisfy the requirement SQLAlchemy No distributions at all found for SQLAlchemy Storing complete log in /home/user/.pip/pip.log All of the below also do not work $ sudo pip install --upgrade pip $ sudo apt-get install build-essential My /etc/environment has the

Transfer ownership of PyPI packages

て烟熏妆下的殇ゞ 提交于 2019-12-03 01:33:09
As per PEP-541 abandoned PyPI projects can now be claimed. Has anyone done this? Who to contact? I tried the dist utils mail list as well as filing a ticket in the support forum , but no response so far. How does one actually request transfer of ownership in practice as outlined in PEP-541? Update : PEP 541 has been approved on 2018-03-23 . There is additional work to be done before you could request an ownership transfer, however. My original answer follows. The PEP is in draft stage. As such it is not official policy and requests are not likely to be honoured. If the PEP ever moves to the

how to set bug tracker url in setup.py script

柔情痞子 提交于 2019-12-03 01:22:39
I have just discovered the pypi web UI have a field 'Bug tracker URL' in edit of egg metadata. This field exists so I guess it is supported in setup.py but I can't find anything about this using google. So the question how do I set up this field in my setup.py so when doing a dist release on pypi it can be automaticly filled. The entry is called bugtrack_url , but it's not being picked up from setup.py . From context and code I understand it was intended to be used through-the-web on PyPI only, as per-project metadata, and not the usual per-release information. The field is now considered a