ModuleNotFoundError inside Pipenv environment
See original GitHub issueOn Ubuntu I’m trying to install python packages inside Pipenv environment. I do start the Pipenv shell by typing
pipenv shell
and the
pip install <package name>
But, it is giving this error
ModuleNotFoundError: No module named ‘distutils.cmd’
Pip is working fine with none Error like the above, outside Pipenv. The error is appearing only inside Pipenv.
I’m using python3.9.9
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
python - Pipenv modules not found - Stack Overflow
I got an error from selenium about 'geckodriver' executable needing to be in PATH, but your solution fixed my problem. – bkula. Mar...
Read more >Frequently Encountered Pipenv Problems - Read the Docs
☤ My pyenv-installed Python is not found Make sure you have PYENV_ROOT set correctly. Pipenv only supports CPython distributions, with version name like...
Read more >Libraries installed with pipenv, but ModuleNotFoundError ...
I am using pipenv v2021.5.29 to create an environment for running a script. I have a requirements.txt script with all the packages needed....
Read more >No module named 'numpy'" windowsOS/pipenv shell - Python
Pipenv "ModuleNotFoundError: No module named 'numpy'" ... Then try within your pipenv environment, they should be different.
Read more >A tool all Python developers should be using - Medium
Then do a pip install pipenv then pipenv install pandas --python 3.6 and within seconds you will have created a project with a...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It is not difficult to find it out. First make sure you can reproduce the bug
On below python3.9.9:
See where
distutils
is from On python 3.9.9:See if
sys.path
doesn’t containdistutils
package.I am compelled to close this issue for now given it appears to be an environment issue, which the original poster confirmed that in the Solution. Please note @Irfan-Ahmad-byte that including the output from
pipenv --support
would be helpful in future issue reports. It appears that the codebase (at least the vendor components) in pipenv depend on distutils being present. There should probably be a separate issue (maybe already is) to track dependence on distutils since:Note: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives