LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-03-2021, 05:46 AM   #1
vivo_111166
LQ Newbie
 
Registered: Nov 2021
Posts: 2

Rep: Reputation: Disabled
How to get rid of the prefix (venv) after activating virtual environment?


I have generated a virtual environment:

>>>virtualenv venv -p /usr/bin/python3

And activated it:

>>>source venv/bin/activate

And then the prompt of the terminal becomes:

(venv) >>>

Is there a way to remain activated but getting rid of the (venv) prefix?

Thanks!
 
Old 11-03-2021, 05:50 AM   #2
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,578

Rep: Reputation: Disabled
From the python man page:
Quote:
In interactive mode, the primary prompt is `>>>'; the second prompt (which appears when a command is not complete) is `...'. The prompts can be changed by assignment to sys.ps1 or sys.ps2.
 
Old 11-03-2021, 05:56 AM   #3
vivo_111166
LQ Newbie
 
Registered: Nov 2021
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thanks Shruggy!

I'm not sure, though, that I figured it out:

What does it mean the "command is not complete"?

And how can I change the prompt by assignment to sys.ps1? What/where is sys.ps1?

Thanks!
 
Old 11-03-2021, 06:20 AM   #4
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,578

Rep: Reputation: Disabled
Code:
>>> import sys
>>> sys.ps1="my cool prompt> "
my cool prompt>
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Set up Virtual Box on top of Server F35 (pre release) via rpmfusion (VENV) LXer Syndicated Linux News 0 09-19-2021 12:28 PM
LXer: How to create virtual environments in Python 3 with venv module LXer Syndicated Linux News 0 03-23-2021 04:56 AM
Setting up venv on a linux box: how to get rid of the dependencies-hell rincon Linux - Newbie 1 04-02-2020 03:20 PM
wide-dhcpv6 - trying to obtain /60 prefix, "invalid prefix" psycroptic Linux - Server 3 05-26-2014 08:31 AM
difference b/w AF_ prefix and PF_ prefix related to socket Ashok_mittal Linux - Newbie 1 03-20-2008 04:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration