unable to download python package hosted at pypi - python

SOLVED
forgot to run command
python setup.py sdist upload
I have just uploaded a python module at pypi and it has been successfully updated in pypi database. However when i try to install it through pip it throws this message :
Downloading/unpacking textprocess
Could not find any downloads that satisfy the requirement textprocess
Cleaning up...
No distributions at all found for textprocess
Storing complete log in /Users/mayankbhola/.pip/pip.log
package is hosted at : https://pypi.python.org/pypi/textprocess/0.1

Related

pipenv "Could not find a version that satisfies the requirement" from private pypi when pip can install it just fine

I recently built and uploaded a new sdist to my private pypi and I'm getting
CRITICAL:pipenv.patched.notpip._internal.index:Could not find a
version that satisfies the requirement mypackage [list of versions
that does not include the version I just added]
I ran pipenv install with -vvvv and I noticed that pipenv was printing
['/myvirtualenvpath/bin/pip', 'install', '--verbose', '--upgrade',
'"mypackage==myversion"', '-i', 'https://pypi.org/simple',
'--extra-index-url', 'https://myindex/pypi/pypi/simple']
So naturally I ran that command from within the pipenv venv to see what the error is but it installed the package right away.
The index is clearly set right, especially since this was a nonissue until I uploaded this new sdist. I went on the browser to my pypi index and the version is indeed there.
I inspected the contents of my pypi index more closely and I noticed that it was missing a .whl file. Running python setup.py bdist_wheel upload solves the problem.
So before every other version had my-package-my-version-py2.py3-none-any.whl. Generating and uploading this file to pypi solved this problem.

pip install fails to install dependencies [duplicate]

This question already has answers here:
Pip install from pypi works, but from testpypi fails (cannot find requirements)
(2 answers)
Closed 2 years ago.
TL;DR Even though I've specified dependencies with install_requires in setup.py, the install through pip fails because some dependencies can't be found.
I've developed a package which I intend to distribute via PyPi. I've created a built distribution wheel and uploaded it to testPyPI to see if everything is working with the upload and if the package can be installed from a user perspective.
However, when I try to pip install the package inside a vanilla python 2.7 environment, the installation process fails while installing the dependencies.
My package depends on these packages (which I added to the setup.py file accordingly):
...
install_requires=['numpy','gdal','h5py','beautifulsoup4','requests','tables','progress'],
...
So when I run pip install, everything looks normal for a moment, until I receive this error:
Could not find a version that satisfies the requirement progress (from #NAME#) (from versions: )
No matching distribution found for progress (from #NAME#)
When I remove the progress dependency (I could live without it), same thing happens for pytables:
Could not find a version that satisfies the requirement tables (from #NAME#) (from versions: )
No matching distribution found for tables (from #NAME#)
If I run pip install tables and pip install progress manually beforehand, everything works as expected.
So how can I assure that if someone downloads my package, all missing dependencies are installed with it?
Related bonus question:
Can I include a wheel file in my package (maybe through MANIFEST.in) and install it as dependency if the module is not available? If so, how?
And I think I've found the answer to my question myself.
When installing a package from testPyPI, the dependencies are also installed from there. And it seems, that while there are many packages available, pytables and progress are apparently missing. This caused the installation to fail.
Naturally, manually installing with pip install gets the package from the "normal" PyPi, which of course works. This obviously added to my confusion.
Here's a look at the output from pip install when installing the package from the testPyPi:
Downloading https://test-files.pythonhosted.org/packages/4f/96/b3329750a04fcfc316f15f658daf6d81acc3ac61e3db390abe8954574c18/nump
y-1.9.3.tar.gz (4.0MB)
while installing the wheel directly, it looks slightly different:
Downloading https://files.pythonhosted.org/packages/2e/91/504e434d3b95d943caab926f33dee5691768fbb622bc290a0fa6df77e1d8/numpy-1.1
4.2-cp27-none-win32.whl (9.8MB)
Additionally, running
pip install --index-url https://test.pypi.org/simple/ tables
produces the same error as described in my question.

Why upload module in repository not found via pip install?

I upload module
example-framework.python.egg
via Jenkins in JFrog Artifactory.
Upload completed good without errors.
I checked in Artifactory, in repository browser saw in properties
pypi.name - example-framework
Tried to install module via artifactory.
pip install example-framework
pip returned error:
Collecting example-framework
Could not find a version that satisfies the requirement example-framework (from versions: )
No matching distribution found for example-framework
How solve this problem?
For the user running pip, make sure you have correctly setup your ~/.pip/pip.conf file to point to Artifactory. You can see an example of this in the Set Me Up box for the pipy repo.

Python project installation without internet connection

I need to install a python project on a machine without internet connection. During the creation of the deb package I downloaded all python requirements with pip download and I putted them into the deb.
When installing the deb on the machine I get errors from python packages not being found and I discovered that packages creating problems are the ones specified into the field setup_requires of setup.py files of the included packages.
For example the PyJWT package has setup_requires=['pytest-runner'] but pytest-runner is not downloaded by pip download and during the installation this gives error.
My question are:
is there a way of having pip downloading all dependencies (also those on setup_requires fields)?
Is this the correct workflow for creating a deb that has to be installed offline?

Unable to download python packages in python 3.4

Here is the installation procedure
C:\Python34>python -m pip install simplegui
Downloading/unpacking simplegui
Cannot fetch index base URL https://pypi.python.org/simple/
Could not find any downloads that satisfy the requirement simplegui
Cleaning up...
No distributions at all found for simplegui
Storing debug log for failure in C:\Users\Tanay\pip\pip.log
What would be the exact solution to download python package ?
simplegui is listed on the Py Package Index, but does not seem to have been uploaded to pypi. The listing refers to the simplegui page, which in turn has a link to a zip file that one must download, unzip, and install.
Not enough rep to comment, but if you can download the package you need, you can still install it using pip as
pip install <path to package folder you downloaded>
If you run into any problems with a 2.x package you can always try 2to3 to make the package compatible with 3.x.

Categories

Resources