Welcome to Centmin Mod Community
Become a Member

Install Python 3.7 & /home/.ccache folder

Discussion in 'Install & Upgrades or Pre-Install Questions' started by yunos, Mar 30, 2020.

  1. yunos

    yunos Member

    102
    3
    18
    Aug 8, 2015
    Ratings:
    +12
    Local Time:
    1:42 AM
    1.8.0
    When i install python dependenceies from /home/username1
    it usually result in installation error due to permission denied as it tries to install it from /home/.ccache as its root user ownership

    is it anyway to install the temporary files on /home/username/.ccache instead?
     
  2. eva2000

    eva2000 Administrator Staff Member

    44,173
    10,067
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,560
    Local Time:
    9:42 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    You'd have to ask the python dev/author. /home/.ccache is for ccache cache directory for compiler caching https://ccache.dev/ and not for any python dependency installs

    or do you mean GCC compiler for python dependencies gives error related ccache ?

    In that case disable ccache compiler caching from SSH session's command line via
    Code (Text):
    export CC='gcc'

    then run your python installation
     
  3. yunos

    yunos Member

    102
    3
    18
    Aug 8, 2015
    Ratings:
    +12
    Local Time:
    1:42 AM
    1.8.0
    When i do pip3.7 install i always get the error when it get permission denied issue on /home/.ccache folder and im not sure if its the gcc compiler you are referring to


    Code:
    ✔ Successfully created virtual environment!
    Virtualenv location: /home/yunos/.local/share/virtualenvs/logviewer-eTR9VQMa
    Installing dependencies from Pipfile.lock (d10bce)…
    An error occurred while installing httptools==0.0.13 --hash=sha256:e00cbd7ba01ff748e494248183abc6e153f49181169d8a3d41bb49132ca01dfc! Will try again.
         ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 23/23 — 00:00:02
    An error occurred while installing ujson==1.35 ; sys_platform != 'win32' and implementation_name == 'cpython' --hash=sha256:f66073e5506e91d204ab0c614a148d5aa938bdbf104751be66f8ad7a222f5f86! Will try again.
    Installing initially failed dependencies…
      ☤  ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 2/2 — 00:00:03
    [pipenv.exceptions.InstallError]:   File "/usr/local/lib/python3.7/site-packages/pipenv/cli/command.py", line 254, in install
    [pipenv.exceptions.InstallError]:       editable_packages=state.installstate.editables,
    [pipenv.exceptions.InstallError]:   File "/usr/local/lib/python3.7/site-packages/pipenv/core.py", line 1874, in do_install
    [pipenv.exceptions.InstallError]:       keep_outdated=keep_outdated
    [pipenv.exceptions.InstallError]:   File "/usr/local/lib/python3.7/site-packages/pipenv/core.py", line 1253, in do_init
    [pipenv.exceptions.InstallError]:       pypi_mirror=pypi_mirror,
    [pipenv.exceptions.InstallError]:   File "/usr/local/lib/python3.7/site-packages/pipenv/core.py", line 862, in do_install_dependencies
    [pipenv.exceptions.InstallError]:       _cleanup_procs(procs, False, failed_deps_queue, retry=False)
    [pipenv.exceptions.InstallError]:   File "/usr/local/lib/python3.7/site-packages/pipenv/core.py", line 681, in _cleanup_procs
    [pipenv.exceptions.InstallError]:       raise exceptions.InstallError(c.dep.name, extra=err_lines)
    [pipenv.exceptions.InstallError]: ['Collecting httptools==0.0.13', '  Using cached httptools-0.0.13.tar.gz (104 kB)', 'Building wheels for collected packages: httptools', '  Building wheel for httptools (setup.py): started', "  Building wheel for httptools (setup.py): finished with status 'error'", '  Running setup.py clean for httptools', 'Failed to build httptools', 'Installing collected packages: httptools', '    Running setup.py install for httptools: started', "    Running setup.py install for httptools: finished with status 'error'"]
    [pipenv.exceptions.InstallError]: ['ERROR: Command errored out with exit status 1:', '   command: /home/yunos/.local/share/virtualenvs/logviewer-eTR9VQMa/bin/python -u -c \'import sys, setuptools, tokenize; sys.argv[0] = \'"\'"\'/tmp/pip-install-xerzu264/httptools/setup.py\'"\'"\'; __file__=\'"\'"\'/tmp/pip-install-xerzu264/httptools/setup.py\'"\'"\';f=getattr(tokenize, \'"\'"\'open\'"\'"\', open)(__file__);code=f.read().replace(\'"\'"\'\\r\\n\'"\'"\', \'"\'"\'\\n\'"\'"\');f.close();exec(compile(code, __file__, \'"\'"\'exec\'"\'"\'))\' bdist_wheel -d /tmp/pip-wheel-qjovlrod', '       cwd: /tmp/pip-install-xerzu264/httptools/', '  Complete output (30 lines):', '  running bdist_wheel', '  running build', '  running build_py', '  creating build', '  creating build/lib.linux-x86_64-3.7', '  creating build/lib.linux-x86_64-3.7/httptools', '  copying httptools/__init__.py -> build/lib.linux-x86_64-3.7/httptools', '  creating build/lib.linux-x86_64-3.7/httptools/parser', '  copying httptools/parser/errors.py -> build/lib.linux-x86_64-3.7/httptools/parser', '  copying httptools/parser/__init__.py -> build/lib.linux-x86_64-3.7/httptools/parser', '  running egg_info', '  writing httptools.egg-info/PKG-INFO', '  writing dependency_links to httptools.egg-info/dependency_links.txt', '  writing top-level names to httptools.egg-info/top_level.txt', "  reading manifest file 'httptools.egg-info/SOURCES.txt'", "  reading manifest template 'MANIFEST.in'", "  writing manifest file 'httptools.egg-info/SOURCES.txt'", '  copying httptools/parser/parser.c -> build/lib.linux-x86_64-3.7/httptools/parser', '  warning: build_py: byte-compiling is disabled, skipping.', '  ', '  running build_ext', "  building 'httptools.parser.parser' extension", '  creating build/temp.linux-x86_64-3.7', '  creating build/temp.linux-x86_64-3.7/httptools', '  creating build/temp.linux-x86_64-3.7/httptools/parser', '  creating build/temp.linux-x86_64-3.7/vendor', '  creating build/temp.linux-x86_64-3.7/vendor/http-parser', '  ccache gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -I/home/yunos/.local/share/virtualenvs/logviewer-eTR9VQMa/include -I/usr/local/include/python3.7m -c httptools/parser/parser.c -o build/temp.linux-x86_64-3.7/httptools/parser/parser.o -O2', '  ccache: error: Failed to create temporary file for /home/.ccache/tmp/parser.stdout: Permission denied', "  error: command 'ccache' failed with exit status 1", '  ----------------------------------------', '  ERROR: Failed building wheel for httptools', '    ERROR: Command errored out with exit status 1:', '     command: /home/yunos/.local/share/virtualenvs/logviewer-eTR9VQMa/bin/python -u -c \'import sys, setuptools, tokenize; sys.argv[0] = \'"\'"\'/tmp/pip-install-xerzu264/httptools/setup.py\'"\'"\'; __file__=\'"\'"\'/tmp/pip-install-xerzu264/httptools/setup.py\'"\'"\';f=getattr(tokenize, \'"\'"\'open\'"\'"\', open)(__file__);code=f.read().replace(\'"\'"\'\\r\\n\'"\'"\', \'"\'"\'\\n\'"\'"\');f.close();exec(compile(code, __file__, \'"\'"\'exec\'"\'"\'))\' install --record /tmp/pip-record-o_dzav43/install-record.txt --single-version-externally-managed --compile --install-headers /home/yunos/.local/share/virtualenvs/logviewer-eTR9VQMa/include/site/python3.7/httptools', '         cwd: /tmp/pip-install-xerzu264/httptools/', '    Complete output (30 lines):', '    running install', '    running build', '    running build_py', '    creating build', '    creating build/lib.linux-x86_64-3.7', '    creating build/lib.linux-x86_64-3.7/httptools', '    copying httptools/__init__.py -> build/lib.linux-x86_64-3.7/httptools', '    creating build/lib.linux-x86_64-3.7/httptools/parser', '    copying httptools/parser/errors.py -> build/lib.linux-x86_64-3.7/httptools/parser', '    copying httptools/parser/__init__.py -> build/lib.linux-x86_64-3.7/httptools/parser', '    running egg_info', '    writing httptools.egg-info/PKG-INFO', '    writing dependency_links to httptools.egg-info/dependency_links.txt', '    writing top-level names to httptools.egg-info/top_level.txt', "    reading manifest file 'httptools.egg-info/SOURCES.txt'", "    reading manifest template 'MANIFEST.in'", "    writing manifest file 'httptools.egg-info/SOURCES.txt'", '    copying httptools/parser/parser.c -> build/lib.linux-x86_64-3.7/httptools/parser', '    warning: build_py: byte-compiling is disabled, skipping.', '    ', '    running build_ext', "    building 'httptools.parser.parser' extension", '    creating build/temp.linux-x86_64-3.7', '    creating build/temp.linux-x86_64-3.7/httptools', '    creating build/temp.linux-x86_64-3.7/httptools/parser', '    creating build/temp.linux-x86_64-3.7/vendor', '    creating build/temp.linux-x86_64-3.7/vendor/http-parser', '    ccache gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -I/home/yunos/.local/share/virtualenvs/logviewer-eTR9VQMa/include -I/usr/local/include/python3.7m -c httptools/parser/parser.c -o build/temp.linux-x86_64-3.7/httptools/parser/parser.o -O2', '    ccache: error: Failed to create temporary file for /home/.ccache/tmp/parser.stdout: Permission denied', "    error: command 'ccache' failed with exit status 1", '    ----------------------------------------', 'ERROR: Command errored out with exit status 1: /home/yunos/.local/share/virtualenvs/logviewer-eTR9VQMa/bin/python -u -c \'import sys, setuptools, tokenize; sys.argv[0] = \'"\'"\'/tmp/pip-install-xerzu264/httptools/setup.py\'"\'"\'; __file__=\'"\'"\'/tmp/pip-install-xerzu264/httptools/setup.py\'"\'"\';f=getattr(tokenize, \'"\'"\'open\'"\'"\', open)(__file__);code=f.read().replace(\'"\'"\'\\r\\n\'"\'"\', \'"\'"\'\\n\'"\'"\');f.close();exec(compile(code, __file__, \'"\'"\'exec\'"\'"\'))\' install --record /tmp/pip-record-o_dzav43/install-record.txt --single-version-externally-managed --compile --install-headers /home/yunos/.local/share/virtualenvs/logviewer-eTR9VQMa/include/site/python3.7/httptools Check the logs for full command output.']
    ERROR: ERROR: Package installation failed...
    
    
     
  4. eva2000

    eva2000 Administrator Staff Member

    44,173
    10,067
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,560
    Local Time:
    9:42 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    that is error due to /tmp directory being secured with noexec permissions so nothing can execute in /tmp directory

    For Centmin Mod you need to temporarily change the TMPDIR directory environmental variable before install/running python install scripts which have issues with /tmp

    You can create and export /home/pip-tmp directory as temp SSH session TMPDIR environmental variable using below commands
    Code (Text):
    mkdir -p /home/pip-tmp
    chmod 1777 /home/pip-tmp
    export TMPDIR=/home/pip-tmp
    
     
  5. yunos

    yunos Member

    102
    3
    18
    Aug 8, 2015
    Ratings:
    +12
    Local Time:
    1:42 AM
    1.8.0
    thanks but i still get the same error

    python3.7m -c httptools/parser/parser.c -o build/temp.linux-x86_64-3.7/httptools/parser/parser.o -O2', ' ccache: error: Failed to create temporary file for /home/.ccache/tmp/parser.stdout: Permission denied', " error: command 'ccache' failed with
     
  6. eva2000

    eva2000 Administrator Staff Member

    44,173
    10,067
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,560
    Local Time:
    9:42 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    No idea why that is happening. I'd remove the existing python virtualenv project and create a new one and try again
     
  7. eva2000

    eva2000 Administrator Staff Member

    44,173
    10,067
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,560
    Local Time:
    9:42 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
  8. yunos

    yunos Member

    102
    3
    18
    Aug 8, 2015
    Ratings:
    +12
    Local Time:
    1:42 AM
    1.8.0
    i removed the virtualenvs but still same error

    ccache: error: Failed to create temporary file for /home/.ccache/tmp/parser.stdout: Permission denied',

    Code:
    Virtualenv location: /home/yunos/.local/share/virtualenvs/logviewer-eTR9VQMa
    Installing dependencies from Pipfile.lock (d10bce)…
    An error occurred while installing httptools==0.0.13 --hash=sha256:e00cbd7ba01ff748e494248183abc6e153f49181169d8a3d41bb49132ca01dfc! Will try again.
         ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 23/23 — 00:00:02
    An error occurred while installing ujson==1.35 ; sys_platform != 'win32' and implementation_name == 'cpython' --hash=sha256:f66073e5506e91d204ab0c614a148d5aa938bdbf104751be66f8ad7a222f5f86! Will try again.
    Installing initially failed dependencies…
      ☤  ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 2/2 — 00:00:03
    [pipenv.exceptions.InstallError]:   File "/usr/local/lib/python3.7/site-packages/pipenv/cli/command.py", line 254, in install
    [pipenv.exceptions.InstallError]:       editable_packages=state.installstate.editables,
    [pipenv.exceptions.InstallError]:   File "/usr/local/lib/python3.7/site-packages/pipenv/core.py", line 1874, in do_install
    [pipenv.exceptions.InstallError]:       keep_outdated=keep_outdated
    [pipenv.exceptions.InstallError]:   File "/usr/local/lib/python3.7/site-packages/pipenv/core.py", line 1253, in do_init
    [pipenv.exceptions.InstallError]:       pypi_mirror=pypi_mirror,
    [pipenv.exceptions.InstallError]:   File "/usr/local/lib/python3.7/site-packages/pipenv/core.py", line 862, in do_install_dependencies
    [pipenv.exceptions.InstallError]:       _cleanup_procs(procs, False, failed_deps_queue, retry=False)
    [pipenv.exceptions.InstallError]:   File "/usr/local/lib/python3.7/site-packages/pipenv/core.py", line 681, in _cleanup_procs
    [pipenv.exceptions.InstallError]:       raise exceptions.InstallError(c.dep.name, extra=err_lines)
    [pipenv.exceptions.InstallError]: ['Collecting httptools==0.0.13', '  Using cached httptools-0.0.13.tar.gz (104 kB)', 'Building wheels for collected packages: httptools', '  Building wheel for httptools (setup.py): started', "  Building wheel for httptools (setup.py): finished with status 'error'", '  Running setup.py clean for httptools', 'Failed to build httptools', 'Installing collected packages: httptools', '    Running setup.py install for httptools: started', "    Running setup.py install for httptools: finished with status 'error'"]
    [pipenv.exceptions.InstallError]: ['ERROR: Command errored out with exit status 1:', '   command: /home/yunos/.local/share/virtualenvs/logviewer-eTR9VQMa/bin/python -u -c \'import sys, setuptools, tokenize; sys.argv[0] = \'"\'"\'/tmp/pip-install-l1mfbkoj/httptools/setup.py\'"\'"\'; __file__=\'"\'"\'/tmp/pip-install-l1mfbkoj/httptools/setup.py\'"\'"\';f=getattr(tokenize, \'"\'"\'open\'"\'"\', open)(__file__);code=f.read().replace(\'"\'"\'\\r\\n\'"\'"\', \'"\'"\'\\n\'"\'"\');f.close();exec(compile(code, __file__, \'"\'"\'exec\'"\'"\'))\' bdist_wheel -d /tmp/pip-wheel-0z45w31c', '       cwd: /tmp/pip-install-l1mfbkoj/httptools/', '  Complete output (30 lines):', '  running bdist_wheel', '  running build', '  running build_py', '  creating build', '  creating build/lib.linux-x86_64-3.7', '  creating build/lib.linux-x86_64-3.7/httptools', '  copying httptools/__init__.py -> build/lib.linux-x86_64-3.7/httptools', '  creating build/lib.linux-x86_64-3.7/httptools/parser', '  copying httptools/parser/errors.py -> build/lib.linux-x86_64-3.7/httptools/parser', '  copying httptools/parser/__init__.py -> build/lib.linux-x86_64-3.7/httptools/parser', '  running egg_info', '  writing httptools.egg-info/PKG-INFO', '  writing dependency_links to httptools.egg-info/dependency_links.txt', '  writing top-level names to httptools.egg-info/top_level.txt', "  reading manifest file 'httptools.egg-info/SOURCES.txt'", "  reading manifest template 'MANIFEST.in'", "  writing manifest file 'httptools.egg-info/SOURCES.txt'", '  copying httptools/parser/parser.c -> build/lib.linux-x86_64-3.7/httptools/parser', '  warning: build_py: byte-compiling is disabled, skipping.', '  ', '  running build_ext', "  building 'httptools.parser.parser' extension", '  creating build/temp.linux-x86_64-3.7', '  creating build/temp.linux-x86_64-3.7/httptools', '  creating build/temp.linux-x86_64-3.7/httptools/parser', '  creating build/temp.linux-x86_64-3.7/vendor', '  creating build/temp.linux-x86_64-3.7/vendor/http-parser', '  ccache gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -I/home/yunos/.local/share/virtualenvs/logviewer-eTR9VQMa/include -I/usr/local/include/python3.7m -c httptools/parser/parser.c -o build/temp.linux-x86_64-3.7/httptools/parser/parser.o -O2', '  ccache: error: Failed to create temporary file for /home/.ccache/tmp/parser.stdout: Permission denied', "  error: command 'ccache' failed with exit status 1", '  ----------------------------------------', '  ERROR: Failed building wheel for httptools', '    ERROR: Command errored out with exit status 1:', '     command: /home/yunos/.local/share/virtualenvs/logviewer-eTR9VQMa/bin/python -u -c \'import sys, setuptools, tokenize; sys.argv[0] = \'"\'"\'/tmp/pip-install-l1mfbkoj/httptools/setup.py\'"\'"\'; __file__=\'"\'"\'/tmp/pip-install-l1mfbkoj/httptools/setup.py\'"\'"\';f=getattr(tokenize, \'"\'"\'open\'"\'"\', open)(__file__);code=f.read().replace(\'"\'"\'\\r\\n\'"\'"\', \'"\'"\'\\n\'"\'"\');f.close();exec(compile(code, __file__, \'"\'"\'exec\'"\'"\'))\' install --record /tmp/pip-record-1c4ukoec/install-record.txt --single-version-externally-managed --compile --install-headers /home/yunos/.local/share/virtualenvs/logviewer-eTR9VQMa/include/site/python3.7/httptools', '         cwd: /tmp/pip-install-l1mfbkoj/httptools/', '    Complete output (30 lines):', '    running install', '    running build', '    running build_py', '    creating build', '    creating build/lib.linux-x86_64-3.7', '    creating build/lib.linux-x86_64-3.7/httptools', '    copying httptools/__init__.py -> build/lib.linux-x86_64-3.7/httptools', '    creating build/lib.linux-x86_64-3.7/httptools/parser', '    copying httptools/parser/errors.py -> build/lib.linux-x86_64-3.7/httptools/parser', '    copying httptools/parser/__init__.py -> build/lib.linux-x86_64-3.7/httptools/parser', '    running egg_info', '    writing httptools.egg-info/PKG-INFO', '    writing dependency_links to httptools.egg-info/dependency_links.txt', '    writing top-level names to httptools.egg-info/top_level.txt', "    reading manifest file 'httptools.egg-info/SOURCES.txt'", "    reading manifest template 'MANIFEST.in'", "    writing manifest file 'httptools.egg-info/SOURCES.txt'", '    copying httptools/parser/parser.c -> build/lib.linux-x86_64-3.7/httptools/parser', '    warning: build_py: byte-compiling is disabled, skipping.', '    ', '    running build_ext', "    building 'httptools.parser.parser' extension", '    creating build/temp.linux-x86_64-3.7', '    creating build/temp.linux-x86_64-3.7/httptools', '    creating build/temp.linux-x86_64-3.7/httptools/parser', '    creating build/temp.linux-x86_64-3.7/vendor', '    creating build/temp.linux-x86_64-3.7/vendor/http-parser', '    ccache gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -I/home/yunos/.local/share/virtualenvs/logviewer-eTR9VQMa/include -I/usr/local/include/python3.7m -c httptools/parser/parser.c -o build/temp.linux-x86_64-3.7/httptools/parser/parser.o -O2', '    ccache: error: Failed to create temporary file for /home/.ccache/tmp/parser.stdout: Permission denied', "    error: command 'ccache' failed with exit status 1", '    ----------------------------------------', 'ERROR: Command errored out with exit status 1: /home/yunos/.local/share/virtualenvs/logviewer-eTR9VQMa/bin/python -u -c \'import sys, setuptools, tokenize; sys.argv[0] = \'"\'"\'/tmp/pip-install-l1mfbkoj/httptools/setup.py\'"\'"\'; __file__=\'"\'"\'/tmp/pip-install-l1mfbkoj/httptools/setup.py\'"\'"\';f=getattr(tokenize, \'"\'"\'open\'"\'"\', open)(__file__);code=f.read().replace(\'"\'"\'\\r\\n\'"\'"\', \'"\'"\'\\n\'"\'"\');f.close();exec(compile(code, __file__, \'"\'"\'exec\'"\'"\'))\' install --record /tmp/pip-record-1c4ukoec/install-record.txt --single-version-externally-managed --compile --install-headers /home/yunos/.local/share/virtualenvs/logviewer-eTR9VQMa/include/site/python3.7/httptools Check the logs for full command output.']
    
     
  9. yunos

    yunos Member

    102
    3
    18
    Aug 8, 2015
    Ratings:
    +12
    Local Time:
    1:42 AM
    1.8.0
    From your new posts in
    Sysadmin - CentOS 7 Python 2.7 will reach the end of its life on January 1st, 2020
    i also made sure to run centmin command to update the changes

    I followed, deleted the virtualenvs from local/share/virtualenvs
    but dependencis still tries to install it on /home/.ccache


    questions regarding your last instruction

    /home/python_projects/myproject or whatever directory you choose

    Code:
    mkdir -p /home/python_projects/myproject
    /opt/python${python_prefixver}/bin/python${python_prefixver} -m venv /home/python_projects/myproject/pipenv
    source /home/python_projects/myproject/pipenv/bin/activate
    do i need to issue this command in every single python projcts?
    say i have 14 separate python projects on /home/yunos/folder 1 /home/yunos/folder 2

    do i need to use the above commands separetly, for each folder?
     
    Last edited: Mar 31, 2020
  10. eva2000

    eva2000 Administrator Staff Member

    44,173
    10,067
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,560
    Local Time:
    9:42 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    I'd updated instructions at Sysadmin - CentOS 7 Python 2.7 will reach the end of its life on January 1st, 2020 to remove pipenv ending folder so it's just
    Code (Text):
    mkdir -p /home/python_projects/myproject
    /opt/python${python_prefixver}/bin/python${python_prefixver} -m venv /home/python_projects/myproject
    source /home/python_projects/myproject/bin/activate
    

    so if you have 3 projects named

    • /home/python_projects/myproject1
    • /home/python_projects/myproject2
    • /home/python_projects/myproject3
    You'd create 3 projects and source activate if you run it within virtualenv created or
    Code (Text):
    mkdir -p /home/python_projects/myproject1
    /opt/python${python_prefixver}/bin/python${python_prefixver} -m venv /home/python_projects/myproject1
    
    mkdir -p /home/python_projects/myproject2
    /opt/python${python_prefixver}/bin/python${python_prefixver} -m venv /home/python_projects/myproject2
    
    mkdir -p /home/python_projects/myproject3
    /opt/python${python_prefixver}/bin/python${python_prefixver} -m venv /home/python_projects/myproject3
    
    source /home/python_projects/myproject1/bin/activate
    source /home/python_projects/myproject2/bin/activate
    source /home/python_projects/myproject3/bin/activate
    

    Or outside of source activation of specific Python virtualenv, direct references
    Code (Text):
    /home/python_projects/myproject/bin/pip --version
    pip 19.2.3 from /home/python_projects/myproject/lib/python3.7/site-packages/pip (python 3.7)
    

    Code (Text):
    ls -lah /home/python_projects/myproject/bin/
    total 40K
    drwxr-xr-x 2 root root 4.0K Mar 31 04:43 .
    drwxr-xr-x 5 root root 4.0K Mar 31 04:43 ..
    -rw-r--r-- 1 root root 2.2K Mar 31 04:43 activate
    -rw-r--r-- 1 root root 1.3K Mar 31 04:43 activate.csh
    -rw-r--r-- 1 root root 2.4K Mar 31 04:43 activate.fish
    -rwxr-xr-x 1 root root  262 Mar 31 04:43 easy_install
    -rwxr-xr-x 1 root root  262 Mar 31 04:43 easy_install-3.7
    -rwxr-xr-x 1 root root  244 Mar 31 04:43 pip
    -rwxr-xr-x 1 root root  244 Mar 31 04:43 pip3
    -rwxr-xr-x 1 root root  244 Mar 31 04:43 pip3.7
    lrwxrwxrwx 1 root root    9 Mar 31 04:43 python -> python3.7
    lrwxrwxrwx 1 root root    9 Mar 31 04:43 python3 -> python3.7
    lrwxrwxrwx 1 root root   28 Mar 31 04:43 python3.7 -> /opt/python3.7/bin/python3.7
    
     
  11. eva2000

    eva2000 Administrator Staff Member

    44,173
    10,067
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,560
    Local Time:
    9:42 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    FYI, google and read up on how to use Python 3.7 and virtualenv via -m venv command