Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install python modules in cygwin

What is a way to instaill python modules within cygwin? I'm new to cygwin and couldn't find pip or anything like that in the setup.exe package. I've looked around and I can't find a definitive way to do it. Does anyone have advice?

like image 743
Zack Avatar asked Jul 09 '14 04:07

Zack


2 Answers

On windows, under cygwin follow the below steps.

1.Ensure python is installed in cygwin. Type python on the terminal of cygwin and it should launch the python shell. If it doesn't launch the setup file for cygwin and select python from the package list and install. 2. Now, install pip if it's not already installed. Provide full path if you have multiple python installations e.g.

/usr/bin/python2.7 -m ensurepip
/usr/bin/python3.6 -m ensurepip

3. Now, you can use pip to install the python package. Depending upon the installation in which you want the package to be installed, run below command(s)

/usr/bin/python2.7 -m pip install pyyaml
/usr/bin/python3.6 -m pip install pyyaml
like image 173
Nitin_k29 Avatar answered Oct 02 '22 22:10

Nitin_k29


In standard python installation, pip like scripts goes under "your_python_directory\Scripts". (in my system C:\Python34\Scripts) Make sure you have added this path to system directories (Environment Variables). Then

pip.exe install my_package_name

will work fine.

Also for configuring within cygwin this will help.

PS: sorry for confusion though I thought you meant you have installed python separately from cygwin. I believe this thread answers your question.

like image 26
ifyalciner Avatar answered Oct 02 '22 22:10

ifyalciner