Last modified by Leon Poon on 2021/03/23 13:16

Show last authors
1 After you have [[created a virtualenv>>doc:Computing Newbies.Python Newbies.How to Create a VirtualEnv.WebHome]], and [[installed some libraries in the virtualenv>>doc:Computing Newbies.Python Newbies.How to add libraries to a virtualenv.WebHome]], you should run your script in the virtualenv if your script makes use of the libraries that you installed.
2
3 Assuming that your script is at /abc/def/efg.py...
4
5 In your console [[change working directory>>doc:Computing Newbies.How to Deal with Working Directory in Console.WebHome]] to your virualenv and type:
6
7 {{code language="plain"}}
8 bin/python3 /abc/def/efg.py
9 {{/code}}
10
11 In Windows you should type:
12
13 {{code language="plain"}}
14 scripts\python3.exe C:\abc\def\efg.py
15 {{/code}}
16
17 if your file is in C:\abc\def\efg.py in windows.