问题标签 [pyperclip]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
3 回答
17914 浏览

python - 无法导入 Pyperclip

我在 IDLE 中导入 Pyperclip 时遇到问题。
我正在运行 Windows 7(64 位)。
我在:C:\Python\Python35 上安装了 Python 3.5.2。
我打开命令提示符并在将目录更改为 C:\Python\Python35\Scripts 后键入 pip install pyperclip 启动安装。它成功安装了 Pyperclip-1.5.27。然后我转到 IDLE 并输入 import pyperclip 但出现以下错误:

Traceback(最近一次调用最后一次):文件“”,第 1 行,在 import pyperclip ImportError:没有名为 'pyperclip' 的模块

我试图通过在系统环境变量中将“C:\Python\Python35”添加到“Path”变量的末尾来解决这个问题。

0 投票
1 回答
1249 浏览

python - PyQt Application Frozen Screen on Linux, fine on Windows

I have been writing a PyQt Application on Windows for awhile, and I wanted to see if it would run properly on Linux. The gui application is basically a shell for a scientific toolkit meant to be used on the qtconsole/notebook. Both Linux and Windows systems are based on Anaconda 3.5, and running PyQt5. It works fine on Windows, but when I run on Linux, the Qt window pops up bit simply freezes in place the graphics that were underneath the window (see image below). There are no errors at all shown on the command line, the window just pops up and doesn't show widgets at all. Furthermore, when I try to close with the x-button in the top of the window, it shows an "Application not responsive" dialog and I have to force-quite.

The code-base is quite large (too large for this post) so I wouldn't really be able to put in a code example for this problem (I haven't been able to reproduce the error yet outside of this program). I can say that I did get some examples from this site working for simple gui programs: https://github.com/Deusdies/pythonbo . My code has a a lot of widget subclassing, uses pyqtgraph (most recent version from github) for plots, and has a lot of MDI subwindows.

Other packages for the underlying toolkit include:

  • numpy, numba, scipy, matplotlib
  • lmfit
  • pyexcel, pyexcel-xlsx
  • pyvisa, pyserial
  • pyperclip

When I try to run any of the MDI subwindow widgets as individual programs, I get the same problem as running the main program.

I guess I'm curious if anyone has run into this situation before and can suggest likely things I should probe to see what the problem might be.

Frozen PyQt Application

0 投票
0 回答
213 浏览

pip - Python-docx 安装错误。无法导入“etree”

我正在使用 Pycharms 使用 Python3.5 进行编程。我尝试导入 docx 模块,但出现了图片中显示的错误。我也无法进行任何 pip 安装。我收到第二张图片中显示的致命错误。

导入文档 点安装

0 投票
1 回答
562 浏览

python - 使用 webbrowser 模块使用谷歌地图

我刚接触python,我想问一个简单的问题。
使用此代码有什么区别:

这个代码:

0 投票
1 回答
1612 浏览

python - 使用 PyCharm,似乎无法导入 Pyperclip 模块

当我输入pip install pyperclip时,我得到:

0 投票
1 回答
396 浏览

python-3.5 - python 3.4中的pyperclip模块不在python 3.5中

我对编程和 Linux 操作系统完全陌生。

在我的 Linux 机器上,我编辑了我的 bashrc,这样当我输入 python 时,它就会调用 python3。我安装了 python 3.4 和 python 3.5.2。最近,我使用 pip3 install 安装了这个模块 pyperclip。

我的问题是在 python 3.5.2 时,找不到 pyperclip 模块,我无法在终端导入它。在 python 3.4 时,我可以导入模块。

作为 Linux 的新手,我不知道如何通过 python 3.5.2 访问“pyperclip”模块

我买了这本书“用 Python 自动化无聊的东西”。这些项目真的很有趣。

在我的机器上安装多个版本的 Python 是否可取?我可以只用一个吗?如何在 python 3.5.2 中导入 pyperclip 模块?

0 投票
2 回答
1596 浏览

python-3.x - 安装 Pyperclip,导入 IDLE 时遇到问题

我目前正在学习我的第一门计算机语言,并选择走 python 路线。非常兴奋!但是,我在尝试安装和导入 pyperclip 时遇到了一个错误。

成功将pyperclip安装到终端后,我得到...

已满足要求:.​​/anaconda/lib/python3.5/site-packages 中的 pyperclip

但是,当我去 IDLE 并导入 pyperclip 时,我得到...

ImportError:没有名为“pyperclip”的模块

我必须以不同的方式安装 pyperclip 吗?看来 pip 和 conda 之间的冲突只是比我目前的经验水平稍微复杂一点而已。

试过...

  • sudo pip3 install pyperclip

  • sudo conda install pyperclip

  • sudo easy_install pyperclip

  • sudo pip3 easy_install pyperclip

在问这个问题之前,我已经搜索了stackoverflow和 anaconda 一分钟试图解决这个问题。在此先感谢您的帮助 :)

0 投票
0 回答
53 浏览

python - pyperclip 与 sudo 的交互是什么?

信息:

  • Ubuntu 16.04
  • 蟒蛇3.5
  • pyperclip 1.5.27

所以我试图安装pyperclip使用pippip install pyperclip失败并出现错误:

查了一下,发现错误码 11 多半是因为某个模块是用 C 编译的?不确定这是否正确,但大多数人使用:

对我来说效果很好,它安装了。然后我检查它是否已经通过:

失败了,出现“找不到模块”错误。之后pip freeze,我尝试再次安装它(使用sudo),但是由于它已经安装,所以它不起作用,所以我尝试sudo -H pip install -U pyperclip了,它也不起作用,因为我有最新版本。

挠了挠头后,我绑了起来sudo -H pip freeze。突然,pyperclip=1.5.27被列出来了。那时它点击了。sudo -H python -c 'import pyperclip'...没有工作。

所以现在我真的很困惑。

很明显,pip install pyperclip需要一些东西sudo,尽管python无法pyperclip使用它。这里发生了什么?我能做些什么来解决它?

有关解决方法的更多信息:我正在实现一个密码脚本,它只是将所需密码从我计算机上的加密文件中添加到剪贴板,并使用主密码锁定。主要是为了好玩,但我也可以使用大量的密码,这些密码都需要非人的记忆才能知道。

0 投票
2 回答
1066 浏览

python - Pyperclip 不粘贴新行?

我正在尝试制作一个简单的脚本,该脚本从剪贴板中取出名称列表,格式为“Last,First”,然后将它们粘贴回“First Last”。我正在使用 Python 3 和 Pyperclip。

这是代码:

当我将其复制到剪贴板时:

然后运行脚本,它会生成: Bob CarterJane Goodall,名字只是粘在一起,没有换行。我不确定有什么问题。

谢谢你的帮助。

0 投票
1 回答
854 浏览

python - Python ATBS Ch 8 多剪贴板

嘿伙计们,我正在使用这本教科书《自动化无聊的东西》,我已经顺利完成了第 8 章,但我在使用 Multiclipboard 项目时遇到了麻烦。具体来说,我该如何启动它?

py mcb.pyw save spam在 python shell 中输入,但它只是说语法无效。

这是脚本的其余代码。