pypi

How to roll my own pypi?

送分小仙女□ 提交于 2019-11-26 09:24:51
问题 I would like to run my own internal pypi server, for egg distribution within my organization. I have found a few projects, such as: http://pypi.python.org/pypi/EggBasket/ http://plone.org/products/plonesoftwarecenter As I understand it, pypi.python.org uses software called Cheese Shop. My questions: Why can\'t I use cheeseshop itself? (I can\'t find it, not sure it exists) How do other people solve this problem? (Currently we use blush svn to distribute eggs) *edit: This seems canonical http:

Post-install script with Python setuptools

别说谁变了你拦得住时间么 提交于 2019-11-26 07:32:50
Is it possible to specify a post-install Python script file as part of the setuptools setup.py file so that a user can run the command: python setup.py install on a local project file archive, or pip install <name> for a PyPI project and the script will be run at the completion of the standard setuptools install? I am looking to perform post-install tasks that can be coded in a single Python script file (e.g. deliver a custom post-install message to the user, pull additional data files from a different remote source repository). I came across this SO answer from several years ago that

Find all packages installed with easy_install/pip?

試著忘記壹切 提交于 2019-11-26 06:53:02
问题 Is there a way to find all Python PyPI packages that were installed with easy_install or pip? I mean, excluding everything that was/is installed with the distributions tools (in this case apt-get on Debian). 回答1: pip freeze will output a list of installed packages and their versions. It also allows you to write those packages to a file that can later be used to set up a new environment. https://pip.pypa.io/en/stable/reference/pip_freeze/#pip-freeze 回答2: As of version 1.3 of pip you can now

Post-install script with Python setuptools

心已入冬 提交于 2019-11-26 05:49:12
问题 Is it possible to specify a post-install Python script file as part of the setuptools setup.py file so that a user can run the command: python setup.py install on a local project file archive, or pip install <name> for a PyPI project and the script will be run at the completion of the standard setuptools install? I am looking to perform post-install tasks that can be coded in a single Python script file (e.g. deliver a custom post-install message to the user, pull additional data files from a

How to run pip of different version of python using python command?

﹥>﹥吖頭↗ 提交于 2019-11-26 03:57:14
问题 I\'m now currently using Python on ubuntu 15.10 But in my OS, I have many different python version installed: Python (2.7.9) Python3 (3.4.3) Python3.5 PyPy So, I got mess about the version of their package environment, for example, if I run: pip3 install django In fact I cannot import django inside python3.5 . Is there any efficiently way to call the relating version of pip ? PS: Don\'t suggest that I use virtualenv, I know about it and am seeking another solution. 回答1: Finally I found the

How can I make setuptools install a package that&#39;s not on PyPI?

爱⌒轻易说出口 提交于 2019-11-26 02:16:14
问题 I\'ve just started working with setuptools and virtualenv. My package requires the latest python-gearman that is only available from GitHub. The python-gearman version that\'s on PyPI is an old one. The Github source is setuptools-compatible, i.e. has setup.py, etc. Is there a way to make setuptools download and install the new version instead of looking for it on PyPI and installing the old one? FYI, the new python-gearman is http://github.com/mtai/python-gearman 回答1: The key is to tell easy

What is setup.py?

£可爱£侵袭症+ 提交于 2019-11-26 00:29:31
问题 Can anyone please explain, what is setup.py and how can it be configured or used? 回答1: setup.py is a python file, which usually tells you that the module/package you are about to install has been packaged and distributed with Distutils, which is the standard for distributing Python Modules. This allows you to easily install Python packages. Often it's enough to write: $ pip install . pip will use setup.py to install your module. Avoid calling setup.py directly. https://docs.python.org/3

Installing python module within code

爷,独闯天下 提交于 2019-11-25 23:59:26
问题 I need to install a package from PyPi straight within my script. Maybe there\'s some module or distutils ( distribute , pip etc.) feature which allows me to just execute something like pypi.install(\'requests\') and requests will be installed into my virtualenv. 回答1: You can also use something like: import pip def install(package): if hasattr(pip, 'main'): pip.main(['install', package]) else: pip._internal.main(['install', package]) # Example if __name__ == '__main__': install('argh') 回答2:

Why use pip over easy_install? [closed]

↘锁芯ラ 提交于 2019-11-25 23:59:23
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 3 years ago . A tweet reads: Don\'t use easy_install, unless you like stabbing yourself in the face. Use pip. Why use pip over easy_install? Doesn\'t the fault lie with PyPI and package authors mostly? If an author uploads crap source tarball (eg: missing files, no setup.py) to PyPI, then

Installing specific package versions with pip

ε祈祈猫儿з 提交于 2019-11-25 23:51:33
问题 I\'m trying to install version 1.2.2 of the MySQL_python adaptor, using a fresh virtualenv created with the --no-site-packages option. The current version shown in PyPi is 1.2.3. Is there a way to install the older version? I found an article stating that this should do it: pip install MySQL_python==1.2.2 When installed, however, it still shows MySQL_python-1.2.3-py2.6.egg-info in the site packages. Is this a problem specific to this package, or am I doing something wrong? 回答1: First, I see