0

I have apache ampps which comes with version 3.6.1 of python. I was given various directions for installing pip. None seemed to work.

For example, link https://packaging.python.org/tutorials/installing-packages/ says that I can run:

python -m pip install -U pip setuptools

Get a whole bunch of errors. It might amount to: no module named queue.

Similar errors happen when I download the file they mentioned (get-pip.py) and run it from python.

Now, when I look at directions for installing queue, some point me to use pip. But when I try to install pip, it is complaining that queue is not there.... Hmmm...? Now what?

ERROR:

   File "C:\Users\Nima\AppData\Local\Temp\tmp1v2hpnae\pip.zip\pip\compat\__init__.py", line 11, in <module>
   File "C:\Program Files (x86)\Ampps\python\lib\logging\config.py", line 30, in <module>
         import logging.handlers
   File "C:\Program Files (x86)\Ampps\python\lib\logging\handlers.py", line 28, in <module>
         import queue
   ModuleNotFoundError: No module named 'queue'

   During handling of the above exception, another exception occurred:

   Traceback (most recent call last):
     File "getpip.py", line 20061, in <module>
       main()
     File "getpip.py", line 194, in main
       bootstrap(tmpdir=tmpdir)
     File "getpip.py", line 82, in bootstrap
       import pip
     File "C:\Users\Nima\AppData\Local\Temp\tmp1v2hpnae\pip.zip\pip\__init__.py", line 26, in <module>
     File "C:\Users\Nima\AppData\Local\Temp\tmp1v2hpnae\pip.zip\pip\utils\__init__.py", line 22, in <module>
     File "C:\Users\Nima\AppData\Local\Temp\tmp1v2hpnae\pip.zip\pip\compat\__init__.py", line 13, in <module>
     File "C:\Users\Nima\AppData\Local\Temp\tmp1v2hpnae\pip.zip\pip\compat\dictconfig.py", line 22, in <module>
     File "C:\Program Files (x86)\Ampps\python\lib\logging\handlers.py", line 28, in <module>
       import queue
     ModuleNotFoundError: No module named 'queue'
anthony sottile
  • 61,815
  • 15
  • 148
  • 207
Luv
  • 49
  • 3
  • 9
  • Are you sure pip isn't already installed? It is installed mostly with python. –  Aug 25 '17 at 18:02

3 Answers3

-1

From the format i see here.

Firstly, pip is an installer basically what you've confused yourself with is that pip = queue which is not the case. Pip is just a packager that helps you install packages. Queue is a different module

For your case here Queue is a part of multiprocessing module so you just put this at the top of your code:

from multiprocessing import Queue

and you do not need to add import pip into your code

hope that explained things better for you :)

Rahul
  • 9
  • 2
-1

This line: python -m pip install -U pip setuptools means use pip to upgrade the installations of pip and setuptools. Only works if you already have pip - which you probably do. It is a useful step to make sure your install environment is up to date, though.

pip does in places use queue. Note it's been renamed between python2 and python3 - if you have py3, which you claim, you have queue (it was Queue in py2). So I wonder if there's a version mismatch in something.

Windows installs always create problems. You might be safer installing and experimenting with a virtualenv so your experiments don't mess up the python install from the package you mention - ampps. There are plenty of notes on that elsewhere on stackoverflow... e.g. Python and Virtualenv on Windows

Mats Wichmann
  • 800
  • 6
  • 6
-1

pip is already included in 3.6.1, but it is in subfolder Scripts. it is not automatically a part of the path variable. you have to change directory and run pip or you can change environment variable so that the location of pip becomes part of the path search.

Luv
  • 49
  • 3
  • 9