Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9134263
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:37:45+00:00 2026-06-17T08:37:45+00:00

When I want to work on a virtual environment with virtualenv(1.8.2) and virtualenvwrapper(3.6) I

  • 0

When I want to work on a virtual environment with virtualenv(1.8.2) and virtualenvwrapper(3.6) I just run workon my_project. I am however unable to execute a command from a virtual environment using crontab or gnome-terminal:

Examples:

* * * * * workon my_project && python task.py

This is’nt executed. (The task writes to a file)

or

gnome-terminal --tab -e "bash -c \"workon my_project;python task.py;exec bash\""
This just shows bash: workon: command not found and then executes the program from the system environment. Check here for more info about this command.

Edit

@Zaar Hai: To initiate virtualenvwrapper this in my /home/myusername/.bashrc:

export WORKON_HOME=~/.virtualenvs
source /usr/local/bin/virtualenvwrapper.sh
export PIP_VIRTUALENV_BASE=$WORKON_HOME
export PIP_RESPECT_VIRTUALENV=true

So I tried this command:

gnome-terminal --tab -e "bash -c \"export WORKON_HOME=~/.virtualenvs;source /usr/local/bin/virtualenvwrapper.sh;export PIP_VIRTUALENV_BASE=$WORKON_HOME;export PIP_RESPECT_VIRTUALENV=true;source /home/myusername/.virtualenvs/my_project/bin/activate;exec bash\""

But I still get that same output as I posted in your comment.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T08:37:46+00:00Added an answer on June 17, 2026 at 8:37 am

    Through crontab:

    0 10 * * * env -i bash -c 'export WORKON_HOME=~/.virtualenvs && source /usr/local/bin/virtualenvwrapper.sh && workon my_project && python task.py'
    

    Through gnome terminal:

    gnome-terminal --tab -e 'bash -c "export WORKON_HOME=~/.virtualenvs && source /usr/local/bin/virtualenvwrapper.sh && workon my_project && python task.py " '
    

    Better of all just create a runme.sh script:

    #/bin/sh
    set -e
    export WORKON_HOME=~/.virtualenvs
    source /usr/local/bin/virtualenvwrapper.sh
    workon my_project
    exec python task.py
    

    And run this script through gnome terminal / crontab.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This question comes from: C++11 thread doesn't work with virtual member function As suggested
I want to work with a file-based database using apache derby. I was wondering
I want to work with PE files in Perl and didn't find a module,
I want to work on the Rijndael algorithm using C#. Can anybody help me
I want to work on intelliJ on my webapps and I don't know how
The code I want to work: $.ajax({ type: POST, url: _Source/ajap/ajap.nlSrch.php, data: { sndJson
If I want to work with an object and leverage LINQ to SQL what
Hi I want to work around a 'bug' in certain RSS-feeds , which use
Me and my friend want to work on a code together at the same
I have a an query that I want to work on so I formatted

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.