Why does this `pip install` command fail? - python

Background: I first published this package on PyPi in January 2021. However, the following pip install command now fails when I run it on a Linode VPS:
$ pip install django-simplecms
ERROR: Could not find a version that satisfies the requirement django-simplecms (from versions: none)
ERROR: No matching distribution found for django-simplecms
When I run it from my home computer, it installs the package successfully. In both cases I am using pip version 21.1.3 (latest) in a freshly made virtualenv. How could this be?

Don't ask me why, but the following command bypasses the problem:
pip install -i https://pypi.org/pypi django-simplecms
According to pip's documentation, the -i, --index-url argument is used to specify the index and defaults to https://pypi.org/simple. When I changed this to https://pypi.org/pypi the package could be installed.
I guess my package is listed on PyPI Warehouse and not on PyPI Simple?

Related

Why can I not install oathlib on new python environment?

I used pyenv to install python 3.9.0, and then I created a virtual environment with 3.9.0. I have installed all the pip packages I need for my regular running of my python projects, except that one of them won't install:
> pip install oathlib
ERROR: Could not find a version that satisfies the requirement oathlib (from versions: none)
ERROR: No matching distribution found for oathlib
The problem is I am running a virtual environment just like this one on another pc, and I installed oathlib on it a few weeks ago, and it runs fine.
How can I get oathlib installed? Is there a problem with some latest version of oathlib that it just won't install in my pyenv? My pip package is the latest one available, so pip is not the issue.
Maybe u wanna install OAuthlib, I don't find oathlib?
pip install oauthlib

pip does not find the version of the package to install

I want to install pytorch3d version 0.3.0 or above, but pip sees only 0.0.1 version for installing. I runned next commands:
pip install pytorch3d==0.3.0
And got the next error:
ERROR: Could not find a version that satisfies the requirement pytorch3d==0.3.0 (from versions: 0.0.1)
ERROR: No matching distribution found for pytorch3d==0.3.0
If I run the install command without a specific version, pip will install the package with version 0.0.1.
My environment:
Windows 10 x64
Python 3.9.7
pip 21.2.4
Note:
direct internet connection, no proxy used
I haven't others versions python on pc
same errors when installing next packages: torchvision==0.7.0, torch==1.6.0
I tried with the virtualenv and without them
I installed Python from the windows store.
From their installation guide and your requirements use:
pip install pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/py38_cu102_pyt190/download.html
Specified package cannot be installed via pip, because not supported on my os(Windows 10). This can be seen on the page with the version and available files for download of the required package.

pip install: trying to install multiple version of same package from private pypi

I've a private pypi, and keep uploading new package framework to that registry.
I want to install the latest package in a virtualenv.
Command used:
pip install -i https://user:pass#registry framework
OUTPUT:
Collecting framework:
... downloads many versions
ERROR: Cannot install framework==0.25.13, framework==0.25.14 and framework==0.26.0 because these package versions have conflicting dependencies.
The conflict is caused by:
framework 0.26.0 depends on toolz<0.12.0 and >=0.11.1
framework 0.25.14 depends on toolz<0.12.0 and >=0.11.1
framework 0.25.13 depends on toolz<0.12.0 and >=0.11.1
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies
I want only the latest version to be downloaded. I cannot hard-code version like framework==0.26.0 while pip install because this command is to be used in script and I may need to modify the script everytime a new framework get uploaded.
pip version: pip 21.1.2
The solution that worked for this problem was using --extra-index-url instead of -i
Command to use
pip install --extra-index-url https://user:pass#registry framework

Can all/most python pip packages be installed using pypy3?

I am able to install the python3 package of forexconnect using:
python3 -m pip install forexconnect
but when I try to install it for pypy using:
pypy3 -m pip install forexconnect
I get the following error,
ERROR: Could not find a version that satisfies the requirement forexconnect (from versions: none)
ERROR: No matching distribution found for forexconnect
I have looked through the pypy documentation and can't work out what I need to do now. Perhaps I need to re-compile/rebuild the library but unfortunately my knowledge of python isn't good enough to understand what is probably quite straight-forward.
Please, does anyone know what is going on here and what needs to be done?
forexeconnect does not release a source tarball, so they must build a binary version for each python version they wish to support and upload that to PyPI. Most packages will release a source tarball and upload that to PyPI, then pip install can build the binary package from source. In this case, the package provider (assuming they do not want to release the source) would have to build a version for PyPy, there is nothing pip nor PyPy can do.
To see supported versions by pip try
pip install forexconnect==0
Then you can set specifical version with
pip install forexconnect==versionnumber

Why does this Sparkpost Python SDK Install fail?

I'm trying to install sparkpost sdk in the read me on git hub. I used the command:
pip install sparkpost
But I got this error:
Could not find a version that satisfies the requirement sparkpost (from versions: 1.0.0.dev1, 1.0.0.dev1)
The SparkPost Python SDK is currently in a pre-release version (that's what the .dev1 is at the end of the version).
Using pip > version 1.4.X you must explicitly define you want to use a pre-release package using the --pre option of pip install [options] command.
Try with this and it should work:
pip install --pre sparkpost
You may need to run as sudo if you experience permission issues.
I have created a new issue in https://github.com/sparkpost/python-sparkpost repository and I'll add the workaround to the documentation.
Thanks for finding this.

Categories