4: Create A Virtualenv(Challenge: Working with the Command Line)

    xiaoxiao2022-06-28  35

    You'll want to isolate the Python environment that your script is in by creating a virtual environment. This will allow you to install Python packages with the versions that the script expects.

    Instructions

    Create a Python 3 virtualenv called script.

    Activate the script virtualenv. /home/dq$ virtualenv -p /usr/bin/python3 script                                  Running virtualenv with interpreter /usr/bin/python3                             Using base prefix '/usr'                                                         New python executable in /home/dq/script/bin/python3                             Also creating executable in /home/dq/script/bin/python                           Installing setuptools, pip, wheel...                                                 /home/dq$ source script/bin/activate                                             (script) /home/dq$ source script/bin/activate 

    转载请注明原文地址: https://ju.6miu.com/read-1124308.html

    最新回复(0)