How can I install a module in Python (Read More)
How can I install python in an offline computer? I can't use pip or easy install since I have no connection in my pc. However I can download modules using my phone and transfer the file to my computer, the thing is I don't know how can I install/use that transfered file on Python. So do you know how can I use a manually downloaded module on python?
If you grabbed the source code, just open it up, and run python setup.py install from the directory.
If you grabbed an egg instead, it needs to go into the site-packages directory under your python installation.
If you grabbed an egg instead, it needs to go into the site-packages directory under your python installation.
Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]
If you grabbed the source code, just open it up, and run python setup.py install from the directory.If you grabbed an egg instead, it needs to go into the site-packages directory under your python installation.
I got a zip file it has a setup.py so I'm gonna try that tommorow. Thank you!
One more question, just how exactly can I run that command from the directory? Maybe tell me how to do it step by step?
Assuming you are on windows,
- Open the directory in the windows explorer
- Go to file menu
- Choose Open Command Prompt
If the command doesn't work, make sure you have the python directory listed in your PATH variable.
How about the module (setup.py) is it okay if I have the folder in my desktop or should I add it to my paths too? Or there's a specific location that I should put the setup.py?Assuming you are on windows,
If the command doesn't work, make sure you have the python directory listed in your PATH variable.
- Open the directory in the windows explorer
- Go to file menu
- Choose Open Command Prompt
You can also, even using Windows, install packages via pip ( the Python package index ). Just follow this quickstart if you are interested in: https://pip.pypa.io/en/stable/quickstart/
A complicate solution may indicate a not understood problem.
[twitter]KimKulling[/twitter]
[twitter]KimKulling[/twitter]
That was what I was doing before I even asked but I always get an error saying that setup.py about it not being found in the directory/file or something similar. So how can I fix these? Also thanks for the previous answers.Assuming you are on windows,
If the command doesn't work, make sure you have the python directory listed in your PATH variable.
- Open the directory in the windows explorer
- Go to file menu
- Choose Open Command Prompt
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement