Python3.6 How To Install Libtorrent?
Solution 1:
Yes, libtorrent (is supposed to) support python 3.
The basic way to build and install the python binding is by running the setup.py
. That requires that all dependencies are properly installed where distutils expects them though. If this works it's probably the simplest way so it's worth a shot. I believe you'll have to invoke this python script using python3, if that's what you're building for.
To build using the main build system (and install the resulting module manually) you can follow the steps in the .travis file (for unix) or the appeyor file for windows. In your case you want to specify a 3.x version of python, but the essence of it is:
brew install boost-python
echo"using python : 2.7 ;" >> ~/user-config.jam
cd bindings/python
bjam -j3 stage_module libtorrent-link=static boost-link=static
To test:
python test.py
Note, in the actual build step you may want to link shared against boost if you already have that installed, and shared against libtorrent if you have that installed, or will install it too.
On windows:
add the following to $HOMEPATH\user-config.jam
:
using msvc :14.0 ;
using gcc :::<cxxflags>-std=c++11 ;
using python :3.5:c:\\Python35-x64 :c:\\Python35-x64\\include :c:\\Python35-x64\\libs ;
Then run:
b2.exe --hash openssl-version=pre1.1 link=shared libtorrent-link=shared stage_module stage_dependencies
To test:
c:\Python35-x64\python.exe test.py
Post a Comment for "Python3.6 How To Install Libtorrent?"