I've been trying to install packages on a raspberry pi 4b and I keep having issues.
On the default, python ver. 3.7, I would get setup.py not found.
Then I installed python ver. 3.9 and got the traceback listed below.
Lastly I tried installing python ver. 3.8 and I still get the error I got using ver. 3.9.
I now also get a "no module named pip" when using python3 -m pip install somePackage
The package I'm trying to install is onnx_tf.
Edit: I've tried purging and reinstalling pip but this did not work.
Traceback (most recent call last):
File "/usr/local/bin/pip3", line 11, in <module>
load_entry_point('pip==20.2.4', 'console_scripts', 'pip3')()
File "/usr/local/lib/python2.7/dist-packages/pip/_internal/cli/main.py", line 75, in main
return command.main(cmd_args)
File "/usr/local/lib/python2.7/dist-packages/pip/_internal/cli/base_command.py", line 121, in main
return self._main(args)
File "/usr/local/lib/python2.7/dist-packages/pip/_internal/cli/base_command.py", line 265, in _main
self.handle_pip_version_check(options)
File "/usr/local/lib/python2.7/dist-packages/pip/_internal/cli/req_command.py", line 152, in
handle_pip_version_check
timeout=min(5, options.timeout)
File "/usr/local/lib/python2.7/dist-packages/pip/_internal/cli/req_command.py", line 97, in
_build_session
index_urls=self._get_index_urls(options),
File "/usr/local/lib/python2.7/dist-packages/pip/_internal/network/session.py", line 249, in __init__
self.headers["User-Agent"] = user_agent()
File "/usr/local/lib/python2.7/dist-packages/pip/_internal/network/session.py", line 132, in user_agent
zip(["name", "version", "id"], distro.linux_distribution()),
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/distro.py", line 125, in linux_distribution
return _distro.linux_distribution(full_distribution_name)
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/distro.py", line 681, in linux_distribution
self.version(),
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/distro.py", line 741, in version
self.lsb_release_attr('release'),
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/distro.py", line 903, in lsb_release_attr
return self._lsb_release_info.get(attribute, '')
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/distro.py", line 556, in __get__
ret = obj.__dict__[self._fname] = self._f(obj)
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/distro.py", line 1014, in _lsb_release_info
stdout = subprocess.check_output(cmd, stderr=devnull)
File "/usr/lib/python2.7/subprocess.py", line 223, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '('lsb_release', '-a')' returned non-zero exit status 1
pi@raspberrypi:~ $ python3 -m pip install onnx_tf
/usr/bin/python3: No module named pip
1 Answer 1
What do you mean setup.py not found? What were you trying to do?
Installing different python versions is not advised unless you really know what you're doing.
If you're on the desktop image, you have pip3. If you're on the lite image, run sudo apt install python3-pip
and then you have everything you need.
-
1I get this now using ver. 3.7: pastebin.com/UcfDtAY9 It's different but can I fix this?colonelgdr– colonelgdr2020年10月30日 19:22:15 +00:00Commented Oct 30, 2020 at 19:22
-
2Your pip3 is pointed at python 2. You need to start again with a fresh image.ben_nuttall– ben_nuttall2020年10月30日 23:05:14 +00:00Commented Oct 30, 2020 at 23:05
Explore related questions
See similar questions with these tags.
sudo apt install python3-pip