i'm currently into learning a bit of python and i want to import the paperclip third party module into my python file.
Yes, i already installed the pyperclip module with pip install pyperclip
.
if i create a file on my desktop, i get an error which says Traceback (most recent call last): File "test.py", line 1, in <module> import pyperclip ImportError: No module named pyperclip
However if i put the test.py in my python folder, it runs.
The question now is, is there a way to make all my installed modules available on a global scope ? I just want to have my file eg on my Desktop and run it without having import issues.
Thank you.
Greetings
Edit: I'm working on a Mac, maybe this leads to the problem
Found the problem.
The pip install
automatically used pip3.5 install
whereas python test.py
didn't use python3.5 test.py
Thank you @Bakurìu
Is there a way i can define python3.5
as python
?
You can do this :
pip3.5 install paperclip
pyperclip is install but not paperclip
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.