ploxiln/paramiko-ng

#egg=paramiko not working with new pip versions

voryzen opened this issue · 6 comments

I have been trying to replace paramiko with paramiko-ng, using the commands provided.

However, I keep getting this error:
`no matches found: https://github.com/ploxiln/paramiko-ng/archive/2.8.10.tar.gz#egg=paramiko'

This apparently has something to do with the way pip resolves urls, beginning from version 20.3.

Is there another way to do this?

Did you remember to set PARAMIKO_REPLACE=1 in the environment?

(venv3)$ pip --version
pip 20.3.4 from /home/pierce/scratch/venv3/lib/python3.9/site-packages/pip (python 3.9)


(venv3)$ pip freeze | egrep -i para

(venv3)$ PARAMIKO_REPLACE=1 pip install https://github.com/ploxiln/paramiko-ng/archive/2.8.10.tar.gz#egg=paramiko
Collecting paramiko
  Downloading https://github.com/ploxiln/paramiko-ng/archive/2.8.10.tar.gz
     - 273 kB 2.7 MB/s
Requirement already satisfied: bcrypt>=3 in ./venv3/lib/python3.9/site-packages (from paramiko) (3.2.0)
...
Building wheels for collected packages: paramiko
  Building wheel for paramiko (setup.py) ... done
  Created wheel for paramiko: filename=paramiko-2.8.10-py2.py3-none-any.whl size=197610 sha256=7e77bccb63eafbe0c578996aac0d7c0d76bb85665474ec33ad9705dd5458466b
  Stored in directory: /tmp/pip-ephem-wheel-cache-5nsj6q3a/wheels/e9/b0/a6/6fd161b6ced97d3abfd827f0c6fe2f1d89677b9df3d5030325
Successfully built paramiko
Installing collected packages: paramiko
Successfully installed paramiko-2.8.10

(venv3)$ pip freeze | egrep -i para
paramiko @ https://github.com/ploxiln/paramiko-ng/archive/2.8.10.tar.gz

EDIT: also tested with pip-21.3.1 and also works, but with different freeze output:

(venv39)$ pip --version
pip 21.3.1 from /Users/pierce/scratch/venv39/lib/python3.9/site-packages/pip (python 3.9)

(venv39)$ pip freeze | egrep -i para                                                                              
paramiko==2.8.10

I copied and pasted the command you used
PARAMIKO_REPLACE=1 pip install https://github.com/ploxiln/paramiko-ng/archive/2.8.10.tar.gz#egg=paramiko`

the only output I get is this,
no matches found: https://github.com/ploxiln/paramiko-ng/archive/2.8.10.tar.gz#egg=paramiko

when I attempt it the other way,
PARAMIKO_REPLACE=1 pip install paramiko @ https://github.com/ploxiln/paramiko-ng/archive/2.8.10.tar.gz

I get this output,
ERROR: Invalid requirement: '@'

I hope I'm missing something.

What's the output of pip --version? What OS are you running on?

I hadn't really considered using that "pip freeze" output directly, but it does seem to also work if you quote it:

$ PARAMIKO_REPLACE=1 pip install 'paramiko @ https://github.com/ploxiln/paramiko-ng/archive/2.8.10.tar.gz'
Collecting paramiko@ https://github.com/ploxiln/paramiko-ng/archive/2.8.10.tar.gz
...
Successfully built paramiko
Installing collected packages: paramiko
Successfully installed paramiko-2.8.10

ah ... I think maybe "no matches found" is from your shell, it's trying to expand that url into matching a local file using wildcards or something like that. try putting quotes around the full url.

That was the issue. thanks @ploxiln

I used PARAMIKO_REPLACE=1 pip install "https://github.com/ploxiln/paramiko-ng/archive/2.8.10.tar.gz#egg=paramiko"

This might be useful to others, can this be included in the instructions for paramiko-ng?

yup, I'll be updating the README soon, and the docs website after the next release, thanks!