- How To Install Extra Packages In Cygwin
- Cygwin Install Package Offline
- Add Packages To Cygwin
- Cygwin Install Additional Packages
This page is a short guide on installing Cygwin on Microsoft Windows (Vista).
Cygwin homepage is at: http://www.cygwin.com/
How to uninstall Cygwin?
You can simply delete the whole Cygwin dir. On my machine, it's C:/cygwin/
. (make sure you quit all Cygwin processes first)
Write-Output ' Downloading extra Python packages (5/7) ' Start-Process - wait - FilePath ' C: cygwin bin bash ' - ArgumentList ' -login -i -c 'pip2 install empy' ' Write-Output ' Downloading and installing JSBSim, then downloading APM source (6/7) '. Im new to the software. And i don't know what is specified in GUI. But I have a pdf that says install the basic package by normal installation then install additional packages like gcc and others. Now i check with the command cygcheck -check-setup -dump-only as i read it somewhere. I didn't find gcc and others in that list.
How to find Cygwin version?
in Cygwin terminal, type uname -a
.
Cygwin Base Installation
First, download the Cygwin installer “setup.exe”.
Run it. Accept the default parameters, unless you really have a need to change things.
When in the dialog to choose what programs to install, simply accept the default. Once you done installation of the base packages, you can come back to it and install other packages you need. If this is your first time, i highly recommend you follow this.
The above should be smooth. When finished, you can test run Cygwin by clicking the icon on desktop, and the Cygwin terminal should come up. That means bash is running, and you've installed Cygwin successfully.
Installing Packages You Want
Now, find out what other programs you need. For example, Cygwin does not install ssh by default. Let's say you want to install ssh.
Run “setup.exe” again. Accept the same defaults, in particular, try to stick with the mirror site you used before.
Here's a list of unix tools you might want to install:Cygwin Essential Install List.
The installer may give you a warning: “This setup.ini is older than the one you used last time you installed Cygwin. Proceed anyway?”. When this happens, be very careful. I accepted it a few times that resulted in reinstalling lots of packages, and that often screwed up things that i ends up deleting the whole Cygwin dir and reinstall everything. (The warning is very ambiguous. It is not clear which setup.ini it is talking about. If it means the one from the mirror site, then of course it will be older than the one on my hard drive. If it means the file on my hard drive is older than the one on mirror site, then, it is not clear why should i care. It does not point out what setup.ini is doing or how it is used, or if installer is relying on the one on my drive or the mirror site, or if the installer is going to do a copy from the mirror site to my disk then use the one on my disk. I can't see how useful this warning is.)
Here's what to do when the Select Packages dialog comes up.
The Select Packages dialog has a very confusing interface. To understand it, first, understand about the check boxes (shown as “n/a” by default). For each program, there are 2 check boxes. One is for installing binary, the other is source. When a check is marked, that means you are telling Cygwin to install that package. To toggle the checkbox, you have to click on that circular arrow icon to the left of the “Skip” or “Keep” word. (i'll call it the “cycle” icon)
Here's how the cycle icon works. Click it does several things, and what it does depends on whether you already have that package installed.
For packages you have already installed, it shows “Keep” by default. Clicking on it cycles you thru the choices of {Keep, ‹version number›, Reinstall, Source, Uninstall}, and will toggle the checkboxes if apropriate.
For packages you have not yet installed, it shows “Skip” by default. Clicking on it cycles you thru “Skip”, then older version, then other older versions if available, then back to “Skip”, and each click update the checkboxes as appropriate.
It does not hurt to click the cycle icon, but you have to be careful, because if you click without paying good attention, you may get yourself installing older version, or uninstalling your software. If you made too many clicks and you forgot what is the original, you can click on Cancel button to exit the installer and restart again.
There are also some view options at the top. The interface is badlydesigned in that it is very confusing. I recommend not to use itunless you know Cygwin well. If you did click it just for curiosity,you can exit the installer then restart again.
WARNING: When you run the “setup.exe”, best to quit any Cygwin processes you might have running, because that might interfere with install when the installer wants to access the same files or dll. Also, be sure you didn't by mistake have the checkbox on for all your installed packages. If you do, it'll reinstall all your packages, which may run into problems if you have ran Cygwin in your Windows session. Because, for example, the installer may tell you:
The dll is a library, so you can't really quit it. When this happens, cancel the installation. Then, start setup again.
Misc
This installer name “setup.exe” is very stupid. It is a generic name, doesn't indicate what program it is a setup for. They should at least put Cygwin into the name, so it is easy to identify.
Also note, the installer first download the packages, then install them. The downloaded packages are all kept in a dir that you specified in the installer. You can view these with Explorer.For example, on my machine the path is:C:UsersxahDownloadshttp%3a%2f%2fwww.goh4.com%2fcygwin%2f
. (note the unreadable percent symbols there.)You should not delete this folder, because when you install things again, it may need some packages you've already installed, saving you the time to download them all again.
Some Notes About Using Cygwin
Some random notes to myself about using Cygwin.
PATH environment variable
How To Install Extra Packages In Cygwin
It is important to set the $PATH environment variable correctly.
In Cygwin terminal, my $PATH env var by default is:
By default it also has these:
Cygwin Path Issues
See: Cygwin Path Conversion.
See also:
If you have a question, put $5 at patreon and message me.
Skip to end of metadataGo to start of metadataThis page describes how to install and configure Python for Cygwin.
Page contents:
Python
Python is a powerful scripting language that can be used to manipulate many data types. It can also be used with Fortran code to do complex mathematical tasks with the fast speed typical of Fortran programs but with the benefit of Python structures for dealing with complicated data formats and files.
Integrated Development Environments (IDEs) exist for Python. However, this page describes how to install and configure Python for Cygwin, and focuses on interacting with Python using its Command Line Interface (CLI) via the Cygwin Terminal.
Cygwin Install Package Offline
Cygwin
Cygwin is a Linux emulator for Windows that contains packages, including coding tools such as compilers and run-time components, which may be difficult to install on Windows as standalone programs themselves. Cygwin provides its own operating environment that interacts with Windows. Programs and commands are run in Cygwin using the Cygwin terminal.
Packages are installed for Cygwin using its setup utility, setup-x86_64.exe for 64-bit (source: http://cygwin.com/install.html).
By default, the Cygwin setup utility asks for elevated Administrative permissions. These are not necessary to install and update the base Cygwin environment. When elevated Administrative permissions are not available from the User account, run the program with the '--no-admin
' option.
This can be done via a Windows 'Shortcut': After browsing to the location of the Cygwin setup utility, add ' --no-admin
' to the end of the path:
Alternatively, this can be done by starting the program from Command Prompt (cmd.exe) by specifying the path to the program and adding ' --no-admin
' to the end of the path before running the program:
Configuring Cygwin
If the Python packages as described are not listed, check if the packages are labelled with a variant of the Python version. For example, Cygwin previous included packages under the 'python2' and 'python3' name, such as 'python2-pip' and 'python3-pip'. Sometimes the packages, and corresponding Python version are updated, and the packages may be renamed. In this case, check for variants that include a minor version, such as 'python27-pip' and 'python36-pip'.
- Run the Cygwin setup utility
- Continue through setup until prompted to select packages to install:
Search for and mark the following packages for installation:
To mark a package for installation, change the option under the 'Current' column from blank to a version number:- Base packages:
- AllDevelmake
- AllDevelgcc-core
- AllDevelgcc-fortran
- AllDevelgcc-g++
- Python 2.7 packages:
- AllPythonpython27
- AllPythonpython27-devel
- AllPythonpython27-numpy
- AllPythonpython27-pip
- Python 3.6 packages:
- AllPythonpython36
- AllPythonpython36-devel
- AllPythonpython36-numpy
- AllPythonpython36-pip
- Libraries for 'matplotlib':
- AllLibslibfreetype-devel
- AllLibslibpng-devel
- Base packages:
Click 'Next'
Cygwin may automatically select other packages to install, which are dependencies that are required for the user-selected packages to install. This is normal.- Continue through setup until the packages have been installed
'python' may not exist as a program, especially if more than one version of Python is installed:
In this case, include the version in the call to Python:
Or create an alias to attach this program to the common name 'python', either temporarily at the prompt or by adding the command to the end of the '.bashrc' file inside the /home/username/
folder to use this alias permanently:
Add Packages To Cygwin
If a specific version of python was installed, such as 'python27', the 'python' program will include the version number in its name (e.g., 'python2.7.exe'):
To distinguish between Python 2 or Python 3, consider creating aliases to the specific version but preserving '2' and '3' in the name. Furthermore, include this version when calling Python explicitly:
Upgrading a package installed via Cygwin setup utility
- Open Cygwin Terminal
Use the 'pip' package manager to upgrade the package (e.g., numpy):
Installing packages (generic)
- Open Cygwin Terminal
- Use the 'pip' package manager to install packages, as necessary (e.g., pandas):
Cygwin Install Additional Packages
Installing 'matplotlib'
ImportError: cannot import name _distributor_init
', follow the command above to upgrade the 'numpy' package, then re-run the command to install 'matplotlib'.- Open Cygwin Terminal
Use 'pip' to install the package:
Running Python from the Cygwin terminal
To compile an existing Fortran module for Python:
To run an existing Python script: