簡體   English   中英

在python3.7虛擬環境中安裝pysftp時出錯

[英]Error while installing pysftp in a python3.7 virtual environment

這個錯誤是什么意思? 我已經用這個命令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

我在網上發現了幾個相關問題,其中一些表明我的系統(Ubuntu 18.04)中沒有 openssl 並嘗試此命令sudo apt-get install build-essential libssl-dev libffi-dev python3-dev ,但錯誤每次我建立一個新的虛擬環境時都會繼續。

問候

這個錯誤是什么意思?

無法從您的虛擬環境訪問wheel包。

嘗試在虛擬環境中安裝這個包:

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

之后pip3 install pysftp應該按預期工作。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM