我不确定如何最好地解决或查询此问题。我有一个简单的程序,它使用了fs.sshfs
依赖于的paramiko
模块cryptogaphy.utils
。来自我virtualenv
的 withpython
版本3.5.2
。
(venv) $ cat tump.py
from fs.sshfs import SSHFS
remote = SSHFS('rushmore')
print(*remote.listdir('.'), sep='\n')
我的环境安装了以下模块。
(venv) $ pip freeze
appdirs==1.4.3
asn1crypto==0.24.0
bcrypt==3.1.4
cffi==1.11.5
cryptography==2.2.2
fs==2.0.21
fs.sshfs==0.8.0
idna==2.6
paramiko==2.4.1
pkg-resources==0.0.0
pyasn1==0.4.2
pycparser==2.18
PyNaCl==1.2.1
pytz==2018.4
six==1.11.0
typing==3.6.4
当我直接在文件上调用 python 时,我收到了一个AttributeError
反对getargspec
.
(venv) $ python tump.py
Traceback (most recent call last):
File "tump.py", line 1, in <module>
from fs.sshfs import SSHFS
File "/mnt/max/home/robinsph/git/HCPVaTT/venv/lib/python3.5/site-packages/fs/sshfs/__init__.py", line 7, in <module>
from .sshfs import SSHFS
File "/mnt/max/home/robinsph/git/HCPVaTT/venv/lib/python3.5/site-packages/fs/sshfs/sshfs.py", line 13, in <module>
import paramiko
File "/mnt/max/home/robinsph/git/HCPVaTT/venv/lib/python3.5/site-packages/paramiko/__init__.py", line 22, in <module>
from paramiko.transport import SecurityOptions, Transport
File "/mnt/max/home/robinsph/git/HCPVaTT/venv/lib/python3.5/site-packages/paramiko/transport.py", line 34, in <module>
from cryptography.hazmat.primitives.ciphers import algorithms, Cipher, modes
File "/mnt/max/home/robinsph/git/HCPVaTT/venv/lib/python3.5/site-packages/cryptography/hazmat/primitives/ciphers/__init__.py", line 7, in <module>
from cryptography.hazmat.primitives.ciphers.base import (
File "/mnt/max/home/robinsph/git/HCPVaTT/venv/lib/python3.5/site-packages/cryptography/hazmat/primitives/ciphers/base.py", line 11, in <module>
from cryptography import utils
File "/mnt/max/home/robinsph/git/HCPVaTT/venv/lib/python3.5/site-packages/cryptography/utils.py", line 85, in <module>
signature = inspect.getargspec
AttributeError: module 'inspect' has no attribute 'getargspec'
当我使用重定向到文件描述符调用时,
(venv) $ python <(cat tump.py)
lib32
boot
var
app
bin
lost+found
usr
snap
vmlinuz
initrd.img
root
srv
proc
home
lib
lib64
sys
initrd.img.old
mnt
tmp
media
libx32
run
opt
.bash_history
sbin
vmlinuz.old
dev
etc
任何人都可以重现这个吗?我想我正在失去理智。