简体   繁体   English

在python3.7虚拟环境中安装pysftp时出错

[英]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?我已经用这个命令python3.7 -m venv venv创建了一个 python 虚拟,然后继续安装pip3 install pysftp ,它最后说这个包已经成功安装并且工作正常但是那个错误不可能是正常的事情,对吧?

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.我在网上发现了几个相关问题,其中一些表明我的系统(Ubuntu 18.04)中没有 openssl 并尝试此命令sudo apt-get install build-essential libssl-dev libffi-dev python3-dev ,但错误每次我建立一个新的虚拟环境时都会继续。

Regards问候

What is the meaning of this error?这个错误是什么意思?

The wheel package is not reachable from your virtual environment.无法从您的虚拟环境访问wheel包。

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.之后pip3 install pysftp应该按预期工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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