Pipenv installation and use

I’m working through the Comp Sci course and the pipenv installtion/use tutorial below:

https://www.codecademy.com/paths/computer-science/tracks/cspath-cs-101/modules/cspath-modules/articles/learn-python-pipenv

I now have pipenv installed. With this command - “pip3 install --user pipenv” - I get the result below.

Requirement already satisfied: pipenv in /Users/miguel/Library/Python/3.11/lib/python/site-packages (2022.12.19)

Requirement already satisfied: certifi in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from pipenv) (2022.12.7)

Requirement already satisfied: setuptools>=36.2.1 in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from pipenv) (65.5.0)

Requirement already satisfied: virtualenv-clone>=0.2.5 in /Users/miguel/Library/Python/3.11/lib/python/site-packages (from pipenv) (0.5.7)

Requirement already satisfied: virtualenv in /Users/miguel/Library/Python/3.11/lib/python/site-packages (from pipenv) (20.17.1)

Requirement already satisfied: distlib<1,>=0.3.6 in /Users/miguel/Library/Python/3.11/lib/python/site-packages (from virtualenv->pipenv) (0.3.6)

Requirement already satisfied: filelock<4,>=3.4.1 in /Users/miguel/Library/Python/3.11/lib/python/site-packages (from virtualenv->pipenv) (3.8.2)

Requirement already satisfied: platformdirs<3,>=2.4 in /Users/miguel/Library/Python/3.11/lib/python/site-packages (from virtualenv->pipenv) (2.6.0)

Then, I attempt to use the environment with the command pipenv, and get a command not found error. I have checked my path, and according to the tutorial my path is correct.

I have a Mac. Any suggestions here? I’ve looked through a couple other trouble posts here but haven’t yet found the key.

Did you install it using 'python3?

python3 -m pip install virtualenv
python3 -m virtualenv venv
source ./venv/bin/activate

See:
https://stackoverflow.com/questions/68513540/how-to-install-and-run-virtualenv-on-macos-correctly/68513558#68513558

1 Like