pip install pipenv-Issue (Solved)

Pipenv issue (solved): When attempting to install Pipenv in Python 3.11.2, an following error was displayed.



The error message you are seeing suggests that your Python environment is being externally managed, which means that you cannot install packages system-wide using pip. Instead, you should create a virtual environment and install packages within that environment.


to solve this error, follow below options


  1. Type the following command to create a virtual environment
    • python3 -m venv myenv
  2. Go to myenv folder
    • cd myenv
  3. Go to bin folder
    • cd bin
  4. Activate the virtual environment by typing the following command
    • source activate

now virtual environment (myenv) is created and activated.
Now, you can use pip to install packages within the virtual environment


Let's install this

  •     pip install pipenv



When you're done working with the virtual environment, you can deactivate it by typing the following command
  • deactivate

If you want to delete this environment, follow this commands

  • rm -rf myenv 

Comments

Popular posts from this blog

Django and Python web development

openai | Sora