NOTICE
This method of installation is not the normal process. The recommended install method is to use pip such as
You can manually replicated the process of installing a 3rd party library. You should know the underlying of the system and how it works anyways.
We are going to use Python 3.4 for this example. It is installed to the location C:\Python34 in this example. We are going to install the 3rd party libraries beautifulsoup and pygame this method. But you can do this with any 3rd party lib. beautifulsoup does not have any headers, whereas pygame does.
We show that beautiful soup is not installed on this python
https://pypi.python.org/pypi/beautifulsoup4
rename
beautifulsoup4-4.5.1-py3-none-any.whl
to the extension of
beautifulsoup4-4.5.1-py3-none-any.zip
then unzip it, and extract it like any other zip file
There will be a bs4 directory and a beautifulsoup4-4.5.1.dist-info directory. Copy these directories over to C:\Python34\Lib\site-packages
before and after directory listing
We download the wheel from the unofficial library of 3rd party libs
http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame
And since our python is version 3.4 and 32 bit we will be downloading the one with py34 (for python3.4) and win23 for (32 bit). What you download depends on your python version and python bit type.
we change the extension to zip again so windows can detect and extract it.
This time there is a 3rd directory in here. We copy pygame and pygame-1.9.2b1.dist-info to C:\Python34\Lib\site-packages again, just like we did before. Now we need to go back to the extracted directory and go into pygame-1.9.2b1.data directory. There will be a directory named "headers". Rename this directory to "pygame" (all lowercase). Now copy or move this renamed directory to C:\Python34\include directory
Now go into your python3.4 interpreter and test pygame
This method of installation is not the normal process. The recommended install method is to use pip such as
pip install bs4
. If you cannot install a module via pip and try this method you are most likely in way over your head and should not be doing it. You can manually replicated the process of installing a 3rd party library. You should know the underlying of the system and how it works anyways.
We are going to use Python 3.4 for this example. It is installed to the location C:\Python34 in this example. We are going to install the 3rd party libraries beautifulsoup and pygame this method. But you can do this with any 3rd party lib. beautifulsoup does not have any headers, whereas pygame does.
We show that beautiful soup is not installed on this python
C:\Python34>python.exe Python 3.4.4 (v3.4.4:737efcadf5a6, Dec 20 2015, 19:28:18) [MSC v.1600 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import bs4 Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named 'bs4' >>> import BeautifulSoup Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named 'BeautifulSoup'We then download the wheel for python 3.4 version
https://pypi.python.org/pypi/beautifulsoup4
rename
beautifulsoup4-4.5.1-py3-none-any.whl
to the extension of
beautifulsoup4-4.5.1-py3-none-any.zip
then unzip it, and extract it like any other zip file
There will be a bs4 directory and a beautifulsoup4-4.5.1.dist-info directory. Copy these directories over to C:\Python34\Lib\site-packages
before and after directory listing
C:\Python34\Lib\site-packages>dir Volume in drive C is Windows Volume Serial Number is 3405-69A8 Directory of C:\Python34\Lib\site-packages 11/05/2016 02:52 AM <DIR> . 11/05/2016 02:52 AM <DIR> .. 11/05/2016 02:52 AM 126 easy_install.py 11/05/2016 02:52 AM <DIR> pip 11/05/2016 02:52 AM <DIR> pip-7.1.2.dist-info 11/05/2016 02:52 AM <DIR> pkg_resources 05/07/2011 01:04 PM 121 README.txt 11/05/2016 02:52 AM <DIR> setuptools 11/05/2016 02:52 AM <DIR> setuptools-18.2.dist-info 11/05/2016 02:52 AM <DIR> _markerlib 11/05/2016 02:52 AM <DIR> __pycache__ 2 File(s) 247 bytes 9 Dir(s) 787,335,749,632 bytes free C:\Python34\Lib\site-packages>dir Volume in drive C is Windows Volume Serial Number is 3405-69A8 Directory of C:\Python34\Lib\site-packages 11/05/2016 03:02 AM <DIR> . 11/05/2016 03:02 AM <DIR> .. 11/05/2016 03:02 AM <DIR> beautifulsoup4-4.5.1.dist-info 11/05/2016 03:02 AM <DIR> bs4 11/05/2016 02:52 AM 126 easy_install.py 11/05/2016 02:52 AM <DIR> pip 11/05/2016 02:52 AM <DIR> pip-7.1.2.dist-info 11/05/2016 02:52 AM <DIR> pkg_resources 05/07/2011 01:04 PM 121 README.txt 11/05/2016 02:52 AM <DIR> setuptools 11/05/2016 02:52 AM <DIR> setuptools-18.2.dist-info 11/05/2016 02:52 AM <DIR> _markerlib 11/05/2016 02:52 AM <DIR> __pycache__ 2 File(s) 247 bytes 11 Dir(s) 787,335,385,088 bytes freeThen open your interpreter and try to import and use beautiful soup as normal.
C:\Python34>python.exe Python 3.4.4 (v3.4.4:737efcadf5a6, Dec 20 2015, 19:28:18) [MSC v.1600 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> from bs4 import BeautifulSoup >>>Sometimes you will have to include the header files as well. In this next example we will install pygame which has these
We download the wheel from the unofficial library of 3rd party libs
http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame
And since our python is version 3.4 and 32 bit we will be downloading the one with py34 (for python3.4) and win23 for (32 bit). What you download depends on your python version and python bit type.
we change the extension to zip again so windows can detect and extract it.
This time there is a 3rd directory in here. We copy pygame and pygame-1.9.2b1.dist-info to C:\Python34\Lib\site-packages again, just like we did before. Now we need to go back to the extracted directory and go into pygame-1.9.2b1.data directory. There will be a directory named "headers". Rename this directory to "pygame" (all lowercase). Now copy or move this renamed directory to C:\Python34\include directory
Now go into your python3.4 interpreter and test pygame
C:\Python34>python Python 3.4.4 (v3.4.4:737efcadf5a6, Dec 20 2015, 19:28:18) [MSC v.1600 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import pygame >>> pygame.init() (6, 0)
Recommended Tutorials: