Python & Instapy... Versions Problem Mac!

Probleme bei der Installation?
bernddasbrot
User
Beiträge: 11
Registriert: Dienstag 12. März 2019, 07:59

Hallo Leute.

Ich wollte gestern mal Instapy installieren auf meinem Mac. Leider bekomme ich bei der Installation von Instapy und der Anzeige von Python immer wieder eine Fehlermeldung angezeigt. :roll:

Kann mir jemand von Euch helfen? Ich habe leider keinen Background.

Wenn ich im Terminal Python eingebe, zeigt er mir immer Version 2.7.10 an, obwohl ich 3.7.2 für Mac installiert habe!

Es wäre super, wenn mir jemand helfen könnte, wo ich das Problem lösen kann.


Bild

Bild
Fehler bei installation instapy:
Bild

Leider komme ich trotz YT nicht weiter. Auf meinem Windows Rechner klappt die Installation, möchte es aber auf dem Mac haben.

Für Hilfe wäre ich echt dankbar, bin mit meinem Wissen am Ende. :|
Benutzeravatar
__blackjack__
User
Beiträge: 13073
Registriert: Samstag 2. Juni 2018, 10:21
Wohnort: 127.0.0.1
Kontaktdaten:

Python 3 heisst ``python3``. ``python`` ist Python 2. Man kann problemlos beide Versionen nebeneinander installiert haben.
„All religions are the same: religion is basically guilt, with different holidays.” — Cathy Ladman
bernddasbrot
User
Beiträge: 11
Registriert: Dienstag 12. März 2019, 07:59

Hallo. Danke für den Hinweis. Kannst du mir bezüglich des Fehlers helfen?
__deets__
User
Beiträge: 14523
Registriert: Mittwoch 14. Oktober 2015, 14:29

Du zeigst einen nutzlosen Ausschnitt. Bitte poste die gesamte Fehlermeldung inklusive der Kommandos, die du davor eingegeben hast.

Und du musst python3 verwenden, scheinst aber python zu schreiben. Das ist falsch, und das BlackJack das erwähnt IST Hilfestellung.
Benutzeravatar
sparrow
User
Beiträge: 4187
Registriert: Freitag 17. April 2009, 10:28

Laut Fehlermeldung hast du nicht die Berechtigung Pakete zu installieren.
Entweder musst du einen Account verwenden, der das darf, oder mit virtualenv eine entsprechende Umgebung einrichten.
__deets__
User
Beiträge: 14523
Registriert: Mittwoch 14. Oktober 2015, 14:29

@sparrow: er benutzt das falsche System Python 2.7. Da hinein möchte man auch mit sudo nichts installieren. Wenn das kaputt geht, ist ziemlich doof. Eigen installierte Python Versionen wie vom TE erwähnt 3.7.2 können problemlos mit normalen Userrechten beschrieben werden.
bernddasbrot
User
Beiträge: 11
Registriert: Dienstag 12. März 2019, 07:59

Genau. Python 3.7.2 habe ich installiert ohne Fehlermeldung jedoch wenn ich ins Terminal Python eingebe, zeigt er mir immer eine Version mit mit 2. Andere Benutzer auf meinem iMac gibt es nicht ich bin als Administrator angemeldet.
Benutzeravatar
__blackjack__
User
Beiträge: 13073
Registriert: Samstag 2. Juni 2018, 10:21
Wohnort: 127.0.0.1
Kontaktdaten:

@bernddasbrot: Nur noch mal zur Sicherheit: Du musst im Terminal python3 eingeben um Python 3 zu starten.
„All religions are the same: religion is basically guilt, with different holidays.” — Cathy Ladman
bernddasbrot
User
Beiträge: 11
Registriert: Dienstag 12. März 2019, 07:59

@_blackjack_

Super. Der Hinweis hat zimindest schon Python 3.7.2 in der Anzeige zum Anzeigen gebracht.
@_deets_

Anbei der komplette Screen vom Terminal.

Den Prozess starte ich über eine Datei, die bei Instapy dabei war. ( Instapy-quickstart-master )
https://github.com/timgrossmann/InstaPy

Kann es sein, das die entpackten Datein nicht auf dem Desktop liegen dürfen?
Kann es sein, das die vorgefertigte Installationsdatei nicht Python3 startet, sondern das ältere?




Last login: Tue Mar 12 15:18:45 on ttys000
iMac:~ myskyview$ /Users/myskyview/Desktop/instapy-quickstart-master/installation/MacOs/install.command ; exit;
/Users/myskyview/Desktop/instapy-quickstart-master/installation/MacOs/install.command: line 3: [: !=: unary operator expected
Python is installed
====================
Pip is installed
====================
Chrome is installed
====================
Installing InstaPy...
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Collecting instapy
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
Collecting grpcio>=1.16.1 (from instapy)
Using cached https://files.pythonhosted.org/packages ... x86_64.whl
Collecting idna>=2.7 (from instapy)
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
Collecting requests>=2.20.1 (from instapy)
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
Collecting EasyProcess>=0.2.3 (from instapy)
Collecting instapy-chromedriver (from instapy)
Collecting urllib3>=1.24.1 (from instapy)
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
Collecting emoji>=0.5.1 (from instapy)
Collecting certifi>=2018.10.15 (from instapy)
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
Collecting jsonschema>=2.6.0 (from instapy)
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
Collecting protobuf>=3.6.1 (from instapy)
Using cached https://files.pythonhosted.org/packages ... x86_64.whl
Collecting chardet>=3.0.4 (from instapy)
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
Collecting plyer>=1.3.1 (from instapy)
Collecting selenium>=3.141.0 (from instapy)
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
Collecting future>=0.17.1 (from instapy)
Collecting regex>=2018.11.22 (from instapy)
Collecting six>=1.11.0 (from instapy)
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
Collecting PyVirtualDisplay>=0.2.1 (from instapy)
Collecting configparser>=3.5.0 (from instapy)
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
Collecting PyYAML>=3.13 (from instapy)
Collecting MeaningCloud-python>=1.1.1 (from instapy)
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
Collecting clarifai>=2.4.1 (from instapy)
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
Collecting enum34>=1.0.4 (from grpcio>=1.16.1->instapy)
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
Collecting futures>=2.2.0 (from grpcio>=1.16.1->instapy)
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
Collecting functools32; python_version < "3" (from jsonschema>=2.6.0->instapy)
Collecting pyrsistent>=0.14.0 (from jsonschema>=2.6.0->instapy)
Collecting attrs>=17.4.0 (from jsonschema>=2.6.0->instapy)
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
Requirement already satisfied: setuptools in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from jsonschema>=2.6.0->instapy) (18.5)
Collecting googleapis-common-protos<2,>=1.5.0 (from clarifai>=2.4.1->instapy)
Collecting typing>=3.6 (from clarifai>=2.4.1->instapy)
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
clarifai 2.6.1 has requirement jsonschema<3,>=2.5, but you'll have jsonschema 3.0.1 which is incompatible.
Installing collected packages: enum34, futures, six, grpcio, idna, urllib3, certifi, chardet, requests, EasyProcess, instapy-chromedriver, emoji, functools32, pyrsistent, attrs, jsonschema, protobuf, plyer, selenium, future, regex, PyVirtualDisplay, configparser, PyYAML, MeaningCloud-python, googleapis-common-protos, typing, clarifai, instapy
Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/enum'
Consider using the `--user` option or check the permissions.

====================
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
There was a problem installing InstaPy, please copy the error message and create an issue here: https://github.com/InstaPy/instapy-quickstart/issues

You can also manually install InstaPy with this guide: https://github.com/timgrossmann/InstaPy

Sorry for the inconveniences
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
__deets__
User
Beiträge: 14523
Registriert: Mittwoch 14. Oktober 2015, 14:29

Du solltest einfach der Anweisung auf der Webseite folgen:

pip install instapy

Wobei in deinem Fall besser

python3 -mpip install instapy

um sicherzustellen, dass es das richtige pip ist.
bernddasbrot
User
Beiträge: 11
Registriert: Dienstag 12. März 2019, 07:59

@_deets_

Danke! Dein Befehl lief wie folgt durch:

Last login: Tue Mar 12 15:33:22 on ttys000
iMac:~ myskyview$ python3 -mpip install instapy
Collecting instapy
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
Collecting EasyProcess>=0.2.3 (from instapy)
Using cached https://files.pythonhosted.org/packages ... 2.5.tar.gz
Collecting PyVirtualDisplay>=0.2.1 (from instapy)
Using cached https://files.pythonhosted.org/packages ... 2.1.tar.gz
Collecting PyYAML>=3.13 (from instapy)
Using cached https://files.pythonhosted.org/packages ... .13.tar.gz
Collecting six>=1.11.0 (from instapy)
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
Collecting emoji>=0.5.1 (from instapy)
Downloading https://files.pythonhosted.org/packages ... ne-any.whl
Collecting future>=0.17.1 (from instapy)
Using cached https://files.pythonhosted.org/packages ... 7.1.tar.gz
Collecting requests>=2.20.1 (from instapy)
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
Collecting plyer>=1.3.1 (from instapy)
Downloading https://files.pythonhosted.org/packages ... ne-any.whl (131kB)
100% |████████████████████████████████| 133kB 939kB/s
Collecting jsonschema>=2.6.0 (from instapy)
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
Collecting protobuf>=3.6.1 (from instapy)
Downloading https://files.pythonhosted.org/packages ... x86_64.whl (1.3MB)
100% |████████████████████████████████| 1.3MB 990kB/s
Collecting MeaningCloud-python>=1.1.1 (from instapy)
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
Collecting regex>=2018.11.22 (from instapy)
Using cached https://files.pythonhosted.org/packages ... .12.tar.gz
Collecting grpcio>=1.16.1 (from instapy)
Downloading https://files.pythonhosted.org/packages ... x86_64.whl (1.8MB)
100% |████████████████████████████████| 1.8MB 943kB/s
Collecting configparser>=3.5.0 (from instapy)
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
Collecting selenium>=3.141.0 (from instapy)
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
Collecting instapy-chromedriver (from instapy)
Downloading https://files.pythonhosted.org/packages ... ne-any.whl (17.1MB)
100% |████████████████████████████████| 17.1MB 632kB/s
Collecting clarifai>=2.4.1 (from instapy)
Downloading https://files.pythonhosted.org/packages ... 6.1.tar.gz (123kB)
100% |████████████████████████████████| 133kB 1.9MB/s
Requirement already satisfied: certifi>=2018.10.15 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from instapy) (2019.3.9)
Collecting chardet>=3.0.4 (from instapy)
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
Collecting urllib3>=1.24.1 (from instapy)
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
Collecting idna>=2.7 (from instapy)
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
Collecting pyrsistent>=0.14.0 (from jsonschema>=2.6.0->instapy)
Using cached https://files.pythonhosted.org/packages ... .11.tar.gz
Collecting attrs>=17.4.0 (from jsonschema>=2.6.0->instapy)
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
Requirement already satisfied: setuptools in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from jsonschema>=2.6.0->instapy) (40.6.2)
Collecting googleapis-common-protos<2,>=1.5.0 (from clarifai>=2.4.1->instapy)
Using cached https://files.pythonhosted.org/packages ... 5.8.tar.gz
clarifai 2.6.1 has requirement jsonschema<3,>=2.5, but you'll have jsonschema 3.0.1 which is incompatible.
Installing collected packages: EasyProcess, PyVirtualDisplay, PyYAML, six, emoji, future, idna, urllib3, chardet, requests, plyer, pyrsistent, attrs, jsonschema, protobuf, MeaningCloud-python, regex, grpcio, configparser, selenium, instapy-chromedriver, googleapis-common-protos, clarifai, instapy
Running setup.py install for EasyProcess ... done
Running setup.py install for PyVirtualDisplay ... done
Running setup.py install for PyYAML ... done
Running setup.py install for future ... done
Running setup.py install for pyrsistent ... done
Running setup.py install for regex ... done
Running setup.py install for googleapis-common-protos ... done
Running setup.py install for clarifai ... done
Successfully installed EasyProcess-0.2.5 MeaningCloud-python-1.1.1 PyVirtualDisplay-0.2.1 PyYAML-3.13 attrs-19.1.0 chardet-3.0.4 clarifai-2.6.1 configparser-3.7.3 emoji-0.5.1 future-0.17.1 googleapis-common-protos-1.5.8 grpcio-1.19.0 idna-2.8 instapy-0.3.2 instapy-chromedriver-2.46 jsonschema-3.0.1 plyer-1.4.0 protobuf-3.7.0 pyrsistent-0.14.11 regex-2019.3.12 requests-2.21.0 selenium-3.141.0 six-1.12.0 urllib3-1.24.1
You are using pip version 18.1, however version 19.0.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
iMac:~ myskyview$



----

Wenn ich nun die Installation nochmals durchführe, kommt leider derselbe Fehler:

Last login: Tue Mar 12 16:35:52 on ttys001
iMac:~ myskyview$ /Users/myskyview/Desktop/instapy-quickstart-master/installation/MacOs/install.command ; exit;
/Users/myskyview/Desktop/instapy-quickstart-master/installation/MacOs/install.command: line 3: [: !=: unary operator expected
Python is installed
====================
Pip is installed
====================
Chrome is installed
====================
Installing InstaPy...
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Collecting instapy
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
Collecting grpcio>=1.16.1 (from instapy)
Using cached https://files.pythonhosted.org/packages ... x86_64.whl
Collecting idna>=2.7 (from instapy)
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
Collecting requests>=2.20.1 (from instapy)
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
Collecting EasyProcess>=0.2.3 (from instapy)
Collecting instapy-chromedriver (from instapy)
Collecting urllib3>=1.24.1 (from instapy)
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
Collecting emoji>=0.5.1 (from instapy)
Collecting certifi>=2018.10.15 (from instapy)
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
Collecting jsonschema>=2.6.0 (from instapy)
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
Collecting protobuf>=3.6.1 (from instapy)
Using cached https://files.pythonhosted.org/packages ... x86_64.whl
Collecting chardet>=3.0.4 (from instapy)
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
Collecting plyer>=1.3.1 (from instapy)
Collecting selenium>=3.141.0 (from instapy)
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
Collecting future>=0.17.1 (from instapy)
Collecting regex>=2018.11.22 (from instapy)
Collecting six>=1.11.0 (from instapy)
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
Collecting PyVirtualDisplay>=0.2.1 (from instapy)
Collecting configparser>=3.5.0 (from instapy)
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
Collecting PyYAML>=3.13 (from instapy)
Collecting MeaningCloud-python>=1.1.1 (from instapy)
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
Collecting clarifai>=2.4.1 (from instapy)
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
Collecting enum34>=1.0.4 (from grpcio>=1.16.1->instapy)
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
Collecting futures>=2.2.0 (from grpcio>=1.16.1->instapy)
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
Collecting functools32; python_version < "3" (from jsonschema>=2.6.0->instapy)
Collecting pyrsistent>=0.14.0 (from jsonschema>=2.6.0->instapy)
Collecting attrs>=17.4.0 (from jsonschema>=2.6.0->instapy)
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
Requirement already satisfied: setuptools in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from jsonschema>=2.6.0->instapy) (18.5)
Collecting googleapis-common-protos<2,>=1.5.0 (from clarifai>=2.4.1->instapy)
Collecting typing>=3.6 (from clarifai>=2.4.1->instapy)
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
clarifai 2.6.1 has requirement jsonschema<3,>=2.5, but you'll have jsonschema 3.0.1 which is incompatible.
Installing collected packages: enum34, futures, six, grpcio, idna, urllib3, certifi, chardet, requests, EasyProcess, instapy-chromedriver, emoji, functools32, pyrsistent, attrs, jsonschema, protobuf, plyer, selenium, future, regex, PyVirtualDisplay, configparser, PyYAML, MeaningCloud-python, googleapis-common-protos, typing, clarifai, instapy
Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/enum'
Consider using the `--user` option or check the permissions.

====================
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
There was a problem installing InstaPy, please copy the error message and create an issue here: https://github.com/InstaPy/instapy-quickstart/issues

You can also manually install InstaPy with this guide: https://github.com/timgrossmann/InstaPy

Sorry for the inconveniences
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.

[Prozess beendet]
Benutzeravatar
__blackjack__
User
Beiträge: 13073
Registriert: Samstag 2. Juni 2018, 10:21
Wohnort: 127.0.0.1
Kontaktdaten:

@bernddasbrot: Du hast es doch erfolgreich installiert, warum startest Du dann die nicht-funktionierende Installation noch einmal?
„All religions are the same: religion is basically guilt, with different holidays.” — Cathy Ladman
bernddasbrot
User
Beiträge: 11
Registriert: Dienstag 12. März 2019, 07:59

Aber da ist doch ein Fehler in der Installation:

Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/enum'
Consider using the `--user` option or check the permissions.

There was a problem installing InstaPy, please copy the error message and create an issue here:

Oder wieso soll ich den Fehler einfach stehen lassen?

Wenn ich dann Instapy starten will, kommt folgender Hinweis / Fehler und er bricht ab:

Last login: Tue Mar 12 16:48:13 on ttys000
iMac:~ myskyview$ /Users/myskyview/Desktop/instapy-quickstart-master/run/mac_start.command ; exit;
Starting InstaPy with quickstart
====================
Traceback (most recent call last):
File "../quickstart.py", line 21, in <module>
from instapy import InstaPy
ImportError: No module named instapy
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.

[Prozess beendet]

Er findet einfach Instapy nicht. Die Anleitung kann ich lesen und befolgen. Auf Windows läuft es ja einwandfrei bei mir.

Und in der quickstart.py steht ab Zeile 20-23 folgendes:

# imports
from instapy import InstaPy
from instapy import smart_run
Sirius3
User
Beiträge: 17738
Registriert: Sonntag 21. Oktober 2012, 17:20

@bernddasbrot: ja aber warum versuchst Du instapy nochmal für Python2.7 zu installieren, wenn es doch für Python3 schon funktioniert hat????

Du mußt nur noch Instapy auch mit Python3 benutzen.
Zuletzt geändert von Sirius3 am Dienstag 12. März 2019, 16:53, insgesamt 1-mal geändert.
__deets__
User
Beiträge: 14523
Registriert: Mittwoch 14. Oktober 2015, 14:29

Der erste Befehl, den ich dir genannt habe, der installiert instapy. Warum glaubst du noch einen Befehl danach zu benoetigen?
bernddasbrot
User
Beiträge: 11
Registriert: Dienstag 12. März 2019, 07:59

Weil ich dachte, das die Installation nicht komplett durchgelaufen ist.
Aber nichtsdestotrotz findet er beim starten Instapy leider nicht. Deshalb dachte ich eben, das es an der Installation liegt.

Bin mit meinem Latein echt am Ende... :| :evil:
Benutzeravatar
__blackjack__
User
Beiträge: 13073
Registriert: Samstag 2. Juni 2018, 10:21
Wohnort: 127.0.0.1
Kontaktdaten:

@bernddasbrot: Der Fehler kommt doch vom nicht-funktionierenden Installskript und da steht ja auch recht deutlich drin, dass das für Python 2.7 gemacht wird. Dafür willst Du das doch gar nicht installieren.

Und bei dem Quickstart-Skript vermute ich mal, dass das auch wieder versucht das falsche Python zu verwenden. Wobei das ja auch wieder etwas anderes ist als das was in der Dokumentation steht, wo ein `quickstart.py`-Programm ausgeführt wird. Da wo in der Dokumentation python steht, müsstest Du wieder python3 schreiben.
„All religions are the same: religion is basically guilt, with different holidays.” — Cathy Ladman
__deets__
User
Beiträge: 14523
Registriert: Mittwoch 14. Oktober 2015, 14:29

Was passiert, wenn du

Code: Alles auswählen

python3 -c "from instapy import InstaPy; print(InstaPy)"
eingibst?
bernddasbrot
User
Beiträge: 11
Registriert: Dienstag 12. März 2019, 07:59

Folgendes:

Last login: Tue Mar 12 16:48:57 on ttys000
iMac:~ myskyview$ python3 -c "from instapy import InstaPy; print(InstaPy)"
<class 'instapy.instapy.InstaPy'>
iMac:~ myskyview$

@_blackjack_

Hier der Inhalt von der Datei: Nichts zu finden!

"""
This template is written by @cormo1990

What does this quickstart script aim to do?
- Basic follow/unfollow activity.

NOTES:
- I don't want to automate comment and too much likes because I want to do
this only for post that I really like the content so at the moment I only
use the function follow/unfollow.
- I use two files "quickstart", one for follow and one for unfollow.
- I noticed that the most important thing is that the account from where I
get followers has similar contents to mine in order to be sure that my
content could be appreciated. After the following step, I start unfollowing
the user that don't followed me back.
- At the end I clean my account unfollowing all the users followed with
InstaPy.
"""

# imports
from instapy import InstaPy
from instapy import smart_run

# login credentials
insta_username = '0000000'
insta_password = 'XXXXXXXXX'

# get an InstaPy session!
# set headless_browser=True to run InstaPy in the background
session = InstaPy(username=insta_username,
password=insta_password,
headless_browser=False)

with smart_run(session):
""" Activity flow """
# general settings
session.set_relationship_bounds(enabled=True,
delimit_by_numbers=True,
max_followers=4590,
min_followers=45,
min_following=77)

session.set_dont_include(["friend1", "friend2", "friend3"])
session.set_dont_like(["pizza", "#store"])

# activities

""" Massive Follow of users followers (I suggest to follow not less than
3500/4000 users for better results)...
"""
session.follow_user_followers(['user1', 'user2', 'user3'], amount=800,
randomize=False, interact=False)

""" First step of Unfollow action - Unfollow not follower users...
"""
session.unfollow_users(amount=500, InstapyFollowed=(True, "nonfollowers"),
style="FIFO",
unfollow_after=12 * 60 * 60, sleep_delay=601)

""" Second step of Massive Follow...
"""
session.follow_user_followers(['user1', 'user2', 'user3'], amount=800,
randomize=False, interact=False)

""" Second step of Unfollow action - Unfollow not follower users...
"""
session.unfollow_users(amount=500, InstapyFollowed=(True, "nonfollowers"),
style="FIFO",
unfollow_after=12 * 60 * 60, sleep_delay=601)

""" Clean all followed user - Unfollow all users followed by InstaPy...
"""
session.unfollow_users(amount=500, InstapyFollowed=(True, "all"),
style="FIFO", unfollow_after=24 * 60 * 60,
sleep_delay=601)
__deets__
User
Beiträge: 14523
Registriert: Mittwoch 14. Oktober 2015, 14:29

@bernddasbrot: instaPy ist installiert, fuer Python 3. Damit ist das abgeschlossen, das ist durch diese Zeile die du ausgefuehrt hast belegt.

Selbstverstaendlich musst du auch Python 3 benutzen, wenn du irgendwelche Skripte damit ausfuehren willst. Wo immer du "python" schreibst, WIRD ES NICHT FUNKTIONIEREN. Das galt fuer die Installation, und das gilt auch fuer das ausfuehren irgendwelcher Skripte.
Antworten