简体   繁体   中英

Error while installing pysftp in a python3.7 virtual environment

What is the meaning of this error? I have created a python virtual with this command python3.7 -m venv venv , then proceed to install pip3 install pysftp , it says at the end that the package was successfully installed and it works fine but that error can not be normal thing, right?

Building wheels for collected packages: pysftp
  Running setup.py bdist_wheel for pysftp ... error
  Complete output from command /home/blablabla/venv/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-bb4oq77e/pysftp/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-nh2kp2o5 --python-tag cp37:
  usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: -c --help [cmd1 cmd2 ...]
     or: -c --help-commands
     or: -c cmd --help

  error: invalid command 'bdist_wheel'

  ----------------------------------------
  Failed building wheel for pysftp
  Running setup.py clean for pysftp
Failed to build pysftp
Installing collected packages: pysftp
  Running setup.py install for pysftp ... done
Successfully installed pysftp-0.2.9

I found several related problems in the web, some of them suggests that I do not have openssl in my system (Ubuntu 18.04) and try this command sudo apt-get install build-essential libssl-dev libffi-dev python3-dev , but error continues everytime I build up a new virtual environment.

Regards

What is the meaning of this error?

The wheel package is not reachable from your virtual environment.

Try to install this package inside the virtual environment:

python3.7 -m venv venv
source venv/bin/activate
pip3 install wheel

After that pip3 install pysftp should work as expected.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM