Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Python 

VSCode Modules?

Hey, just installed VSCode and wanting to import tkinter, when I run the code I get a module error and found out it's because the module isn't downloaded I guess, kinda new to this. Anyone know how to use PIP or something like that to have a bunch of modules for VSCode? I'm on a Mac, thanks.
For pip, all you need to do is type (in the command prompt):

Code
pip install library
(Mar 5, 2017 05:58 PM)(╯°□°)╯︵ ┻━━┻ Wrote:  For pip, all you need to do is type (in the command prompt):

Code
pip install library
Hmm, what command prompt? I've tried typing it in Command + Shift + P and nothing showed up, sorry, very new to this.
(Mar 5, 2017 08:58 PM)⁣Null⁣ Wrote:  Hmm, what command prompt? I've tried typing it in Command + Shift + P and nothing showed up, sorry, very new to this.

Umm, on Mac it's called terminal I think.
(Mar 5, 2017 09:10 PM)(╯°□°)╯︵ ┻━━┻ Wrote:  Umm, on Mac it's called terminal I think.

I just tried posting that command and I'm getting the error:

-bash: pip: command not found


Is a prerequisite required for the download?

Thanks,
(Mar 5, 2017 09:12 PM)⁣Null⁣ Wrote:  I just tried posting that command and I'm getting the error:

-bash: pip: command not found


Is a prerequisite required for the download?

Thanks,

What version of python do you have installed?
Code
Install easy_install
curl https://bootstrap.pypa.io/ez_setup.py -o - | sudo python

Install pip
sudo easy_install pip
Now, you could install external modules. For example

pip install regex   # This is only an example for installing other modules

Freshly copied from SO, try that as i dont know anything about macs ;)
(Mar 5, 2017 09:12 PM)⁣Null⁣ Wrote:  I just tried posting that command and I'm getting the error:

-bash: pip: command not found


Is a prerequisite required for the download?

Thanks,

PHP Code

<?php 
python 
-m pip install library #for py2
python3 -m pip install library #for py3 

If there is still any error probably ur pip is not installed.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[The Brotherhood] by HackersMar 16, 2026 08:20 AM 18 709 Mar 16, 2026 08:20 AM
Last Post: Stanley
[Python] by BastilleJun 9, 2020 12:42 PM 4 179 Jun 9, 2020 12:42 PM
Last Post: Bastille
[C] by dsp250May 11, 2020 04:41 AM 6 161 May 11, 2020 04:41 AM
Last Post: Shisho