Closed coolq1000 closed 7 years ago
Hey,
Currently, the prebuilt binaries only go up to Python 3.5 on Windows. If you take a look here you can see how to build Boost.Python and you can add a BOOST_ROOT environment variable to your system.
Currently busy with school so if I find the time to add in the python 3.6 I will.
Thanks for using this and finding bugs
Ok, so, is Boost.Python for using C libraries with python?
I managed to get boost, and I ran bootstrap
and the bjam
commands through the cmd.
However I couldn't find user-config.bjam
?
Should I set the enviroment variables usng the SET
command?
Also one final question, where should I point BOOST_ROOT
and PYTHON_ROOT
to (using the set
command)?
I hope I'm not bothering you, or getting in the way of your school work!
Thanks!
Boost.Python is for building Python C extensions. You can take a look at the gameboycore-python source code to see how I'm doing it.
You create user-config.jam in the boost root directory.
The Boost root directory is simply the path to the boost folder. So BOOST_ROOT
would point to C:\boost_1_60_0
for example.
You can use the SET
command if you want. For things like Boost I add an environment variable using Control Panel -> System -> Advanced System Settings.
Achieves the same thing, except its persistent.
PYTHON_ROOT
would point to your python installation. So for you I'm guessing its C:\Python36
. But you'll have to check.
You can also add that through Control Panel as well. Or just use SET
to make it temporary.
Okay, so that all seemed to work, however now I'm getting another error :(
Here it is:
C:\boost_1_64_0>pip install gameboycore
Collecting gameboycore
Using cached gameboycore-0.4.1.tar.gz
Installing collected packages: gameboycore
Running setup.py install for gameboycore ... error
Complete output from command c:\users\coolq\appdata\local\programs\python\python36\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\coolq\\AppData\\Local\\Temp\\pip-build-5fghwqoz\\gameboycore\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\coolq\AppData\Local\Temp\pip-uqqqwg67-record\install-record.txt --single-version-externally-managed --compile:
== Boost Configuration ==
-- BOOST_ROOT: "C:\boost_1_64_0"
-- BOOST_INCLUDE_DIR: "C:\boost_1_64_0"
-- BOOST_LIB_DIR: "C:\boost_1_64_0"\stage\lib
-- BOOST_LIB_DIR_EXTRA: "C:\boost_1_64_0"\
== Python Configuration ==
PYTHON_ROOT: "C:\Users\coolq\AppData\Local\Programs\Python\Python36"
PYTHON_INCLUDE_DIR: "C:\Users\coolq\AppData\Local\Programs\Python\Python36"\include
PYTHON_LIB_DIR: "C:\Users\coolq\AppData\Local\Programs\Python\Python36"\libs
== GameboyCore Configuration ==
-- INCLUDE_DIR: C:\Users\coolq\AppData\Local\Temp\pip-build-5fghwqoz\gameboycore\src\gameboycore\include
-- ENDIAN: __LITTLEENDIAN__
-- CXX_FLAGS:
running install
running build
running build_ext
building 'gameboycore' extension
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\coolq\AppData\Local\Temp\pip-build-5fghwqoz\gameboycore\setup.py", line 131, in <module>
url="https://github.com/nnarain/gameboycore-python"
File "c:\users\coolq\appdata\local\programs\python\python36\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\users\coolq\appdata\local\programs\python\python36\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "c:\users\coolq\appdata\local\programs\python\python36\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "c:\users\coolq\appdata\local\programs\python\python36\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "c:\users\coolq\appdata\local\programs\python\python36\lib\distutils\command\install.py", line 545, in run
self.run_command('build')
File "c:\users\coolq\appdata\local\programs\python\python36\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\coolq\appdata\local\programs\python\python36\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "c:\users\coolq\appdata\local\programs\python\python36\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "c:\users\coolq\appdata\local\programs\python\python36\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\coolq\appdata\local\programs\python\python36\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "c:\users\coolq\appdata\local\programs\python\python36\lib\site-packages\setuptools\command\build_ext.py", line 75, in run
_build_ext.run(self)
File "c:\users\coolq\appdata\local\programs\python\python36\lib\distutils\command\build_ext.py", line 339, in run
self.build_extensions()
File "c:\users\coolq\appdata\local\programs\python\python36\lib\distutils\command\build_ext.py", line 448, in build_extensions
self._build_extensions_serial()
File "c:\users\coolq\appdata\local\programs\python\python36\lib\distutils\command\build_ext.py", line 473, in _build_extensions_serial
self.build_extension(ext)
File "c:\users\coolq\appdata\local\programs\python\python36\lib\site-packages\setuptools\command\build_ext.py", line 196, in build_extension
_build_ext.build_extension(self, ext)
File "c:\users\coolq\appdata\local\programs\python\python36\lib\distutils\command\build_ext.py", line 558, in build_extension
target_lang=language)
File "c:\users\coolq\appdata\local\programs\python\python36\lib\distutils\ccompiler.py", line 717, in link_shared_object
extra_preargs, extra_postargs, build_temp, target_lang)
File "c:\users\coolq\appdata\local\programs\python\python36\lib\distutils\_msvccompiler.py", line 460, in link
build_temp = os.path.dirname(objects[0])
IndexError: list index out of range
Thanks again!
At a glance, I'm guessing you don't have the right version of Visual Studio installed. I don't exactly want to send you on a goose chase setting up your system either.
Give me a day or two and I can't add python 3.5 and 3.6 64 bit.
But in the meantime can you try running:
pip install gameboycore --upgrade
I have a 32 bit binary build for Python 3.6. I don't actually know whether a 32 bit extension will work with 64 bit python
Ok, thanks btw for helping me 😄. I ran the command and I got the exact same error.
I could maybe download 32-bit python, as I explicitly downloaded the 64-bit version?
Does the output say Using cached gameboycore-0.4.1.tar.gz
Because it needs to try to install 0.4.2
You're right! It does say that, how can I get it to use 0.4.2?
Try:
pip uninstall gameboycore
pip install gameboycore --no-cache-dir
Okay, so I tried that, however I still tried to install 0.4.1, I have reformatted my PC since I had it working last, I don't know if that would make a difference though 😕.
When I ran uninstall, it said there was nothing to uninstall 😢
Well, that makes sense I guess since it didn't install in the first place. Looks like pip
is looking for a 64-bit distribution which is to be expected.
This should be resolved when I add the 64 bit Python extension. Thanks for trying that stuff out.
Would you prefer I install 32-bit, or wait for 64-bit? It seems that it would be easier if I installed 32-bit, however if you want me to test it, I can wait?
Stick with the 64 bit
Okay thanks :)
Python 3.6 x64 is up.
pip install gameboycore --no-cache-dir
If the installation fails, ensure you are installing version 0.4.3
.
YESSSSSS, You did it! It worked!!!
Woot!
Thanks again mate! Now I'll try an example!
Hey, it's me!
I've decided to use your library again(it's just too cool). However when I tried to install it again(with pip) it gave me an error.
Here is the error:
I am using windows 10 x64 bit. I'm also using Python 3.6 with a 64 bit installation.
Thanks!