I have installed pipenv using pip3, however it can’t be found when I try to run it.
Here is how I have installed pipenv:
[ec2-user@ip-xxx-xx-xx-xxx newslookup]$ pip3 install pipenv --user Collecting pipenv Using cached https://files.pythonhosted.org/packages/13/b4/3ffa55f77161cff9a5220f162670f7c5eb00df52e00939e203f601b0f579/pipenv-2018.11.26-py3-none-any.whl Requirement already satisfied: virtualenv in /home/ec2-user/.local/lib/python3.7/site-packages (from pipenv) Requirement already satisfied: pip>=9.0.1 in /usr/lib/python3.7/site-packages (from pipenv) Requirement already satisfied: virtualenv-clone>=0.2.5 in /home/ec2-user/.local/lib/python3.7/site-packages (from pipenv) Requirement already satisfied: certifi in /home/ec2-user/.local/lib/python3.7/site-packages (from pipenv) Requirement already satisfied: setuptools>=36.2.1 in /usr/lib/python3.7/site-packages (from pipenv) Installing collected packages: pipenv Successfully installed pipenv-2018.11.26
So as you can see it is successfully installed.
Here is what happens when I try to run my python file:
[ec2-user@ip-172-31-90-218 newslookup]$ pipenv run python nasdaq_scrape_sec.py -bash: /usr/bin/pipenv: No such file or directory
Do I have to set a path or something?
Advertisement
Answer
When you pip3 install
using the --user
flag is creates a directory in your home directory that is hidden called .local
. To access those executables we want to add the bin to our path.
This should work:
export PATH=$PATH:/home/ec2-user/.local/bin