0

I am trying to develop a kik chatbot with Python.

I am using Pycharm as my IDE.

Here is what I began with:

from flask import Flask, request, Response
from kik import kikapi

But I keep getting and error, "unresolved reference.." on the "import..." why is this? I've installed both through

pip install --user <package name>

Thanks

Using a Mac:

SCREEN enter image description here

SCREN 2: enter image description here

Pedro del Sol
  • 2,840
  • 9
  • 39
  • 52
DamnPython
  • 59
  • 4
  • It will be helpful if you can post screenshots. Also, you have not mentioned you dev env, is it Windows / Linux / Mac ? Please do that, otherwise it is difficult to guess what could be wrong. – CyprUS Oct 23 '16 at 03:06
  • @CyprUS, sorry, mac – DamnPython Oct 23 '16 at 03:07
  • Can you post screenshot ? I don't use Mac, but screenshots attract attention. Do you need to add the python path somewhere ? – CyprUS Oct 23 '16 at 03:09
  • Have a look at http://stackoverflow.com/questions/1213690/what-is-the-most-compatible-way-to-install-python-modules-on-a-mac/ – CyprUS Oct 23 '16 at 03:10
  • @CyprUS it still says the same exact thing. I;ll post a screnshot – DamnPython Oct 23 '16 at 03:17
  • In the screenshot I see you are trying to install pip through easy_install. Actually, both pip and easy_install are tools to manage package installation. Can you post which package exactly is missing. – CyprUS Oct 23 '16 at 03:23
  • I have no clue. – DamnPython Oct 23 '16 at 03:27
  • @CyprUS, I am dissapointed with Python. Java is much easier to use than this mess. – DamnPython Oct 23 '16 at 03:27
  • Also, did try using a virtualenv ? Using a virtualenv is pretty standard way to not pollute your dev environment with thousand different packages. – CyprUS Oct 23 '16 at 03:27
  • Do you really want to give up so easily ? Being a coder REQUIRES you to be patient. – CyprUS Oct 23 '16 at 03:30

1 Answers1

0

I am not sure about Mac setup. But I use virtualenv to workaround any package-mess which I sometimes get into.

Referring to this excellent python doc link , I present the following steps to create a virtualenv for ease of use.

NOTE : I dont know PyCharms, I use terminal always to work on PY.

I ran all of this on terminal.

pip install virtualenv --> installs virtualenv package
cd <proj-directory>
virtualenv venv -->creates a virtual environment by the name venv
source venv/bin/activate --> activates the virtual environment
pip install kik
deactivate --> come out of the virtual environment

NOTE :

  1. Doing your project on virtualenv has several advantages, primarily being that you shield your other projects from any version dependencies.
  2. Activate your virtual environment everytime you want to work on that particular project, and deactivate it when you are done.
CyprUS
  • 4,159
  • 9
  • 48
  • 93