According to https://docs.serv00.com/Python/ , I create a virtual environment (Python 3.9) and activated successfully, but when I install package with my virtual environment , the package does not really install in my environment subdirectory 'site-packages', but in the base default Python 3.10.
when I test 'which pip' i'm using , it shows: /usr/local/bin/pip , and 'which python' shows: /usr/home/atliwan/.venv/iccbox39/bin/python
[atliwan@s2]:<~/.venv>$ virtualenv iccbox39 --python=python3.9
created virtual environment CPython3.9.16.final.0-64 in 671ms
creator CPython3Posix(dest=/usr/home/atliwan/.venv/iccbox39, clear=False, no_vcs_ignore=False, global=False)
seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/usr/home/atliwan/.local/share/virtualenv)
added seed packages: pip==24.0, setuptools==69.1.1, wheel==0.42.0
activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator
[atliwan@s2]:<~/.venv>$ cd iccbox39
[atliwan@s2]:<~/.venv/iccbox39>$ cd bin
[atliwan@s2]:<~/.venv/iccbox39/bin>$ source activate
(iccbox39) [atliwan@s2]:<~/.venv/iccbox39/bin>$ which pip
/usr/local/bin/pip
(iccbox39) [atliwan@s2]:<~/.venv/iccbox39/bin>$ pip -V
pip 23.1.2 from /usr/local/lib/python3.10/site-packages/pip (python 3.10)
(iccbox39) [atliwan@s2]:<~/.venv/iccbox39/bin>$ which python
/usr/home/atliwan/.venv/iccbox39/bin/python
(iccbox39) [atliwan@s2]:<~/.venv/iccbox39/bin>$ python -V
Python 3.9.16
(iccbox39) [atliwan@s2]:<~/.venv/iccbox39/bin>$ pip install love2
Defaulting to user installation because normal site-packages is not writeable
Collecting love2
Downloading love2-0.0.4.tar.gz (2.9 kB)
Preparing metadata (setup.py) ... done
Building wheels for collected packages: love2
Building wheel for love2 (setup.py) ... done
Created wheel for love2: filename=love2-0.0.4-py3-none-any.whl size=3344 sha256=e2160ab0c8f307fa6322d277a10d3a92fe86e029c4ec986b87eaa4d842837368
Stored in directory: /usr/home/atliwan/.cache/pip/wheels/f9/ed/87/c2364e37084ff480ea2d65f46bc784d47defd12cd473ec9e15
Successfully built love2
Installing collected packages: love2
Successfully installed love2-0.0.4
(iccbox39) [atliwan@s2]:<~/.venv/iccbox39/bin>$ deactivate iccbox39
[atliwan@s2]:<~/.venv/iccbox39/bin>$ pip list
Package Version
----------------------------- -----------
acme 2.6.0
aiohttp 3.9.3
aiosignal 1.3.1
alabaster 0.7.13
alembic 1.13.1
.....
**love2 0.0.4**
lxml 4.9.2
[atliwan@s2]:<~/.venv/iccbox39/lib/python3.9/site-packages>$ cd ~/.venv/iccbox39/lib/python3.9/site-packages
[atliwan@s2]:<~/.venv/iccbox39/lib/python3.9/site-packages>$ ls -a
_distutils_hack .. pip-24.0.virtualenv setuptools-69.1.1.virtualenv
_virtualenv.pth distutils-precedence.pth pkg_resources wheel
_virtualenv.py pip setuptools wheel-0.42.0.dist-info
. pip-24.0.dist-info setuptools-69.1.1.dist-info wheel-0.42.0.virtualenv