Python Forum
PIP install error - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Data Science (https://python-forum.io/forum-44.html)
+--- Thread: PIP install error (/thread-6789.html)

Pages: 1 2


RE: PIP install error - snippsat - Dec-09-2017

(Dec-09-2017, 04:27 PM)alex36540 Wrote: Does this mean it's downloaded on my computer now, or is it just in the environment?
The environment is on your computer,so then it will download to your computer.
This approach is a lot better for package like this,that has a lot of dependencies

Look at part-2 for more on environment.
If want to write a script for this instagram API package outside with editor/IDE you use python in C:\1\insta_env\Scripts\python.exe,
to execute the script.


RE: PIP install error - alex36540 - Dec-10-2017

(Dec-09-2017, 05:27 PM)snippsat Wrote: If want to write a script for this instagram API package outside with editor/IDE you use python in C:\1\insta_env\Scripts\python.exe,
to execute the script.
Do I need to use the environment somehow to be able to use the API in IDLE? Or could I just import the dependencies in the Python code?


RE: PIP install error - snippsat - Dec-11-2017

(Dec-10-2017, 11:56 PM)alex36540 Wrote: Do I need to use the environment somehow to be able to use the API in IDLE?
IDLE is not good at all,but you can use it.
python -m idlelib.idle
This is done in script folder of virtual environment,also where python.exe is.

Look at ptpython(review) or IPython for a better REPL than IDLE.
Quote:Or could I just import the dependencies in the Python code?
Yes,but remember has to execute with python in virtual environment.


RE: PIP install error - alex36540 - Dec-16-2017

(Dec-11-2017, 06:08 PM)snippsat Wrote: Yes,but remember has to execute with python in virtual environment.
So is this how I should go about it?
[Image: oLs3zMe.png]
Can I just create a new file from the IDLE that I opened from the environment and make multi-lined code, which then then I can save from there and access again in the future?


RE: PIP install error - snippsat - Dec-16-2017

(Dec-16-2017, 03:31 AM)alex36540 Wrote: which then then I can save from there and access again in the future?
Yes save script in insta_env folder.
Example:
# insta_test.py
from InstagramAPI import InstagramAPI

print(InstagramAPI.API_URL)
Running from cmder.
(insta_env) C:\1\insta_env
λ python insta_test.py
https://i.instagram.com/api/v1/
Running from IDLE:
(insta_env) C:\1\insta_env
λ python -m idlelib.idle
Now in IDLE:
File --> New file(write script or copy in).
File --> Save As.. insta_test.py in inta_env folder.
Run --> Run modulle(F5)



RE: PIP install error - alex36540 - Dec-16-2017

Okay, thank you so much