简体   繁体   English

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

[英]pyperclip module in python 3.4 not in python 3.5

I am completely new to programming and Linux OS. 我是编程和Linux操作系统的新手。

In my Linux machine, I edited my bashrc so that when I type python, it calls python3. 在我的Linux机器上,我编辑了我的bashrc,这样当我输入python时,它会调用python3。 I have python 3.4 and python 3.5.2 installed. 我安装了python 3.4和python 3.5.2。 Recently, I install this module pyperclip using pip3 install. 最近,我使用pip3 install安装了这个模块pyperclip。

My problem is when at python 3.5.2, the pyperclip module couldn't be found, I couldn't import it at terminal. 我的问题是在python 3.5.2时,无法找到pyperclip模块,我无法在终端导入它。 When at python 3.4, I get to import the module. 在python 3.4时,我可以导入模块。

Being completely new to Linux, I have no idea how to access the "pyperclip" module via python 3.5.2 作为Linux的新手,我不知道如何通过python 3.5.2访问“pyperclip”模块

I bought this book "Automate the Boring Stuff with Python." 我买了这本书“用Python自动化无聊的东西”。 and the projects are really interesting. 这些项目非常有趣。

Is it advisable to have more than one version of Python in my machine? 我的机器中有多个版本的Python是否可取? Can I just use only one? 我可以只用一个吗? How to I import pyperclip module in python 3.5.2? 如何在python 3.5.2中导入pyperclip模块?

Try this in Terminal. 在终端试试吧。

pip3 install

pip3 install setuptools

pip3 install pyperclip  

However you may need to have downloaded the zip pyperclip module first. 但是,您可能需要先下载zip pyperclip模块。 Mine was in my Downloads directory on my Mac before I ran the previous three pip lines in Terminal. 我在Mac上的下载目录中,然后在终端中运行了前三个点线。

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

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