AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / computer / 问题

问题[python3](computer)

Martin Hope
zaheerk
Asked: 2023-08-08 15:59:34 +0800 CST

运行 python3-fail2ban 时出错,并显示“必须为 '#' 格式定义 PY_SSIZE_T_CLEAN 宏”

  • 5

我正在尝试运行 yocto 构建的 python3-fail2ban 组件,但遇到与PY_SSIZE_T_CLEAN 宏相关的错误。错误消息是PY_SSIZE_T_CLEAN macro must be defined for '#' formats。

我研究了这个问题,发现在 Python 3.10 C-API 文档https://docs.python.org/3.10/c-api/arg.html#arg-parsing中,提到了,

for all # variants of formats (like s#, y#, etc.), the PY_SSIZE_T_CLEAN macro must be defined before including Python.h. Additionally, it's stated that in Python 3.9 and older, the type of the length argument is Py_ssize_t if the PY_SSIZE_T_CLEAN macro is defined, or int otherwise.
  • 我尝试通过在包含 Python.h 之前定义 PY_SSIZE_T_CLEAN 宏来解决此问题。但问题并没有解决,补丁片段在这里,

    +#ifndef PY_SSIZE_T_CLEAN
    +#define PY_SSIZE_T_CLEAN 1
    +#endif
    #include "Python.h"

  • 也包含CFLAGS += "PY_SSIZE_T_CLEAN "在 python3-fail2ban 组件中。不影响观察

  • 后来尝试CFLAGS += "PY_SSIZE_T_CLEAN "直接添加python3组件,但是它在yocto python3中产生了很多构建问题,似乎不推荐

我将 Yocto 与特定版本的python3-fail2ban (0.11.2)和python3(10.12)一起使用,并且我已经验证在包含 Python.h 之前定义了必要的 PY_SSIZE_T_CLEAN 宏。

尽管如此,错误仍然存​​在。有没有人在运行 python3-fail2ban 时遇到类似的问题?是否需要执行任何其他步骤或配置才能正确包含 PY_SSIZE_T_CLEAN 宏?我很感激任何解决此问题的见解或建议。

提前致谢!

python3
  • 1 个回答
  • 33 Views
Martin Hope
bckelley
Asked: 2020-04-17 11:33:51 +0800 CST

未解决的导入“chromedriver_install”Python(未解决的导入)

  • 5
py -m pip install chromedriver_install
Requirement already satisfied: chromedriver_install in c:\users\bckelley\appdata\local\programs\python\python38-32\lib\site-packages (1.0.3)

有谁知道如何解决这个问题?

python3 import
  • 1 个回答
  • 195 Views
Martin Hope
user1161901
Asked: 2020-04-12 05:45:44 +0800 CST

使用 .sh 文件设置 python shell 版本

  • 5

我正在执行我的./shell.sh其中包含

eval "$(pyenv init -)"
pyenv shell 3.8.2

但什么也没有发生。如果我在 bash 中手动运行此代码,它可以正常工作,并且 shell 版本的 python2.7.10会从3.8.2.

我在正确的目录中,我给了.sh文件执行权限。

bash python3
  • 1 个回答
  • 222 Views
Martin Hope
Habtamu Wubie
Asked: 2020-03-01 05:23:54 +0800 CST

在 Windows 10 上从 python 调用 MSYS2 终端命令

  • 5

cmd可以使用以下脚本从 python调用命令

import os
os.system('cmd /k "Your Command Prompt Command"')

是否有类似的方法可以在 Windows 10 上从 python 调用 MSYS2 终端命令?

windows-10 python3
  • 1 个回答
  • 664 Views
Martin Hope
yabberth
Asked: 2020-02-07 01:47:51 +0800 CST

如何通过 pip3 离线安装所有依赖项的 python 包?

  • 8

首先,我设法在无法访问 Internet 的服务器上安装 Ansible。但我想知道我的方法是否正确。

起初我通过pip3.

pip3 download ansible -d .

这导致下载了以下文件:

ansible-2.9.4.tar.gz                          
cryptography-2.8-cp34-abi3-manylinux1_x86_64.whl  
MarkupSafe-1.1.1-cp36-cp36m-manylinux1_x86_64.whl  
PyYAML-5.3.tar.gz
cffi-1.13.2-cp36-cp36m-manylinux1_x86_64.whl  
Jinja2-2.11.1-py2.py3-none-any.whl                
pycparser-2.19.tar.gz                              
six-1.14.0-py2.py3-none-any.whl

现在我已经在我的远程计算机上提供了这些文件,我尝试使用

pip3 install ansible-2.9.4.tar.gz

安装ansible。

这导致了以下错误:

Processing ./ansible-2.9.4.tar.gz
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 
'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 
0x7f00726f9ef0>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/jinja2/

所以我尝试手动安装 Jinja2:

pip3 install jinja2-2.11.1-py2.py3-none-any.whl

但这也不起作用:

WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection
 broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 
0x7fd303a23940>: Failed to establish a new connection: [Errno -2] Name or service not known',)': 
/simple/markupsafe/

安装 Markupsafe 后,也可以安装 Jinja2。最后pip3 install ansible-2.9.4.tar.gz我成功安装了ansible。

现在我的问题是。有没有办法告诉pip使用下载的文件来安装依赖项,或者是否有更简单的方法来安装特定的 python 包及其所有依赖项脱机?

感谢您的帮助和最诚挚的问候。亚伯斯

python3 installation
  • 2 个回答
  • 32288 Views
Martin Hope
Arko
Asked: 2019-11-13 03:52:00 +0800 CST

为什么键盘快捷键 Ctrl-Alt-N 在 Visual Studio Code 中停止工作?

  • 10

所以,我最近在 Windows 10 上安装了 Visual Studio Code(1.40.0)。一切正常,因为我正在研究如何运行 Python Code,我安装了 Python 扩展、pylint、Auto PEP-8 formatter、code-runner扩展,我能够使用键盘快捷键 Ctrl-Alt-N 很好地运行代码。然后我还尝试查看是否可以使用 MSVC 编译器来运行 C 代码,这对 VSCode 并不满意,但是突然之间,运行代码的键盘快捷键停止工作。

现在,如果我按下 Ctrl-Alt-N,它在编辑器窗口中给出的只是这个符号“ṇ”。

我已经尝试重新安装 VSCode,删除基本配置文件(.json),重新安装 python 扩展,但问题仍然存在。我正在考虑的另一件事是我从 VS 终端更新了 pip,但我不确定是否在那个时候快捷方式停止工作。我可以使用运行代码图标或从命令栏正常运行代码,但不能使用快捷方式执行相同的操作。任何人都可以帮忙吗?

更新:我什至尝试重新配置键盘快捷键,但它不会从用户那里获取 Ctrl-Alt-N,它默认为“n”。

visual-studio-code python3
  • 5 个回答
  • 15072 Views
Martin Hope
Daniel C
Asked: 2019-07-08 21:03:21 +0800 CST

全新 Jupyter 安装在笔记本启动时失败 - “ImportError:无法从‘prompt_toolkit.shortcuts’导入名称‘create_prompt_application’

  • 5

我刚刚在 Ubuntu 18.04 上安装了 Jupiter (v 4.4.0)。Python 版本是 3.7。当我尝试运行任何代码时,都会收到相同的错误消息。我的内核输出看起来像这样。

I 01:09:32.973 NotebookApp] KernelRestarter: restarting kernel (4/5), new random ports
Traceback (most recent call last):
  File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/daniel/.local/lib/python3.7/site-packages/ipykernel_launcher.py", line 15, in <module>
    from ipykernel import kernelapp as app
  File "/home/daniel/.local/lib/python3.7/site-packages/ipykernel/__init__.py", line 2, in <module>
    from .connect import *
  File "/home/daniel/.local/lib/python3.7/site-packages/ipykernel/connect.py", line 13, in <module>
    from IPython.core.profiledir import ProfileDir
  File "/usr/lib/python3/dist-packages/IPython/__init__.py", line 49, in <module>
    from .terminal.embed import embed
  File "/usr/lib/python3/dist-packages/IPython/terminal/embed.py", line 18, in <module>
    from IPython.terminal.interactiveshell import TerminalInteractiveShell
  File "/usr/lib/python3/dist-packages/IPython/terminal/interactiveshell.py", line 20, in <module>
    from prompt_toolkit.shortcuts import create_prompt_application, create_eventloop, create_prompt_layout, create_output
ImportError: cannot import name 'create_prompt_application' from 'prompt_toolkit.shortcuts' (/home/daniel/.local/lib/python3.7/site-packages/prompt_toolkit/shortcuts/__init__.py)

我尝试将 prompt-toolkit 的版本降级到 2.0.1,因为最新版本的 prompt-toolkit 似乎与 IPython 不兼容。降级到 1.0.4 也无济于事。

python python3
  • 1 个回答
  • 2709 Views
Martin Hope
Codesiddhar
Asked: 2019-06-12 19:16:33 +0800 CST

从哪里获得 win64 的 PAM 授权 DLL

  • 3

我的 python 包(Python-pam 包)需要 PAM auth lib DLL。

    libpam=CDLL(find_library("pam"))
libc=CDLL(find_library("c"))

从哪里获得这些dll。

windows-7 python3
  • 1 个回答
  • 127 Views
Martin Hope
samhar
Asked: 2019-05-08 00:51:35 +0800 CST

qtpy.PythonQtError: 找不到 Qt 绑定

  • 12

我的机器上运行着 anaconda。几天前,我不得不更新一些库,因为它们已经过时了。更新后,由于以下错误,我无法再启动 anaconda-navigator 或 spyder:

(base) C:\>qtpy.PythonQtError: No Qt bindings could be found

我试过以下方法:

*卸载/重新安装整个包*以下命令:

conda update conda
conda update --all
conda install pyqt5
pip install pyqt5

*重置间谍设置

安装的包和网址:

(base) C:\>SPYDER
Traceback (most recent call last):
  File "C:\ProgramData\Anaconda3\lib\site-packages\qtpy\__init__.py", line 202, in <module>
    from PySide import __version__ as PYSIDE_VERSION  # analysis:ignore
ModuleNotFoundError: No module named 'PySide'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\ProgramData\Anaconda3\Scripts\spyder-script.py", line 10, in <module>
    sys.exit(main())
  File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\app\start.py", line 186, in main
    from spyder.app import mainwindow
  File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\app\mainwindow.py", line 48, in <module>
    requirements.check_qt()
  File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\requirements.py", line 41, in check_qt
    import qtpy
  File "C:\ProgramData\Anaconda3\lib\site-packages\qtpy\__init__.py", line 208, in <module>
    raise PythonQtError('No Qt bindings could be found')
qtpy.PythonQtError: No Qt bindings could be found

(base) C:\>conda list --show-channel-urls
# packages in environment at C:\ProgramData\Anaconda3:
#
# Name                    Version                   Build  Channel
_ipyw_jlab_nb_ext_conf    0.1.0                    py37_0    defaults
alabaster                 0.7.12                     py_0    conda-forge
anaconda                  custom                   py37_0    defaults
anaconda-client           1.7.2                      py_0    conda-forge
anaconda-navigator        1.9.7                    py37_0    defaults
anaconda-project          0.8.2                      py_1    conda-forge
asn1crypto                0.24.0                py37_1003    conda-forge
astroid                   2.2.5                    py37_0    conda-forge
astropy                   3.1.2            py37hfa6e2cd_0    conda-forge
atomicwrites              1.3.0                      py_0    conda-forge
attrs                     19.1.0                     py_0    conda-forge
babel                     2.6.0                      py_1    conda-forge
backcall                  0.1.0                      py_0    conda-forge
backports                 1.0                        py_2    conda-forge
backports.os              0.1.1                 py37_1000    conda-forge
backports.shutil_get_terminal_size 1.0.0                      py_3    conda-forge
beautifulsoup4            4.7.1                 py37_1001    conda-forge
bitarray                  0.9.2            py37hfa6e2cd_0    conda-forge
bkcharts                  0.2                      py37_0    defaults
blas                      1.0                         mkl    conda-forge
bleach                    3.1.0                      py_0    conda-forge
blinker                   1.4                        py_1    conda-forge
blosc                     1.16.3               h6538335_0    conda-forge
bokeh                     1.1.0                    py37_0    conda-forge
boto                      2.49.0                     py_0    conda-forge
boto3                     1.9.143                    py_0    conda-forge
botocore                  1.12.143                   py_1    conda-forge
bottleneck                1.2.1           py37h452e1ab_1001    conda-forge
bz2file                   0.98                       py_0    conda-forge
bzip2                     1.0.6             hfa6e2cd_1002    conda-forge
ca-certificates           2019.3.9             hecc5488_0    conda-forge
certifi                   2019.3.9                 py37_0    conda-forge
cffi                      1.12.3           py37hb32ad35_0    conda-forge
chardet                   3.0.4                 py37_1003    conda-forge
click                     7.0                        py_0    conda-forge
cloudpickle               0.8.1                      py_0    conda-forge
clyent                    1.2.2                      py_1    conda-forge
colorama                  0.4.1                      py_0    conda-forge
comtypes                  1.1.7                 py37_1000    conda-forge
conda                     4.6.14                   py37_0    conda-forge
conda-build               3.17.8                   py37_1    conda-forge
conda-env                 2.6.0                         1    conda-forge
conda-verify              3.1.1                 py37_1000    conda-forge
console_shortcut          0.1.1                         3    defaults
contextlib2               0.5.5                      py_2    conda-forge
cryptography              2.6.1            py37hb32ad35_0    conda-forge
curl                      7.64.1               h4496350_0    conda-forge
cycler                    0.10.0                     py_1    conda-forge
cython                    0.29.7           py37h6538335_0    conda-forge
cytoolz                   0.9.0.1         py37hfa6e2cd_1001    conda-forge
dask                      1.2.0                      py_0    conda-forge
dask-core                 1.2.0                      py_0    conda-forge
decorator                 4.4.0                      py_0    conda-forge
defusedxml                0.5.0                      py_1    conda-forge
distributed               1.27.1                   py37_0    conda-forge
docutils                  0.14                  py37_1001    conda-forge
entrypoints               0.3                   py37_1000    conda-forge
et_xmlfile                1.0.1                 py37_1000    conda-forge
fastcache                 1.1.0            py37hfa6e2cd_0    conda-forge
filelock                  3.0.10                     py_0    conda-forge
flask                     1.0.2                      py_2    conda-forge
freetype                  2.10.0               h5db478b_0    conda-forge
future                    0.17.1                py37_1000    conda-forge
gensim                    3.7.1            py37h6538335_1    conda-forge
get_terminal_size         1.0.0                h38e98db_0    defaults
gevent                    1.4.0            py37hfa6e2cd_0    conda-forge
glob2                     0.6                        py_0    conda-forge
greenlet                  0.4.15           py37hfa6e2cd_0    conda-forge
h5py                      2.9.0           nompi_py37h3cb27cb_1102    conda-forge
hdf5                      1.10.4          nompi_hcc15c50_1106    conda-forge
heapdict                  1.0.0                 py37_1000    conda-forge
html5lib                  1.0.1                      py_0    conda-forge
icc_rt                    2019.0.0             h0cc432a_1    defaults
icu                       58.1                     vc14_0    conda-forge
idna                      2.8                   py37_1000    conda-forge
imageio                   2.5.0                    py37_0    conda-forge
imagesize                 1.1.0                      py_0    conda-forge
importlib_metadata        0.9                      py37_0    conda-forge
intel-openmp              2019.3                      203    defaults
ipykernel                 5.1.0           py37h39e3cac_1002    conda-forge
ipython                   7.5.0            py37h39e3cac_0    conda-forge
ipython_genutils          0.2.0                      py_1    conda-forge
ipywidgets                7.4.2                      py_0    conda-forge
isort                     4.3.18                   py37_0    conda-forge
itsdangerous              1.1.0                      py_0    conda-forge
jdcal                     1.4.1                      py_0    conda-forge
jedi                      0.13.3                   py37_0    conda-forge
jinja2                    2.10.1                     py_0    conda-forge
jmespath                  0.9.4                      py_0    conda-forge
jpeg                      9c                hfa6e2cd_1001    conda-forge
jsonschema                3.0.1                    py37_0    conda-forge
jupyter                   1.0.0                      py_2    conda-forge
jupyter_client            5.2.4                      py_3    conda-forge
jupyter_console           6.0.0                      py_0    conda-forge
jupyter_core              4.4.0                      py_0    conda-forge
jupyterlab                0.35.6                   py37_0    conda-forge
jupyterlab_server         0.2.0                      py_0    conda-forge
keyring                   19.0.1                   py37_0    conda-forge
kiwisolver                1.1.0            py37he980bc4_0    conda-forge
krb5                      1.16.3            hdd46e55_1001    conda-forge
lazy-object-proxy         1.3.1           py37hfa6e2cd_1000    conda-forge
libarchive                3.3.3             h0005e80_1004    conda-forge
libblas                   3.8.0                     8_mkl    conda-forge
libcblas                  3.8.0                     8_mkl    conda-forge
libcurl                   7.64.1               h4496350_0    conda-forge
libiconv                  1.15              hfa6e2cd_1005    conda-forge
liblief                   0.9.0                ha925a31_2    defaults
libpng                    1.6.37               h7602738_0    conda-forge
libsodium                 1.0.16            h2fa13f4_1001    conda-forge
libssh2                   1.8.2                h642c060_2    conda-forge
libtiff                   4.0.10            h016b793_1002    conda-forge
libxml2                   2.9.9                h9ce36c8_0    conda-forge
libxslt                   1.1.32            heafd4d3_1002    conda-forge
llvmlite                  0.28.0                   py37_0    conda-forge
locket                    0.2.0                      py_2    conda-forge
lxml                      4.3.3            py37heafd4d3_0    conda-forge
lz4-c                     1.8.3             he025d50_1001    conda-forge
lzo                       2.10              hfa6e2cd_1000    conda-forge
m2w64-gcc-libgfortran     5.3.0                         6    defaults
m2w64-gcc-libs            5.3.0                         7    defaults
m2w64-gcc-libs-core       5.3.0                         7    defaults
m2w64-gmp                 6.1.0                         2    defaults
m2w64-libwinpthread-git   5.0.0.4634.697f757               2    defaults
markupsafe                1.1.1            py37hfa6e2cd_0    conda-forge
matplotlib                3.0.3                    py37_1    conda-forge
matplotlib-base           3.0.3            py37h3e3dc42_1    conda-forge
mccabe                    0.6.1                      py_1    conda-forge
menuinst                  1.4.16                   py37_0    conda-forge
mistune                   0.8.4           py37hfa6e2cd_1000    conda-forge
mkl                       2019.3                      203    defaults
mkl-service               2.0.1            py37hfa6e2cd_0    conda-forge
mkl_fft                   1.0.12           py37hfa6e2cd_1    conda-forge
mkl_random                1.0.4            py37h830ac7b_0    conda-forge
mock                      3.0.4                    py37_0    conda-forge
more-itertools            4.3.0                 py37_1000    conda-forge
mpmath                    1.1.0                      py_0    conda-forge
msgpack-python            0.6.1            py37he980bc4_0    conda-forge
msys2-conda-epoch         20160418                      1    defaults
multipledispatch          0.6.0                      py_0    conda-forge
navigator-updater         0.2.1                    py37_0    defaults
nbconvert                 5.5.0                      py_0    conda-forge
nbformat                  4.4.0                      py_1    conda-forge
networkx                  2.3                        py_0    conda-forge
nltk                      3.2.5                      py_0    conda-forge
nose                      1.3.7                 py37_1002    conda-forge
notebook                  5.7.8                    py37_0    conda-forge
numba                     0.43.1           py37hf9181ef_0    defaults
numexpr                   2.6.9           py37h6538335_1000    conda-forge
numpy                     1.16.3           py37h19fb1c0_0    defaults
numpy-base                1.16.3           py37hc3f5095_0    defaults
numpydoc                  0.9.1                      py_0    conda-forge
oauthlib                  3.0.1                      py_0    conda-forge
olefile                   0.46                       py_0    conda-forge
openpyxl                  2.6.1                      py_0    conda-forge
openssl                   1.1.1b               hfa6e2cd_2    conda-forge
packaging                 19.0                       py_0    conda-forge
pandas                    0.24.2           py37h6538335_0    conda-forge
pandoc                    2.7.2                         0    conda-forge
pandocfilters             1.4.2                      py_1    conda-forge
parso                     0.4.0                      py_0    conda-forge
partd                     0.3.9                      py_0    conda-forge
path.py                   12.0.1                     py_0    conda-forge
pathlib2                  2.3.3                 py37_1000    conda-forge
patsy                     0.5.1                      py_0    conda-forge
pep8                      1.7.1                      py_0    conda-forge
pickleshare               0.7.5                 py37_1000    conda-forge
pillow                    6.0.0            py37h9a613e6_0    conda-forge
pip                       19.1.1                   py37_0    conda-forge
pkginfo                   1.5.0.1                    py_0    conda-forge
pluggy                    0.9.0                      py_0    conda-forge
ply                       3.11                       py_1    conda-forge
powershell_shortcut       0.0.1                         2    defaults
prometheus_client         0.6.0                      py_0    conda-forge
prompt_toolkit            2.0.9                      py_0    conda-forge
psutil                    5.6.2            py37hfa6e2cd_0    conda-forge
py                        1.8.0                      py_0    conda-forge
py-lief                   0.9.0            py37ha925a31_2    defaults
pycodestyle               2.5.0                      py_0    conda-forge
pycosat                   0.6.3           py37hfa6e2cd_1001    conda-forge
pycparser                 2.19                     py37_1    conda-forge
pycrypto                  2.6.1           py37hfa6e2cd_1002    conda-forge
pycurl                    7.43.0.2         py37h636d3bd_0    conda-forge
pyflakes                  2.1.1                      py_0    conda-forge
pygments                  2.3.1                      py_0    conda-forge
pyjwt                     1.7.1                      py_0    conda-forge
pylint                    2.3.1                    py37_0    conda-forge
pyodbc                    4.0.26           py37h6538335_0    conda-forge
pyopenssl                 19.0.0                   py37_0    conda-forge
pyparsing                 2.4.0                      py_0    conda-forge
pyqt                      5.9.2            py37h6538335_2    defaults
pyreadline                2.1                   py37_1000    conda-forge
pyrsistent                0.15.1           py37hfa6e2cd_0    conda-forge
pysocks                   1.6.8                 py37_1002    conda-forge
pytables                  3.5.1            py37hb9ab341_1    conda-forge
pytest                    4.4.1                    py37_0    conda-forge
pytest-arraydiff          0.3                        py_0    conda-forge
pytest-astropy            0.5.0                      py_0    conda-forge
pytest-doctestplus        0.3.0                      py_0    conda-forge
pytest-openfiles          0.3.1                      py_0    conda-forge
pytest-remotedata         0.3.1                      py_0    conda-forge
python                    3.7.3                hb12ca83_0    conda-forge
python-crfsuite           0.9.6           py37he980bc4_1000    conda-forge
python-dateutil           2.8.0                      py_0    conda-forge
python-libarchive-c       2.8                   py37_1004    conda-forge
pytz                      2019.1                     py_0    conda-forge
pywavelets                1.0.3            py37h452e1ab_1    conda-forge
pywin32                   224             py37hfa6e2cd_1000    conda-forge
pywin32-ctypes            0.2.0                 py37_1000    conda-forge
pywinpty                  0.5.5                 py37_1000    conda-forge
pyyaml                    5.1              py37hfa6e2cd_0    conda-forge
pyzmq                     18.0.1           py37he7828b0_1    conda-forge
qt                        5.9.7                hc6833c9_1    conda-forge
qtawesome                 0.5.7              pyh8a2030e_0    conda-forge
qtconsole                 4.4.3                      py_0    conda-forge
qtpy                      1.7.1              pyhde82777_0    conda-forge
requests                  2.21.0                py37_1000    conda-forge
requests-oauthlib         1.2.0                      py_0    conda-forge
rope                      0.14.0                     py_0    conda-forge
ruamel_yaml               0.15.71         py37hfa6e2cd_1000    conda-forge
s3transfer                0.2.0                    py37_0    conda-forge
scikit-image              0.15.0           py37h6538335_0    conda-forge
scikit-learn              0.20.3           py37h3d241f0_1    conda-forge
scipy                     1.2.1            py37h29ff71c_0    defaults
seaborn                   0.9.0                      py_1    conda-forge
send2trash                1.5.0                      py_0    conda-forge
setuptools                41.0.1                   py37_0    conda-forge
simplegeneric             0.8.1                      py_1    conda-forge
singledispatch            3.4.0.3               py37_1000    conda-forge
sip                       4.19.8          py37h6538335_1000    conda-forge
six                       1.12.0                py37_1000    conda-forge
smart_open                1.8.3                      py_0    conda-forge
snappy                    1.1.7             h6538335_1002    conda-forge
snowballstemmer           1.2.1                      py_1    conda-forge
sortedcollections         1.1.2                      py_0    conda-forge
sortedcontainers          2.1.0                      py_0    conda-forge
soupsieve                 1.9.1                    py37_0    conda-forge
sphinx                    2.0.1                      py_0    conda-forge
sphinxcontrib             1.0                      py37_1    defaults
sphinxcontrib-applehelp   1.0.1                      py_0    conda-forge
sphinxcontrib-devhelp     1.0.1                      py_0    conda-forge
sphinxcontrib-htmlhelp    1.0.2                      py_0    conda-forge
sphinxcontrib-jsmath      1.0.1                      py_0    conda-forge
sphinxcontrib-qthelp      1.0.2                      py_0    conda-forge
sphinxcontrib-serializinghtml 1.1.1                      py_0    conda-forge
sphinxcontrib-websupport  1.1.0                      py_1    conda-forge
spyder                    3.3.4                    py37_0    defaults
spyder-kernels            0.4.4                    py37_0    conda-forge
sqlalchemy                1.3.3            py37hfa6e2cd_0    conda-forge
sqlite                    3.26.0            hfa6e2cd_1001    conda-forge
statsmodels               0.9.0           py37hfa6e2cd_1000    conda-forge
sympy                     1.4                      py37_0    conda-forge
tblib                     1.3.2                      py_1    conda-forge
terminado                 0.8.2                    py37_0    conda-forge
testpath                  0.4.2                   py_1001    conda-forge
tk                        8.6.9             hfa6e2cd_1001    conda-forge
toolz                     0.9.0                      py_1    conda-forge
tornado                   6.0.2            py37hfa6e2cd_0    conda-forge
tqdm                      4.31.1                     py_0    conda-forge
traitlets                 4.3.2                 py37_1000    conda-forge
twython                   3.7.0                      py_0    conda-forge
unicodecsv                0.14.1                     py_1    conda-forge
urllib3                   1.24.2                   py37_0    conda-forge
vc                        14.1                 h0510ff6_4    defaults
vs2015_runtime            14.15.26706          h3a45250_4    defaults
wcwidth                   0.1.7                      py_1    conda-forge
webencodings              0.5.1                      py_1    conda-forge
werkzeug                  0.15.2                     py_0    conda-forge
wheel                     0.33.1                   py37_0    conda-forge
widgetsnbextension        3.4.2                 py37_1000    conda-forge
win_inet_pton             1.1.0                    py37_0    conda-forge
win_unicode_console       0.5                   py37_1000    conda-forge
wincertstore              0.2                   py37_1002    conda-forge
winpty                    0.4.3                         4    conda-forge
wrapt                     1.11.1           py37hfa6e2cd_0    conda-forge
xlrd                      1.2.0                      py_0    conda-forge
xlsxwriter                1.1.8                      py_0    conda-forge
xlwings                   0.15.8                   py37_0    conda-forge
xlwt                      1.3.0                      py_1    conda-forge
xz                        5.2.4             h2fa13f4_1001    conda-forge
yaml                      0.1.7             hfa6e2cd_1001    conda-forge
zeromq                    4.3.1             he025d50_1000    conda-forge
zict                      0.1.4                      py_0    conda-forge
zipp                      0.4.0                      py_0    conda-forge
zlib                      1.2.11            h2fa13f4_1004    conda-forge
zstd                      1.3.3                    vc14_1    conda-forge

(base) C:\>
(base) C:\>CONDA INSTALL pyqt5

有谁知道可能有帮助的想法吗?提前致谢!!

windows-10 python3
  • 3 个回答
  • 21470 Views
Martin Hope
tuexss
Asked: 2019-05-07 08:05:34 +0800 CST

如果应用程序是通过 Windows PowerShell 中的 Python 脚本启动的,则拖放操作不起作用

  • 6

我有一个在 Windows 上下载并启动的 QT 应用程序。如果我从 Windows 资源管理器手动启动它,我可以使用拖放来加载文件。如果我通过 python 脚本从 windows powershell 启动完全相同的应用程序,调用它subprocess.run(path_to_app_executable),拖放不起作用。

是因为使用了子流程吗?在 mac 上,我使用subprocess.run()命令open,拖放工作正常。

powershell python3
  • 1 个回答
  • 151 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何减少“vmmem”进程的消耗?

    • 11 个回答
  • Marko Smith

    从 Microsoft Stream 下载视频

    • 4 个回答
  • Marko Smith

    Google Chrome DevTools 无法解析 SourceMap:chrome-extension

    • 6 个回答
  • Marko Smith

    Windows 照片查看器因为内存不足而无法运行?

    • 5 个回答
  • Marko Smith

    支持结束后如何激活 WindowsXP?

    • 6 个回答
  • Marko Smith

    远程桌面间歇性冻结

    • 7 个回答
  • Marko Smith

    子网掩码 /32 是什么意思?

    • 6 个回答
  • Marko Smith

    鼠标指针在 Windows 中按下的箭头键上移动?

    • 1 个回答
  • Marko Smith

    VirtualBox 无法以 VERR_NEM_VM_CREATE_FAILED 启动

    • 8 个回答
  • Marko Smith

    应用程序不会出现在 MacBook 的摄像头和麦克风隐私设置中

    • 5 个回答
  • Martin Hope
    Vickel Firefox 不再允许粘贴到 WhatsApp 网页中? 2023-08-18 05:04:35 +0800 CST
  • Martin Hope
    Saaru Lindestøkke 为什么使用 Python 的 tar 库时 tar.xz 文件比 macOS tar 小 15 倍? 2021-03-14 09:37:48 +0800 CST
  • Martin Hope
    CiaranWelsh 如何减少“vmmem”进程的消耗? 2020-06-10 02:06:58 +0800 CST
  • Martin Hope
    Jim Windows 10 搜索未加载,显示空白窗口 2020-02-06 03:28:26 +0800 CST
  • Martin Hope
    andre_ss6 远程桌面间歇性冻结 2019-09-11 12:56:40 +0800 CST
  • Martin Hope
    Riley Carney 为什么在 URL 后面加一个点会删除登录信息? 2019-08-06 10:59:24 +0800 CST
  • Martin Hope
    zdimension 鼠标指针在 Windows 中按下的箭头键上移动? 2019-08-04 06:39:57 +0800 CST
  • Martin Hope
    jonsca 我所有的 Firefox 附加组件突然被禁用了,我该如何重新启用它们? 2019-05-04 17:58:52 +0800 CST
  • Martin Hope
    MCK 是否可以使用文本创建二维码? 2019-04-02 06:32:14 +0800 CST
  • Martin Hope
    SoniEx2 更改 git init 默认分支名称 2019-04-01 06:16:56 +0800 CST

热门标签

windows-10 linux windows microsoft-excel networking ubuntu worksheet-function bash command-line hard-drive

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve