I have been writing a shell script to be run in a CentOS 7 Docker container in order to create an AppImage. In this script I would like to run the Shell command pip install -U spyder
from within a Python virtual environment (started by running source AppDir/usr/bin/activate
) started by the shell script. The problem is that I don't know how to do this because lines in the script after the source AppDir/usr/bin/activate
line are ignored (as at this point in the script, the shell has entered the Python virtual environment). So is there some option I need to pass the source AppDir/usr/bin/activate
command so that it will run the pip install -U spyder
command in this Python virtual environment?
You can install your requirement without activating virtual environment, but with providing full path to your virtualenv pip
.
<path_to_virtualenv>/bin/pip install -U spyder
Because what activate
is doing it's putting your virtualenv bin/
folder before the PATH
, so that pip
, python
commands would be references to your viartualenv's before global ones. From source of activate
:
VIRTUAL_ENV="<path_to_env>"
export VIRTUAL_ENV
_OLD_VIRTUAL_PATH="$PATH"
PATH="$VIRTUAL_ENV/bin:$PATH"
export PATH
I'm not able to pass the state value to the method or function in React [closed]
How to access array index of Cloud Firestore using query in Flutter?
Getting an unwanted space between Nav Items in Navbar Angular
PHP Script INSERT INTO SELECT does not insert, with no errors [closed]
SQL query to select students who have taken all subjects from subjects table
Displaying Dynamic placeholder content on Textbox in ReactJS
Extracting Parameters from Redirect URI - QuickBooks API / Python
Using the Python test code below I am trying to copy three single worksheet Excel files into a single new Excel file with three worksheets named the same as the original files
I have a huge file(50,000 row) with 2 columns(id and name)One id can have different names but I am only looking for specific names and their ids
I have a xml data, having multiple rows and I wan't certain processing on each rowBut I was having trouble in fetching each row with tags <Row> to </Row>
I started using a very basic Deep Belief Network in Nodejs but it wasn't fast enough