Heroku - No matching distribution found for get [duplicate] - heroku

Suddenly I get a lot of errors while trying to use my previously working (for many months) requirements file.
I tried to go to the pypi.org and get the same 404 error.
Is there something wrong with my setup?
> pip install -r requirements.txt
Collecting get==2019.4.13 (from -r requirements.txt (line 4))
Cache entry deserialization failed, entry ignored
Exception:
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://pypi.org/simple/get/
If I remove line get==2019.4.13 next error is:
> pip install -r requirements.txt
Collecting post==2019.4.13 (from -r requirements.txt (line 11))
Cache entry deserialization failed, entry ignored
Exception:
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://pypi.org/simple/post/

PyPI administrator here. You probably unintentionally had request instead of requests in your requirements.txt file.
These projects (request, get, post) were removed by their author and no longer exist. You should remove them from your requirements.txt file.

I had the similiar problem. I have a django website deployed to Heroku. When I pushed my commit it threw errors like this:
remote: ERROR: Could not find a version that satisfies the requirement post==2019.4.13 (from -r /tmp/build_f0948004/requirements.txt (line 26)) (from versions: none)
remote: ERROR: No matching distribution found for post==2019.4.13 (from -r/tmp/build_f0948004/requirements.txt (line 26))
I deleted dependencies below that spat errors in requirements.txt:
get==2019.4.13
post==2019.4.13
request==2019.4.13
And I saved my commit and pushed it. Now it works fine.

Related

ERROR: Could not find a version that satisfies the requirement apache-airflow (from version: none)

I am currently trying to run 'pip install -r requirements.txt' from VS Code to install some packages (including Apache Airflow). I used the command 'pip install -r requirements.txt'; however I am receiving the following error message:
Could not fetch URL https://pypi.org/simple/apache-airflow/:
There was a problem confirming the ssl certificate:
HTTPSConnectionPool(hos=pypi.org', port =443): Max Retries with
url: /simple/apache-airflow (Caused by
SSLError(SsLCertVerificationError(1, '['SSL: CERTIFICATE VERIFY
FAILED] certificate verify failed: unable to get local issuer
certificate(_ssl.c:1091)'))) - skipping
ERROR: Could not find a version that satisfies the requirement
apache-airflow==1.10.15 (from version: none)
ERROR: NO matching distribution found for apache_airflow==1.10.15
(from requirements.txt(line 1))
I have tried the following as well:
export AIRFLOW_VERSION=1.10.15
I have also confirmed that my current version of Python is 3.7.10 and my current version of PIP is 20.1.1...
Thanks in advance!

`pip` suddenly breaks? with `pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.`

Note.
I know that many solutions have been proposed in this very relevant post but they are all very different and assume vastly different problems, and I don't want to blindly try one at random just to see what happens.
The problem.
I was working on a Jupiter notebook when I started getting errors (with the kernel, cannot quite remember exactly what, now). After trying a few things and searching the web, it seems the problem is that pip broke, somehow. Namely, I am getting the
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available..
error message. Some further reading suggests that the problem is with homebrew?
This puzzles me for two reasons:
- I don't see what I did that broke pip;
- pip for all of my virtual environments seem broken.
What is the problem, really, and where does it come from?
Setup.
- macOS Catalina 10.15.3.
- pyenv as Python virtual environment manager
- outputs below for Python and pip versions
Some outputs.
The command pip --version with python3.8.2 is very strange. Going through the site-packages of the python3.8.2 install, it looks like pip version is 19.2.3.
The errors are not the quite the same for the different versions of pip.
$ pyenv local 3.6.7 && pip --version && pip list
pip 10.0.1 from /Users/antoine/.pyenv/versions/3.6.7/lib/python3.6/site-packages/pip (python 3.6)
# prints list correctly
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)) - skipping
$ pyenv local 3.7.1 && pip --version && pip list
pip 10.0.1 from /Users/antoine/.pyenv/versions/3.7.1/lib/python3.7/site-packages/pip (python 3.7)
# prints list correctly
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
$ pyenv local 3.7.4 && pip --version && pip list
pip 19.3.1 from /Users/antoine/.pyenv/versions/3.7.4/lib/python3.7/site-packages/pip (python 3.7)
# prints list correctly
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
$ pyenv local 3.8.2 && pip --version # produces error, no need to try `pip list`
# prints something that looks like ImageMagick help documentation
By default, 'file' is written in the MIFF image format. To
specify a particular image format, precede the filename with an image
format name and a colon (i.e. ps:image) or specify the image type as
the filename suffix (i.e. image.ps). Specify 'file' as '-' for
standard input or output.
import: delegate library support not built-in '' (X11) # error/import.c/ImportImageCommand/1282.
from: can't read /var/mail/pip._internal
/Users/antoine/.pyenv/versions/3.8.2/bin/pip: line 9: syntax error near unexpected token `('
/Users/antoine/.pyenv/versions/3.8.2/bin/pip: line 9: ` sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])'

Why does pip freeze geneate package_name=0.0.0

I used pip freeze to pull out every dependency of my virtualenv to use this environment in other place so that I got the requirements.txt like the below.
certifi==2017.7.27.1
chardet==3.0.4
get==0.0.0
gevent==1.2.2
greenlet==0.4.12
idna==2.6
numpy==1.13.3
pandas==0.20.3
post==0.0.0
psycopg2==2.7.3.1
public==0.0.0
python-dateutil==2.6.1
pytz==2017.2
query-string==0.0.0
request==0.0.0
requests==2.18.4
setupfiles==0.0.50
six==1.11.0
sqlalchemy==1.1.14
urllib3==1.22
I used this requirements in other computer but whenever I tried running pip install -r requirements.txt I got the error like the following.
$ pip install -r requirements.txt
Requirement already satisfied: certifi==2017.7.27.1 in d:\workspace\juice-project\venv\lib\site-packages (from -r requirements.txt (line 1))
Requirement already satisfied: chardet==3.0.4 in d:\workspace\juice-project\venv\lib\site-packages (from -r requirements.txt (line 2))
Collecting get==0.0.0 (from -r requirements.txt (line 3))
Using cached get-0.0.0.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "d:\workspace\juice-project\venv\lib\tokenize.py", line 452, in open
buffer = _builtin_open(filename, 'rb')
PermissionError: [Errno 13] Permission denied: 'C:\\Users\\verys\\AppData\\Local\\Temp\\pip-build-1cd8yl0b\\get\\setup.py'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\verys\AppData\Local\Temp\pip-build-1cd8yl0b\get\
I thought it is caused by privilege of window user so that I spent a lots of time to solve this problem with other reason. I got so annoyed because of the bug. Could you explain why this unused things generate and why this error can be like this?
Because these libraries — get, request (of the same author) — are written improperly. It is not your problem, it is theirs. You are NOT able to solve this from your side.
Take a look at their setup.py:
kwargs = dict()
# known-issues:
# pip running `python setup.py egg_info` before installation:
# 1) pip checks metadata name pip/req/req_install.py:run_egg_info()
# 2) pip attempts to discover all of the dependencies before installation
name = os.path.basename(os.getcwd()).split(".")[0].lower()
path = os.path.join(os.getcwd(), "requirements.txt")
if os.path.exists(path) and os.path.isfile(path):
kwargs["install_requires"] = open(path).read().splitlines()
setup(name=name, **kwargs)
It does not contain version=... kwarg. Sadly so, this library will be always of version 0.0.0, which is the default of this setupfiles self-made library (see here).
PS: Do you really want to use a library of that quality? Why not just copy thise few lines to your code? This is not nodejs world, where it is good to use nano-modules like this.
UPD: I've just noticed that setup() is not from setuptools, but from setupfiles, also of the same author, and it is declared to guess the values of the keys. So, maybe it was supposed to work. But is broken because of this non-standard usage of the setup conventions.
I wouldn't say it is a best or even good practice to replace setuptools this way. And it is not safe either — the malicious library authors can just inject any arbitrary code to be executed on your workstations/servers. Especially that hacky.
Still, in the example it requires a version=... argument, which is missing in those libraries.

Pip: Could not fetch URL for pypi and issue confirming the ssl certificate

I recently just installed python(3.6.1) which is running pip(9.0.1) and I get the following error anytime I try to install a package:
pip install cx_Oracle
Collecting cx_Oracle
Could not fetch URL https://pypi.python.org/simple/cx-oracle/: There was a pro
blem confirming the ssl certificate: [SSL: CERTIFICATE_VERIFY_FAILED] certificat
e verify failed (_ssl.c:749) - skipping
Could not find a version that satisfies the requirement cx_Oracle (from versio
ns: )
No matching distribution found for cx_Oracle
Since it was having trouble with certificates I tried doing this:
pip install --trusted-host pypi.python.org pytest-xdist
Collecting pytest-xdist
Downloading pytest-xdist-1.15.0.tar.gz (87kB)
100% |████████████████████████████████| 92kB 1.8MB/s
Complete output from command python setup.py egg_info:
Download error on https://pypi.python.org/simple/setuptools_scm/: [SSL: CERT
IFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749) -- Some packages m
ay not be found!
Download error on https://pypi.python.org/simple/setuptools-scm/: [SSL: CERT
IFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749) -- Some packages m
ay not be found!
Couldn't find index page for 'setuptools_scm' (maybe misspelled?)
Download error on https://pypi.python.org/simple/: [SSL: CERTIFICATE_VERIFY_
FAILED] certificate verify failed (_ssl.c:749) -- Some packages may not be found
!
No local packages or working download links found for setuptools_scm
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\ALEX~1.CAU\AppData\Local\Temp\pip-build-7vo4jump\pytest-xdi
st\setup.py", line 37, in <module>
'Programming Language :: Python :: 3',
File "c:\users\alex.cauthen\appdata\local\programs\python\python36\lib\dis
tutils\core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "c:\users\alex.cauthen\appdata\local\programs\python\python36\lib\sit
e-packages\setuptools\dist.py", line 315, in __init__
self.fetch_build_eggs(attrs['setup_requires'])
File "c:\users\alex.cauthen\appdata\local\programs\python\python36\lib\sit
e-packages\setuptools\dist.py", line 361, in fetch_build_eggs
replace_conflicting=True,
File "c:\users\alex.cauthen\appdata\local\programs\python\python36\lib\sit
e-packages\pkg_resources\__init__.py", line 850, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "c:\users\alex.cauthen\appdata\local\programs\python\python36\lib\sit
e-packages\pkg_resources\__init__.py", line 1122, in best_match
return self.obtain(req, installer)
File "c:\users\alex.cauthen\appdata\local\programs\python\python36\lib\sit
e-packages\pkg_resources\__init__.py", line 1134, in obtain
return installer(requirement)
File "c:\users\alex.cauthen\appdata\local\programs\python\python36\lib\sit
e-packages\setuptools\dist.py", line 429, in fetch_build_egg
return cmd.easy_install(req)
File "c:\users\alex.cauthen\appdata\local\programs\python\python36\lib\sit
e-packages\setuptools\command\easy_install.py", line 659, in easy_install
raise DistutilsError(msg)
distutils.errors.DistutilsError: Could not find suitable distribution for Re
quirement.parse('setuptools_scm')
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\ALEX~1.C
AU\AppData\Local\Temp\pip-build-7vo4jump\pytest-xdist\
After getting the egg_info error I tried the following:
easy_install -U setuptools
Searching for setuptools
Reading https://pypi.python.org/simple/setuptools/
Download error on https://pypi.python.org/simple/setuptools/: [SSL: CERTIFICATE_
VERIFY_FAILED] certificate verify failed (_ssl.c:749) -- Some packages may not b
e found!
Couldn't retrieve index page for 'setuptools'
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
Download error on https://pypi.python.org/simple/: [SSL: CERTIFICATE_VERIFY_FAIL
ED] certificate verify failed (_ssl.c:749) -- Some packages may not be found!
Best match: setuptools 28.8.0
Adding setuptools 28.8.0 to easy-install.pth file
Installing easy_install-script.py script to c:\users\alex.cauthen\appdata\local\
programs\python\python36\Scripts
Installing easy_install.exe script to c:\users\alex.cauthen\appdata\local\progra
ms\python\python36\Scripts
error: [WinError 5] Access is denied: 'c:\\users\\alex.cauthen\\appdata\\local\\
programs\\python\\python36\\Scripts\\easy_install.exe'
Many of the answers to similar stackoverflow questions have suggested to change proxy settings. I am not working behind a proxy, but I am working behind a VPN. I had a very similar issue with NodeJS/react/npm when installing packages, all the suggestions were to change your proxy settings. I ended up fixing the problem by deleting the file that stored the proxy settings.
I've had trouble locating a file that serves the same function for python/pip and was wondering if anyone knows where it is located on Windows 7? I'd also love to hear other suggestions on how to fix this very frustrating issue!!
Alex
My solution is to first do pip install --trusted-host pypi.python.org setuptools_scm and then install pytest-xdist after that.
The --trusted-host pypi.python.org option worked for me for all my requirements except for pytest-xdist, as you have as an example. The hint is that this particular package complains that
Couldn't find index page for 'setuptools_scm' (maybe misspelled?)
Not a complete answer for what you are asking, but your outputs are similar to what I've just been dealing with, so these are my notes.
On a Mac with python2.7, I had a similar pip install error complaining "There was a problem confirming the ssl certificate". This for a different package but the solution for me might prove useful for others. It was on older Mac used by my family that I hadn't kept up to date. The problem was resolved once I updated homebrew, upgraded the brew packages we had already installed, and used brew to relink python2.
brew update
brew upgrade
brew install python2
brew link --overwrite python#2

Error Creating First Pebble Project

I am trying to create my first Pebble project and it simply fails when I run the pebble new_profile hello_world.
johndoe-mbp-2:projects johndoe$ pebble new-profile hello_world
[DEBUG ] [Analytics] header: {'User-Agent': 'Pebble SDK/2.0-BETA6 (Darwin-13.0.0-x86_64-i386-64bit-python-2.7.5)'}, data: {'ck': '2.7.5', 'cn': 'Darwin-13.0.0-x86_64-i386-64bit', 'cid': '3247db56-af31-4738-999a-uuuuu', 'tid': 'UA-66666-7', 't': 'event', 'v': 1, 'cs': '3247db56-af31-4738-999a-yyyyy'}
category: install
action: import
label: fail: missing import: No module named websocket
value: 0
Traceback (most recent call last):
File "/Users/johndoe/pebble-dev/PebbleSDK-2.0-BETA6/bin/../tools/pebble.py", line 14, in <module>
import websocket
ImportError: No module named websocket
Any ideas?
Try uninstalling any websocket module on your computer, and reinstalling the Pebble SDK depencies:
pip uninstall websocket
pip install --user -r ~/pebble-dev/PebbleSDK-2.0-BETA7/requirements.txt
Note: You will need to update the location of the SDK in this command line.
Make sure you provide an absolute path to the requirements.txt file. I tried running the command from the directory that I installed the Pebble SDK:
$PEBBLE_HOME> pip install requirements.txt
which resulted in:
Downloading/unpacking requirements.txt
Real name of requirement requirements.txt is requirements.txt
Could not find any downloads that satisfy the requirement requirements.txt
Cleaning up...
No distributions at all found for requirements.txt
Storing debug log for failure in $HOME/.pip/pip.log
Checking out that pip.log file showed that pip was trying to access requirements.txt from https://pypi.python.org/simple/requirements.txt/ which was 404ing.
Once I changed to use an absolute path it was all good:
> pip install -r $PEBBLE_HOME/requirements.txt # Where $PEBBLE_HOME is where you put the SDK

Resources