First time here? Check out the FAQ!
2

How to install packages using pip from within Wing
 

What is the way to install a package using pip from within Wing? For example, how to install the Bottle Python Web Framework from within Wing?

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Varuna's avatar
53
Varuna
asked 5 years ago
Wingware Support's avatar
4.2k
Wingware Support
updated 4 years ago

Comments

see more comments

2 Answers

1

You could manage your project in a virtual environment, do the pip install there and set your wing project to use that environment.

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Max Slimmer's avatar
31
Max Slimmer
answered 5 years ago
link

Comments

see more comments
0

Other than starting a command from the OS Commands tool there's no way to do that now. Adding a package manager is something we hope to do in the future.

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Wingware Support's avatar
4.2k
Wingware Support
answered 5 years ago
link

Comments

You have my +1

tinjaw's avatar tinjaw (5 years ago)

A small start on this is available in Wing 7.2+ where you can specify packages to install in the New Project dialog when creating a new virtualenv or Anaconda env with your new project.

Wingware Support's avatar Wingware Support (5 years ago)

I tried this with PyQt5, but the package gets installed into the host python and not into the Wing created virtual environment.

It does work, if I start a terminal from within Wing IDE, which is automatically in the correct virtual environment and then install via pip

pip install pyqt5

This is on a fresh install of macOS Mojave with python 3.7.7 installed via python.org installer. WingPro 7.2.2.13 (rev b4c7d93c92a9)

chriswayg's avatar chriswayg (4 years ago)

I think there may be a bug here so that Wing ends up running pip outside of the activated env. We'll look into fixing that soon. Thanks for pointing this out!

Wingware Support's avatar Wingware Support (4 years ago)
see more comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss.

Add Answer

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)