Python Forum
Wrong pip3 python location or new Version
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Wrong pip3 python location or new Version
I'm in Ubuntu / Linux

I try to install python3.8.2 with the latest version.

before i install i had Version 3.5.2, and that works very well.

but now pip and pip3 is the same linked location:

pip -V
pip 20.0.2 from /usr/local/lib/python3.8/site-packages/pip (python 3.8)
pip3 -V
pip 20.0.2 from /usr/local/lib/python3.8/site-packages/pip (python 3.8)

the problem is why i can't install any packages with the new version error message says: **

sudo pip3 install nltk


WARNING: The directory '/home/fredy/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting nltk
Downloading (1.5 MB)
|████████████████████████████████| 1.5 MB 2.3 MB/s
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python3.8 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-d0mx8gb1/nltk/'"'"'; __file__='"'"'/tmp/pip-install-d0mx8gb1/nltk/'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);'"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-d0mx8gb1/nltk/pip-egg-info
cwd: /tmp/pip-install-d0mx8gb1/nltk/
Complete output (11 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/fredy/.local/lib/python3.8/site-packages/setuptools/", line 19, in <module>
from setuptools.dist import Distribution
File "/home/fredy/.local/lib/python3.8/site-packages/setuptools/", line 34, in <module>
from setuptools import windows_support
File "/home/fredy/.local/lib/python3.8/site-packages/setuptools/", line 2, in <module>
import ctypes
File "/usr/local/lib/python3.8/ctypes/", line 7, in <module>
from _ctypes import Union, Structure, Array
ModuleNotFoundError: No module named '_ctypes'
ERROR: Command errored out with exit status 1: python egg_info Check the logs for full command output.

(pip list)

Package Version
---------- -------
pip 20.0.2
setuptools 46.1.1

(pip3 list)

Package Version
---------- -------
pip 20.0.2
setuptools 46.1.1


how can i come back to python3 with pip3. ?


how can i fix the error so i can work with 3.8.2 ?

What will you do ? :)

Thanks for your time !
I think the trace indicates that you need to run
pip3 install _ctypes

(Apr-02-2020, 02:36 PM)philgoetz Wrote: I think the trace indicates that you need to run
pip3 install _ctypes
That was wrong. ctypes is a module, not a package.
You can see this for info on it:

but I don't know how to install packages, and that documentation doesn't say where to get ctypes or how to install it.

I wish the admin would enable editing or deleting of posts more than 10 minutes after posting, so I could delete my first stupid reply.

(Apr-02-2020, 02:36 PM)philgoetz Wrote: but I don't know how to install packages,
should say "I don't know how to install modules.'

I went back to try to edit this almost immediately after posting it, and it said I'd posted it 31 minutes ago. The timestamping is wrong, so we can't edit posts EVER, let alone within a 10-minute window of posting.

I'm testing to see whether clicking the "reply to" to the initial post makes any difference wrt posting time.

I'm testing to see if "New Reply" will give me a reply that I can then edit or delete.

Nope. Once you've commented on a thread, any new comments on it will be incorporated under your previous comment, so you won't be able to edit or delete them, ever.

Possibly Related Threads…
Thread Author Replies Views Last Post
  Running latest Python version on the Terminal (MAC) Damian 4 255 Mar-22-2021, 07:58 AM
Last Post: Damian
  Building Wheel files (why would it ask for the wrong version?) coreyhanson 1 241 Jan-25-2021, 09:50 PM
Last Post: coreyhanson
  Optimize a game of life (4 sec for python when 6 ms for C version !) fatango 0 184 Jan-06-2021, 09:13 PM
Last Post: fatango
  Error on Python Version? ErnestTBass 6 553 Dec-09-2020, 04:02 PM
Last Post: ErnestTBass
  Last Python (64bit) version for Windows 7? pstein 3 419 Nov-15-2020, 02:09 PM
Last Post: jefsummers
  pip3 install opencv-python fails on 'skbuild' Pedroski55 2 1,323 Sep-15-2020, 11:33 AM
Last Post: snippsat
  Upgrade Python Version ? JohnnyCoffee 2 574 Aug-08-2020, 09:56 PM
Last Post: Larz60+
  Windows 10 Python Version DevSrc8 6 852 Aug-07-2020, 12:36 PM
Last Post: DevSrc8
  Install module with pip3 on a non root user matthewpintor2107 1 653 Apr-28-2020, 03:16 PM
Last Post: pyzyx3qwerty
  Python version on Linux whois1230 5 935 Apr-10-2020, 07:12 PM
Last Post: buran

Forum Jump:

User Panel Messages

Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020