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

You can automate most of the work with regular python tools. Let’s start with clean virtualenv. [zart@feena ~]$ mkdir ziplib-demo [zart@feena ~]$ cd ziplib-demo [zart@feena ziplib-demo]$ virtualenv . New python executable in ./bin/python Installing setuptools………….done. Installing pip……………done. Now let’s install set of packages that will go into zipped library. The trick is to force installing … Read more

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

Regrettably, there’s no method to the madness. The name in the package index is independent of the module name you import. Disastrously some packages share module names. If you install both, your application will break with even odds. (Ruby has this problem too) Packaging in Python is generally dire. The root cause is that the … Read more

PyPi issues – Upload failed (401): You must be identified to edit package information [duplicate]

the answer for this seems not very non-windows-specific, give it a try: accepted answer It says basically, that you need a file .pypirc with the following section: [server-login] username:tschellenbach password:******** (the real one) also, this is the relevant documentation (about .pypirc): On windows, an you’ll need to set a HOME environ var to point to … Read more

Why was PyPI called the cheese shop?

Following the fact that the name of the Python language is taken from the Monty Python comedy group, it’s a reference to the “Cheese Shop” sketch they did. In the sketch, a customer becomes frustrated because the cheese shop apparently does not have very many kinds of cheese available. Similarly, the package index PyPI did … Read more

How to setup pip to download from mirror repository by default?

using pip config, on user or global level. I have /etc/pip.conf configured like this: [global] index=https://my-company/nexus/repository/pypi-group/pypi index-url=https://my-company/nexus/repository/pypi-group/simple trusted-host=my-company but you can configure this using pip config on user or global level, something like: pip config –user set global.index https://my-company/nexus/repository/pypi-group/pypi pip config –user set global.index-url https://my-company/nexus/repository/pypi-group/simple pip config –user set global.trusted-host my-company #NOTES –index-url is used … Read more