I need to use sftp services through python on my virtual machine.
To note that I am unable to do commands like
pip install packagename
I have limitations on the controlled VM. So I have to download packages and point to local disk locations (pip install C:/Folder/packacgename.whl
) to install them so please give me suggestions keeping this in mind.
Trying to install
pip install C:\Windows\pysftp-0.2.9.tar.gz
I needed bycrypt. And trying to install that it said No matching distribution found for setuptools>=40.8.0
I downloaded setuptools and did
pip install C:\Windows\setuptools-59.2.0.tar.gz
I get message
Missing build time requirements in pyproject.toml for file:///C:/Windows/setuptools-59.2.0.tar.gz: 'setuptools' and 'wheel'.
This version of pip does not implement PEP 517 so it cannot build a wheel without 'setuptools' and 'wheel'.
Installing build dependencies ... error
Complete output from command z:\scripts\python.exe -m pip install --ignore-installed --no-user --prefix C:\Users\AppData\Local\Temp\pip-build-env-jmi2p:
ERROR: You must give at least one requirement to install (see "pip help install")
I tried doing
C:\scripts\python.exe -m pip install --upgrade pip
This failed with message pip already up to date
I checked pip version
pip --version
pip 10.0.1 from z:\lib\site-packages\pip (python 3.7)
Manually trying to upgrade pip with tar file I get message setup tools need upgrade
pip install --upgrade C:\Windows\pip-21.3.1.tar.gz
I used --no-binary :all: , this didn’t work.
I have downloaded Microsoft 2015 build tools and installed them as advised by some forum. It didn’t work. I don't really know how to fix this issue. Trying to download PEP517 tar file and installing that does not work as it wants pip to be upgraded. It's like I am going in circles.
You can also use paramiko package for connecting your sftp via Python. You just have to do
pip install paramiko
Hopefully it works for you.