# Python API on Windows

**URL:** <https://forums.blinkstick.com/t/python-api-on-windows/543>\
**Category:** Support\
**Created:** [July 31, 2016, 6:17pm UTC](https://forums.blinkstick.com/t/python-api-on-windows/543 "2016-07-31T18:17:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![quietone\_free](https://forums.blinkstick.com/letter_avatar_proxy/v4/letter/q/ce73a5/32.png) [@quietone\_free](https://forums.blinkstick.com/u/quietone_free)\
**Post date:** [July 31, 2016, 6:17pm UTC](https://forums.blinkstick.com/t/python-api-on-windows/543/1 "2016-07-31T18:17:15Z")

</div>

I have a custom made BlinkStickPro which works with the Windows Client (Win7-64) and with the Python api in Linux but I’m failing to get the Python api to work in Windows.  
I’ve installed Python 2.7.12 and the api as instructed at [https://github.com/arvydas/blinkstick-python](https://github.com/arvydas/blinkstick-python), but just get errors.  
If I run the Example: Set random color i get

C:\Users\Q\Documents\blinkstick\>python random.py  
Traceback (most recent call last):  
File “random.py”, line 1, in   
from blinkstick import blinkstick  
File “C:\Python27\lib\site-packages\blinkstick\blinkstick.py”, line 14, in   
from random import randint  
File “C:\Users\Q\Documents\blinkstick\random.py”, line 1, in   
from blinkstick import blinkstick  
ImportError: cannot import name blinkstick

For info “pip list” reports  
BlinkStick (1.1.8)  
pip (8.1.2)  
pywinusb (0.4.1)  
setuptools (20.10.1)

Does anyone have any pointers?  
Thanks

---

<div class="post-metadata">

**Author:** ![p0ke](https://forums.blinkstick.com/user_avatar/forums.blinkstick.com/p0ke/32/14_2.png) [@p0ke](https://forums.blinkstick.com/u/p0ke)\
**Post date:** [July 31, 2016, 8:47pm UTC](https://forums.blinkstick.com/t/python-api-on-windows/543/2 "2016-07-31T20:47:03Z")

</div>

Do not name your file random.py. This overwrites the official random.py which is part of the python libs.  
Just rename your file to BSrandom.py or so and try it again. This should be the solution for you.

---

<div class="post-metadata">

**Author:** ![quietone\_free](https://forums.blinkstick.com/letter_avatar_proxy/v4/letter/q/ce73a5/32.png) [@quietone\_free](https://forums.blinkstick.com/u/quietone_free)\
**Post date:** [July 31, 2016, 9:17pm UTC](https://forums.blinkstick.com/t/python-api-on-windows/543/3 "2016-07-31T21:17:40Z")

</div>

I imagined it would be something simple.  
Thank you!
