Yenna
Yenna

Reputation: 41

Python - Pipenv not display in the Python interpreter

I installed and activated pipenv in my project folder, but then I couldnt see the Pipenv in the list of Python interpreter. This is the steps I did:

Anyone know how to solve this? Thanks in advance!!! Im using Mac btw.

I cannot embed the screenshot to this post, so I attach the screenshot here.

1

Upvotes: 0

Views: 1089

Answers (1)

Yenna
Yenna

Reputation: 41

Oh, I just figure the manual way to do it, sorry I am newbie so it may seems too simple for many of you haha, post here in case anyone needs it:

  1. After activating pipenv (using pipenv shell), you will notice there're few lines in terminal informing that virtual environment has been created successfully, something like this:
    ✔ Successfully created virtual environment!
    Virtualenv location: /Users/zoey/.local/share/virtualenvs/part_manager-GqnnAfaN
    Creating a Pipfile for this project...
    Launching subshell in virtual environment...
  2. Open the list of Interpreter using Command Shift P in macOS, select Python: Select Interpreter
  3. Select Enter interpreter path...
  4. Paste the virtual location path in step 1 and press Enter, for e.g. in my case it is /Users/zoey/.local/share/virtualenvs/part_manager-GqnnAfaN
  5. Done, the pipenv interpreter will be displayed accordingly in the bottom left of your Visual Studio Code.

Upvotes: 4

Related Questions