How can I manage to install packages within python

2019-09-01 10:32发布

问题:

Actually, we can simply install python-dev on linux just use the following command:

sudo apt-get install python-dev

since python is integrated with Linux. But no such luck on windows. For input "pip install python-dev", there is no corresponding package on pypi.python.org. What packages should I install to match those when installed by "apt-get install python-dev" command under Linux on Windows?

回答1:

python-dev installs the headers and libraries for linux, allowing you to write / compile extensions.

In windows, the standard installer provides this by default. The header files are in the $installroot\include directory. The link libraries are found in $installroot\libs.

For example I've installed python 2.7 into c:\python27. This means my include files are located here: c:\python27\include. And the link libraries are in c:\python27\libs