pypi

How to list the names of PyPI packages corresponding to imports in a script?

谁说胖子不能爱 提交于 2019-12-18 17:00:03
问题 Is there a way to list the PyPi package names which correspond to modules being imported in a script? For instance to import the module scapy3k (this is its name) I need to use import scapy.all but the actual package to install is scapy-python3 . The latter is what I am looking to extract from what I will find in the import statement (I do not care about its name - scapy3k in that case). There are other examples (which escape me right now) of packages which have a pip install name completely

A guide for updating packages on PyPi

拜拜、爱过 提交于 2019-12-18 13:24:49
问题 I used this guide to install a new package on PyPi. Now, I want to update the package. Since I found no guide for this, I tried to do it myself: I updated the version from "1.0.0.dev1" to "1.0.0.dev2" and re-installed. It did not work: I got: Uploading tee_table-1.0.0.dev1-py3-none-any.whl HTTPError: 400 Client Error: File already exists. See https://pypi.org/help/#file-name-reuse for url: https://upload.pypi.org/legacy/ I also read this question but the information seems outdated (from 2012)

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

…衆ロ難τιáo~ 提交于 2019-12-18 10:58:33
问题 This question already has answers here : “setup.py upload” is failing with “Upload failed (401): You must be identified to edit package information” (7 answers) Closed 6 years ago . Im encountering a problem with pypi similar to this one, except that I'm running windows and the mentioned solution page is down. Does anyone know how to work around this? I'm using python 2.5. python setup.py sdist register upload running register We need to know who you are, so please choose either: 1. use your

packaging common python namespaces

左心房为你撑大大i 提交于 2019-12-18 10:24:38
问题 I'm looking to package and upload a library I have to PyPI in the next few days, but I'm a little unsure about my approach to the namespace. I have a few otherwise unrelated projects with a similar approach and wanted to give them all the same namespace. For example: Library 1 namespace: abc.seo Library 2 namespace: abc.ajax Library 3 namespace: abc.ecommerce etc The problem is that I'm not sure if it's possible for two separate packages (eg eggs) to co-exist with the same parent namespace.

Have the same README both in Markdown and reStructuredText

走远了吗. 提交于 2019-12-18 09:54:14
问题 I have a project hosted on GitHub. For this I have written my README using the Markdown syntax in order to have it nicely formatted on GitHub. As my project is in Python I also plan to upload it to PyPi. The syntax used for READMEs on PyPi is reStructuredText. I would like to avoid having to handle two READMEs containing roughly the same content; so I searched for a markdown to RST (or the other way around) translator, but couldn't find any. The other solution I see is to perform a markdown

FileNotFoundError: [Errno 2] when packaging for PyPI

喜欢而已 提交于 2019-12-18 09:13:47
问题 I have uploaded a simple python package in https://test.pypi.org. When I download this with pip and try yo run I get FileNotFoundError: [Errno 2] File b'data/spam_collection.csv' does not exist: b'data/spam_collection.csv' . Earlier I had issues with uploading the csv file when packaging. See my question in Could not upload csv file to test.pypi.org. Now after installing the package with pip I run pip show -f bigramspamclassifier . I get the csv file listed. Therefore, I believe the file has

Using hyphen/dash in python repository name and package name

瘦欲@ 提交于 2019-12-18 05:12:07
问题 I am trying to make my git repository pip-installable. In preparation for that I am restructuring the repo to follow the right conventions. My understanding from looking at other repositories is that I should put all my source code in a package that has the same name as the repository name. E.g. if my repository is called myrepo , then the source code would all go into a package also called myrepo . My repository has a hyphen in it for readability: e.g. my-repo . So if I wanted to make a

Does conda update packages from pypi installed using pip install?

梦想的初衷 提交于 2019-12-18 04:54:39
问题 I use Anaconda (because it is awesome), and the packages available through conda install are quite extensive. However now and then I do need to install a package that isn't available in the conda repositories, and so get it from pypi instead. My question: when I run the command conda update --all , will conda also update these pypi packages? Or do I have to update them separately? The conda docs don't seem to contain an answer to this. This question and answer seems to indicate that no, conda

Packaging resources with setuptools/distribute

人走茶凉 提交于 2019-12-17 22:52:34
问题 I'm developing an Python egg that has several .txt dependencies (they're templates used to generate files by the egg itself), and I'm struggling to get those dependencies copied to site-packages during setup.py install . According to the distribute documentation... Filesystem of my package: setup.py package |--- __init__.py |--- main.py |--- binary (calls main.py with pkg_resources.load_entry_point) |--- templates |--file1.txt |--file2.txt In setup.py: setup( [...] eager_resources = [

How to find “import name” of any package in Python?

半城伤御伤魂 提交于 2019-12-17 19:33:56
问题 I wonder if is there any reliable and consistant way to get a Python package's "import name" / namespace. For example; Package ; django-haystack Import name ; haystack or Package ; ipython Import name ; IPython So far I know, PyPi doesn't store that information that I've checked with PyPiXmlRpc. I also tried to automate to download the package, extract it and dig the .egg-info but some packages doesn't have that folder at all. Any help will be appreciated and will be used for a good-manner