Score:0

Ubuntu 22.04 LTS pipenv not installing libraries in the environment

br flag

I have installed pip via the "get-pip.py"[file][1] and via apt. Also install the "pipenv" using pip and pip3.

But when i create the environment using pipenv install the environment is created ok but when i try to install some library it's using the host pip and libraries are installed on the host path not on the environment itself.

Example: I'm installing the lib requests and nothing from files are in the environment path. And when i try to import the module its says its missing. But on the host machine the module is there.

➜  Test pipenv shell
Launching subshell in virtual environment...
➜  Test  . /home/user1/.local/share/virtualenvs/Test-f3UeTgqf/bin/activate
(Test-f3UeTgqf) ➜  Test 
(Test-f3UeTgqf) ➜  Test which pip
/home/user1/.local/bin/pip
(Test-f3UeTgqf) ➜  Test which pip3
/home/user1/.local/bin/pip3
(Test-f3UeTgqf) ➜  Test 

why which is pointing to the host path of the pip, should it this be from the virtual environment path? Could this be the problem of why libraries are not install in the environment? [1]: https://pip.pypa.io/en/stable/installation/

Creation of the pipenv logs

WARNING: --three is deprecated! pipenv uses python3 by default
Creating a virtualenv for this project...
Pipfile: /home/ivan/Projects/Test/Pipfile
Using /usr/bin/python3 (3.10.6) to create virtualenv...
⠸ Creating virtual environment...created virtual environment CPython3.10.6.final.0-64 in 105ms
  creator Venv(dest=/home/ivan/.local/share/virtualenvs/Test-f3UeTgqf, clear=False, no_vcs_ignore=False, global=False, describe=CPython3Posix)
  seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/ivan/.local/share/virtualenv)
    added seed packages: pip==22.2.2, setuptools==65.4.1, wheel==0.37.1
  activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator

✔ Successfully created virtual environment! 
Virtualenv location: /home/ivan/.local/share/virtualenvs/Test-f3UeTgqf
Creating a Pipfile for this project...
Pipfile.lock not found, creating...
Locking [packages] dependencies...
Locking [dev-packages] dependencies...
Updated Pipfile.lock (2ac81ce11198646f581b04616654f2ec6cd1f7a2c54081f2e3aecba53449386d)!
Installing dependencies from Pipfile.lock (49386d)...
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.
David avatar
cn flag
Please clear this up for me. You installed it twice 2 different ways?
IvanAK avatar
br flag
Ye sorry, first time i install it via the file the problem was there than i install it via apt same results. I want to point out, that how ever you going to installing it it, will not working
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.