0

I want to incorporate an instabot in my code.

I downloaded Instabot and installed it through the Windows' command prompt pip install -U instabot as Spyder didn't recognize my user: C:\Users\(My Name) is not recognised as an internal or external command or external command, an excutable program or a command file.

While installing it through the Windows' command prompt, I realised I didn't even have Python installed. So I did installed Python along with pip, and then could actually finalise installing Instabot. I also manually added the Python directory in the system environment so the command prompt could find it, as installing Python was not enough for using it in the command prompt.

The actual problem is located at the first line, so I really don't need to share more of my code I think:

from instabot import Bot
> ImportError: cannot import name 'Bot' from 'instabot' (unknown location)

Now, I have a hint this is a directory/library problem but I don't know where it is in Spyder. I saved instabot in the same directory as my Python project.

EDIT: I have a breakthrough! As I'm using Spyder through Anaconda, I shouldn't use pip as a command but rather conda. Else "it will break my installation" in the words of Spyder itself.

3
  • Did you try pip install instabot Commented Feb 9 at 18:22
  • yes but i still have this C:\Users\(My Name) is not recognised as an internal or external command or external command, an excutable program or a command file. Commented Feb 12 at 9:00
  • Please post a solution as an answer, not as an appendix to the question. Commented Feb 12 at 11:04

1 Answer 1

0

It is highly recommended that you use virtual environments when installing packages as it helps you manage specific version requirements of your project packages in an isolated environment.

Assuming you have python correctly installed (run py or python in your Windows terminal to verify), You can run python -m pip install instabot in an active virtual environment to install instabot.

However note that it's stable release supports Python 2.7, and 3.5 - 3.7 and its GitHub repository has been archived and is now read-only. See https://github.com/ohld/igbot

Sign up to request clarification or add additional context in comments.

3 Comments

Python is correctly installed, tho I have the 3.13 version, said the latest on their website, so what is these 3.5 and 3.7? Moreover, I don't quite get what is -m, nor -U? My guess is that it's a cue to replace it with a path but to what?
yes the latest release of python is 3.13 but the package you need (instabot) doesn't support that. look at the instabot link and see what it says.
I also recommend reading pip install doc to understand what those flags mean.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.