Why does this Sparkpost Python SDK Install fail? - python

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.

Related

Why does this `pip install` command fail?

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?

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

Installing specific package versions with pip from git private repo

I'm deploying some custom packages with pip straight from my company's private git repo (and it's awesome). But what if I want to install a specific version of my package?
This question completements Specify extras_require with pip install -e.
I'm trying to install it with:
pip install git+https://github.com/user/project.git#egg=project==0.0.1[extra]
But I get a ERROR: Invalid requirement: 'project==0.0.1[extra]' message.
Thanks!
Easy enough:
pip install git+https://github.com/user/project.git#v0.0.1#egg=project[extra]
Of course, assuming version 0.0.1 exists.
If your project is in a subfolder:
pip install "git+https://github.com/user/project.git#v0.0.1#egg=project[extra]&subdirectory=my_subprojects/subproject"
From the documentation

I get an error while trying to install Ride

I get an error when I type the command to install Robotframework ride on my Debian :
pip3 install robotframework--ride
The error is :
Could not find a version that satisfies the requirement Pywin32 (from robotframework--ride) (from versions: )
No matching distribution found for Pywin32 (from robotframework--ride)
Btw, it is quite strange that Pywin32 is mentionned while I'm not on Windows... I have both python2 andpython3` on my machine and I've read many topics where I saw it could bring about problems so it may be the reason I have this error...
can you please try the following two steps mentioned below?
According to this RIDE-doc, one needs to do the following if they are not on windows.
Excerpt from release notes
NOTE: The installation process mentioned in
the RIDE-RELEASE-NOTES is only working smoothly on Windows.
For other operating systems is better to do a two step install, with:
pip install -U -r https://raw.githubusercontent.com/robotframework/RIDE/master/requirements.txt
pip install -U robotframework-ride
That problem was fixed in versions not yet released.
See Release Notes for v1.7.4b2 on recommendations to install. Please install wxPython before.
A new version will be released soon.
pip install -U -r https://raw.githubusercontent.com/robotframework/RIDE/master/requirements.txt
pip install -U robotframework-ride
Try the above installation.
pip3 install robotframework--ride is only for Windows according to instruction given. Apparently Pywin32 is for creating desktop shortcut in windows.

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

Categories