How to install PyPi packages using anaconda conda command

I will disagree with the accepted response and note that pip install [some-pypi-package] is often the best way to install PyPi packages in Conda environments. While the packages won’t be managed by the Conda package manager, they will still be managed by the Anaconda environment. It will download the correct version of the package for … Read more

Credentials in pip.conf for private PyPI

You could store credentials for Pip to use in ~/.netrc like this: machine pypi.example.com login johndoe password changeme Pip will use these credentials when accessing https://pypi.example.com but won’t log them. You must specify the index server separately (such as in pip.conf as in the question). Note that ~/.netrc must be owned by the user pip … Read more

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

Wheels I know this is an old question, but wheel packages have since been invented! Since a wheel is simply a zip file that gets extracted into the lib/site-packages directory, an examination of the contents of the wheel archive can give you the top level imports. >>> import zipfile >>> zf = zipfile.ZipFile(‘setuptools-35.0.2-py2.py3-none-any.whl’) >>> top_level … Read more

Using hyphen/dash in python repository name and package name

To answer your 1st point let me rephrase my answer to a different question. The biggest source of misunderstanding is that the word “package” is heavily overloaded. There are 4 different names in the game — the name of the repository, the name of the directory being used for development (the one that contains setup.py), … Read more

Failed to upload packages to PyPI: 410 Gone

Upgrade to the very latest pip and setuptools; install twine: pip install -U pip setuptools twine Edit ~/.pypirc and comment out or remove repository: [pypi] #repository:https://pypi.python.org/pypi Use twine to upload your module to pypi from within the folder containing the module source, setup.py, and other files: python setup.py sdist twine upload dist/* See https://packaging.python.org/guides/migrating-to-pypi-org/#uploading

How can I make setuptools install a package that’s not on PyPI?

The key is to tell easy_install where the package can be downloaded. In this particular case, it can be found at the url http://github.com/mtai/python-gearman/tarball/master. However, that link by itself won’t work, because easy_install can’t tell just by looking at the URL what it’s going to get. By changing it to http://github.com/mtai/python-gearman/tarball/master#egg=gearman-2.0.0beta instead, easy_install will be … Read more

tech