2

I am trying to install the PyPi names library using pipenv https://pypi.org/project/names/

The package successfully installs after running: pipenv install names

But I still receive the error message:

File "blockchain.py", line 4, in <module>
    import names
ModuleNotFoundError: No module named 'names'

When I try doing:

pip install names

I get the message :

(Blockchain) bash-3.2$ pip install names

Requirement already satisfied: names in /Users/ayunas/.local/share/virtualenvs/Blockchain-xNznGcTc/lib/python3.7/site-packages (0.3.0)

1 Answer 1

2

This is most likely occurring because the location of your pip install isn't matching the location of the python you're running. pipenv run pip install names will install names to your virtualenvironment; pip install names installs it to your system python.

You can check this for yourself by opening up a terminal and typing in where pip and where python and then pipenv run where pip and pipenv run where python. Note the differences :)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.