Reputation: 26538
Given the following structure
abc
├── __init__.py
└── package
├── __init__.py
├── __init__.pyc
├── client.py
├── client.pyc
├── server.py
└── server.pyc
when I run python in command line outside of abc
and try to import package as below:
ImportError: No module named package
Any ideas?
Upvotes: 1
Views: 4935
Reputation:
I was able to get pip working again by doing the following :
cd /tmp/
wget https://bootstrap.pypa.io/get-pip.py
sudo apt-get purge -y python3-pip
sudo python3 ./get-pip.py
sudo apt-get install python3-pip
Upvotes: 1
Reputation: 500357
If you are importing package
, as opposed to abc.package
, you need to put abc
onto PYTHONPATH
.
Upvotes: 3