ImportError: No module named gevent












2














I am new to the Python application development in Ubuntu.



I would try to be concise but please forgive and ask me if my explanations are too unclear to understand. I would be appreciated for your answers.



1- I have created a virtual environment for a project using "virtualenv" command called cyoa.



2- PostGres DB is installed and I have created username and password to connect to the database.



3- The environment variable is like follow:



#!/bin/bash
export DEBUG=False
export SECRET_KEY='supersecretproductionkeyforapp'
export DATABASE_URL='postgres://username:password@localhost/cyoa'

# Redis settings
export REDIS_SERVER='localhost'
export REDIS_PORT='6379'
export REDIS_DB='1'

# Twilio settings

export TWILIO_ACCOUNT_SID=''
export TWILIO_AUTH_TOKEN=''
export TWILIO_NUMBER=''

# Celery

export CELERY_BROKER_URL='redis://localhost:6379/0'
export CELERY_RESULT_BACKEND='redis://localhost:6379/0'


4- When I activate the virtual environment and try to run the following script



(cyoa)$ python manage.py syncdb


First lines of the manage script (which error is related to):



from gevent import monkey
monkey.patch_all()

import os
import redis


I get the following error:



Traceback (most recent call last):
File "manage.py", line 1, in <module>
from gevent import monkey
ImportError: No module named gevent


gevent final version is installed using the command:



sudo pip install gevent 


Do not know why I am reciving this error.










share|improve this question




















  • 1




    Have you installed the script in the virtualenv as well?
    – grooveplex
    Oct 12 '16 at 12:45






  • 2




    Don't use sudo pip inside a virtual environment. Just activate the virtual environment and use pip install gevent
    – Timo
    Oct 13 '16 at 8:18










  • Thanks Grooveplex and Timo I have used only pip in the virtual environment and it is working.
    – user3041025
    Oct 14 '16 at 7:18
















2














I am new to the Python application development in Ubuntu.



I would try to be concise but please forgive and ask me if my explanations are too unclear to understand. I would be appreciated for your answers.



1- I have created a virtual environment for a project using "virtualenv" command called cyoa.



2- PostGres DB is installed and I have created username and password to connect to the database.



3- The environment variable is like follow:



#!/bin/bash
export DEBUG=False
export SECRET_KEY='supersecretproductionkeyforapp'
export DATABASE_URL='postgres://username:password@localhost/cyoa'

# Redis settings
export REDIS_SERVER='localhost'
export REDIS_PORT='6379'
export REDIS_DB='1'

# Twilio settings

export TWILIO_ACCOUNT_SID=''
export TWILIO_AUTH_TOKEN=''
export TWILIO_NUMBER=''

# Celery

export CELERY_BROKER_URL='redis://localhost:6379/0'
export CELERY_RESULT_BACKEND='redis://localhost:6379/0'


4- When I activate the virtual environment and try to run the following script



(cyoa)$ python manage.py syncdb


First lines of the manage script (which error is related to):



from gevent import monkey
monkey.patch_all()

import os
import redis


I get the following error:



Traceback (most recent call last):
File "manage.py", line 1, in <module>
from gevent import monkey
ImportError: No module named gevent


gevent final version is installed using the command:



sudo pip install gevent 


Do not know why I am reciving this error.










share|improve this question




















  • 1




    Have you installed the script in the virtualenv as well?
    – grooveplex
    Oct 12 '16 at 12:45






  • 2




    Don't use sudo pip inside a virtual environment. Just activate the virtual environment and use pip install gevent
    – Timo
    Oct 13 '16 at 8:18










  • Thanks Grooveplex and Timo I have used only pip in the virtual environment and it is working.
    – user3041025
    Oct 14 '16 at 7:18














2












2








2







I am new to the Python application development in Ubuntu.



I would try to be concise but please forgive and ask me if my explanations are too unclear to understand. I would be appreciated for your answers.



1- I have created a virtual environment for a project using "virtualenv" command called cyoa.



2- PostGres DB is installed and I have created username and password to connect to the database.



3- The environment variable is like follow:



#!/bin/bash
export DEBUG=False
export SECRET_KEY='supersecretproductionkeyforapp'
export DATABASE_URL='postgres://username:password@localhost/cyoa'

# Redis settings
export REDIS_SERVER='localhost'
export REDIS_PORT='6379'
export REDIS_DB='1'

# Twilio settings

export TWILIO_ACCOUNT_SID=''
export TWILIO_AUTH_TOKEN=''
export TWILIO_NUMBER=''

# Celery

export CELERY_BROKER_URL='redis://localhost:6379/0'
export CELERY_RESULT_BACKEND='redis://localhost:6379/0'


4- When I activate the virtual environment and try to run the following script



(cyoa)$ python manage.py syncdb


First lines of the manage script (which error is related to):



from gevent import monkey
monkey.patch_all()

import os
import redis


I get the following error:



Traceback (most recent call last):
File "manage.py", line 1, in <module>
from gevent import monkey
ImportError: No module named gevent


gevent final version is installed using the command:



sudo pip install gevent 


Do not know why I am reciving this error.










share|improve this question















I am new to the Python application development in Ubuntu.



I would try to be concise but please forgive and ask me if my explanations are too unclear to understand. I would be appreciated for your answers.



1- I have created a virtual environment for a project using "virtualenv" command called cyoa.



2- PostGres DB is installed and I have created username and password to connect to the database.



3- The environment variable is like follow:



#!/bin/bash
export DEBUG=False
export SECRET_KEY='supersecretproductionkeyforapp'
export DATABASE_URL='postgres://username:password@localhost/cyoa'

# Redis settings
export REDIS_SERVER='localhost'
export REDIS_PORT='6379'
export REDIS_DB='1'

# Twilio settings

export TWILIO_ACCOUNT_SID=''
export TWILIO_AUTH_TOKEN=''
export TWILIO_NUMBER=''

# Celery

export CELERY_BROKER_URL='redis://localhost:6379/0'
export CELERY_RESULT_BACKEND='redis://localhost:6379/0'


4- When I activate the virtual environment and try to run the following script



(cyoa)$ python manage.py syncdb


First lines of the manage script (which error is related to):



from gevent import monkey
monkey.patch_all()

import os
import redis


I get the following error:



Traceback (most recent call last):
File "manage.py", line 1, in <module>
from gevent import monkey
ImportError: No module named gevent


gevent final version is installed using the command:



sudo pip install gevent 


Do not know why I am reciving this error.







python postgresql






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 19 '18 at 6:46









souravc

26.6k1375105




26.6k1375105










asked Oct 12 '16 at 11:12









user3041025

1112




1112








  • 1




    Have you installed the script in the virtualenv as well?
    – grooveplex
    Oct 12 '16 at 12:45






  • 2




    Don't use sudo pip inside a virtual environment. Just activate the virtual environment and use pip install gevent
    – Timo
    Oct 13 '16 at 8:18










  • Thanks Grooveplex and Timo I have used only pip in the virtual environment and it is working.
    – user3041025
    Oct 14 '16 at 7:18














  • 1




    Have you installed the script in the virtualenv as well?
    – grooveplex
    Oct 12 '16 at 12:45






  • 2




    Don't use sudo pip inside a virtual environment. Just activate the virtual environment and use pip install gevent
    – Timo
    Oct 13 '16 at 8:18










  • Thanks Grooveplex and Timo I have used only pip in the virtual environment and it is working.
    – user3041025
    Oct 14 '16 at 7:18








1




1




Have you installed the script in the virtualenv as well?
– grooveplex
Oct 12 '16 at 12:45




Have you installed the script in the virtualenv as well?
– grooveplex
Oct 12 '16 at 12:45




2




2




Don't use sudo pip inside a virtual environment. Just activate the virtual environment and use pip install gevent
– Timo
Oct 13 '16 at 8:18




Don't use sudo pip inside a virtual environment. Just activate the virtual environment and use pip install gevent
– Timo
Oct 13 '16 at 8:18












Thanks Grooveplex and Timo I have used only pip in the virtual environment and it is working.
– user3041025
Oct 14 '16 at 7:18




Thanks Grooveplex and Timo I have used only pip in the virtual environment and it is working.
– user3041025
Oct 14 '16 at 7:18










1 Answer
1






active

oldest

votes


















0














You may try to install gevent using the following command



sudo apt-get install python-gevent python-gevent-websocket


It will install python-gevent and python-gevent-websocket packages with dependencies python-gevent-dbg and documentation python-gevent-doc.






share|improve this answer























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "89"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f836029%2fimporterror-no-module-named-gevent%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    You may try to install gevent using the following command



    sudo apt-get install python-gevent python-gevent-websocket


    It will install python-gevent and python-gevent-websocket packages with dependencies python-gevent-dbg and documentation python-gevent-doc.






    share|improve this answer




























      0














      You may try to install gevent using the following command



      sudo apt-get install python-gevent python-gevent-websocket


      It will install python-gevent and python-gevent-websocket packages with dependencies python-gevent-dbg and documentation python-gevent-doc.






      share|improve this answer


























        0












        0








        0






        You may try to install gevent using the following command



        sudo apt-get install python-gevent python-gevent-websocket


        It will install python-gevent and python-gevent-websocket packages with dependencies python-gevent-dbg and documentation python-gevent-doc.






        share|improve this answer














        You may try to install gevent using the following command



        sudo apt-get install python-gevent python-gevent-websocket


        It will install python-gevent and python-gevent-websocket packages with dependencies python-gevent-dbg and documentation python-gevent-doc.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Jan 19 '18 at 6:41









        souravc

        26.6k1375105




        26.6k1375105










        answered Jan 19 '18 at 0:56









        16851556

        166




        166






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Ask Ubuntu!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f836029%2fimporterror-no-module-named-gevent%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Human spaceflight

            Can not write log (Is /dev/pts mounted?) - openpty in Ubuntu-on-Windows?

            張江高科駅