Python Forum
how to get your own ip using python (NO SOCKET:) )
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to get your own ip using python (NO SOCKET:) )
#1
Hi,
I would like to create a code wich symply prints out the IP of the user running the code. I can't use socket cause socket creates an error when turning my program into an .exe. Does someone know a other way to get the IP?

thanks in advance!
Reply
#2
it would be better to tell how you try to convert your program to exe and what error you get
and of course show your code in python tags.
Probably the problem with the created exe is not the socket module
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#3
Well it is:(. It keeps on giving the error:
import socks
ModuleNotFoundError: 'No module named 'socks'

In my script I've clearly written Import socket, not import socks.
Reply
#4
well, if it says socks that is how it is written in the code you run :-) it's not something the interpreter will lie about... :-)

show your code is python tags, the full traceback - in error tags
if you did correct the code - make sure you save after changes, make sure you run the code you *think* running

and how this is related with the exe? this error will come even hen you run the script as py file
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  python socket connect only sometimes espDino 0 1,501 Jul-15-2020, 12:13 PM
Last Post: espDino
  Python 2.7 vs Python 3.8 (Socket Module) MattB 8 6,518 Mar-18-2020, 01:02 PM
Last Post: MattB
  For Xilinx EthernetLite LWIP:Need help in Python SOCKET Coding Saras 1 2,947 Oct-01-2018, 05:16 AM
Last Post: Saras
  Python Socket programming with packets sourabhjaiswal92 1 4,091 Sep-18-2018, 06:24 AM
Last Post: martingever
  Python socket : Error receive data quanglnh1993 1 12,952 Mar-14-2018, 11:59 AM
Last Post: avorane
  Python // C # - SOCKET connection is constantly interrupted raspberryPiBRA 0 2,386 Feb-01-2018, 09:53 AM
Last Post: raspberryPiBRA

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020