Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Installation problems
#5
The basic.
# Make 
G:\div_code
λ python -m venv my_env

# Cd in
G:\div_code
λ cd my_env\

# Activate 
G:\div_code\my_env
λ G:\div_code\my_env\Scripts\activate.bat

# A test file
(my_env) G:\div_code\my_env
λ cat test.py
import sys

print(sys.executable)

# Start Vs Code
(my_env) G:\div_code\my_env
λ code .
So should have VS Code in Path so can use code .(to start VS Code from folder you are in).
Click on down in right corner over python version and it will bring up select interpreter as in image.
[Image: 6KeOHi.png]
When run test.py,so will now use python.exe in my_env folder.
Output:
g:\div_code\my_env\Scripts\python.exe
Reply


Messages In This Thread
Installation problems - by standenman - May-12-2023, 01:59 PM
RE: Installation problems - by jefsummers - May-12-2023, 02:09 PM
RE: Installation problems - by standenman - May-12-2023, 03:12 PM
RE: Installation problems - by standenman - May-12-2023, 03:31 PM
RE: Installation problems - by snippsat - May-12-2023, 07:20 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Oct2py and Matplotlib installation problems Leloup 2 3,898 Nov-23-2018, 03:32 PM
Last Post: Leloup

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020