pypi

pypi UserWarning: Unknown distribution option: 'install_requires'

主宰稳场 提交于 2019-11-28 16:55:48
问题 Does anybody encounter this warning when executing python setup.py install of a PyPI package? install_requires defines what the package requires. A lot of PyPI packages have this option. How can it be an "unknown distribution option"? 回答1: python setup.py uses distutils which doesn't support install_requires. setuptools does, also distribute (its successor), and pip (which uses either) do. But you actually have to use them. I.e. call setuptools through the easy_install command or pip install

How to install PyPi packages using anacaonda conda command

蹲街弑〆低调 提交于 2019-11-28 16:43:52
When using the Anacoda Python distribution, what is the best way to install a PyPi package that isn't available directly through Anaconda? For now I'm using: conda pipbuild [pypi_name] conda install --use-local [package_spec] But I'm unclear if this is the best way and if conda update --all will update these packages when updates are made available. I'm also unclear what the point of binstar is when PyPi already exists. If you want to build conda packages for PyPI packages, the recommended way is to use conda skeleton pypi package and use conda build package on the recipe that it creates. You

PyPI is slow. How do I run my own server?

廉价感情. 提交于 2019-11-28 16:41:22
When a new developer joins the team, or Jenkins runs a complete build, I need to create a fresh virtualenv. I often find that setting up a virtualenv with Pip and a large number (more than 10) of requirements takes a very long time to install everything from PyPI. Often it fails altogether with: Downloading/unpacking Django==1.4.5 (from -r requirements.pip (line 1)) Exception: Traceback (most recent call last): File "/var/lib/jenkins/jobs/hermes-web/workspace/web/.venv/lib/python2.6/site-packages/pip-1.2.1-py2.6.egg/pip/basecommand.py", line 107, in main status = self.run(options, args) File "

Prevent package from being installed on old Python versions

一笑奈何 提交于 2019-11-28 13:18:33
What can we put in a setup.py file to prevent pip from collecting and attempting to install a package when using an unsupported Python version? For example magicstack is a project listed with the trove classifier: Programming Language :: Python :: 3 :: Only So I expect the following behaviour if pip --version is tied to python 2.7: $ pip install magicstack Collecting magicstack Could not find a version that satisfies the requirement magicstack (from versions: ) No matching distribution found for magicstack But the actual behavior is that pip collects a release, downloads it, attempts to

pip install (速度慢或者下载超时)使用豆瓣源

爱⌒轻易说出口 提交于 2019-11-28 10:25:21
pip install xxx -i http://pypi.douban.com/simple/ 如果如下报错 The repository located at pypi.douban.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this warning and allow it anyway with '--trusted-host pypi.douban.com'. Could not find a version that satisfies the requirement opencv-python (from versions: ) No matching distribution found for opencv-python The repository located at pypi.douban.com is not a trusted or secure host and is being ignored. If this repository is available via

How can I host my own private conda repository?

谁说胖子不能爱 提交于 2019-11-28 06:49:48
I have a few python projects that are dependent on each other. I have different release versions for each project and different projects might be dependent on different release versions of a particular project. I would like to create my own conda repository on an internal server where I can push the releases of these projects as conda packages and the other projects can install the required version from there. Is this possible? If so how? You can use a conda custom channel as your private repo. The essential steps are to use "conda build" to create a conda package, then copy that package into

Given the name of a Python package, what is the name of the module to import?

别来无恙 提交于 2019-11-28 06:49:02
Does somebody know the logic behind Python modules names vs the name of the actual package used in easy_install? A few (amongst others) example that seem a bit unlogical to me: We do easy_install mysql-python , but the import is in fact import MySQLdb We do easy_install python-memcached , but the import is in fact import memcache (without the trailing d) I didn't find a consistent way of finding the equivalence. For some modules, it took me a lot of browsing to find it. What am I doing wrong? Colonel Panic Regrettably, there's no method to the madness. The name in the package index is

Why is python setup.py saying invalid command 'bdist_wheel' on Travis CI?

北慕城南 提交于 2019-11-28 03:52:23
My Python package has a setup.py which builds fine locally on Ubuntu Trusty and on a fresh Vagrant Ubuntu Trusty VM when I provision it like this: sudo apt-get install python python-dev --force-yes --assume-yes --fix-broken curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py | sudo python2.7 sudo -H pip install setuptools wheel virtualenv --upgrade But when I do the same on a Travis CI Trusty Beta VM: - sudo apt-get install python python-dev --force-yes --assume-yes --fix-broken - curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py | sudo python2.7 -

python easy_install fails with SSL certificate error for all packages

只愿长相守 提交于 2019-11-28 03:07:52
问题 Goal: I'm on RedHat 5 and trying to install the latest python and django for a web app. I successfully altinstalled python27 and easy_install, and wget with openssl. Problem: However now that I try to get anything from pypi.python.org I get the following error: $ sudo easy_install --verbose django Searching for django Reading https://pypi.python.org/simple/django/ Download error on https://pypi.python.org/simple/django/: [Errno 1] _ssl.c:507: error:14090086:SSL routines:SSL3_GET_SERVER

Python PyPI

ぃ、小莉子 提交于 2019-11-28 00:57:51
The Python Package Index (PyPI) is a repository of software for the Python programming language. https://pypi.org/ 来源: https://www.cnblogs.com/longchang/p/11384689.html