When I do pip --version it show the error as ImportError: No module named pyparsing

I tried installing/uninstalling pyparsing as well and it does not work. I am stuck with this and I have to install additional libraries as well.

Here is the error message:

Traceback (most recent call last): 
File "/usr/bin/pip", line 5, in <module>
    from pkg_resources import load_entry_point
File "/home/rachana/.local/lib/python2.7/site-packages/pkg_resour‌​ces/__init__.py", line 72, in <module>
    import packaging.requirements
File "/home/rachana/.local/lib/python2.7/site-packages/packaging/‌​requirements.py", line 9, in <module>
    from pyparsing import stringStart, stringEnd, originalTextFor, ParseException
ImportError: No module named pyparsing

How can I fix this?

I'm had the same problem and resolved it. Here is you can see that pip not working properly (without any additional parameters).

root@notebook:/home/ci# pip
Traceback (most recent call last):
  File "/usr/bin/pip", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 72, in <module>
    import packaging.requirements
  File "/usr/local/lib/python2.7/dist-packages/packaging/requirements.py", line 9, in <module>
    from pyparsing import stringStart, stringEnd, originalTextFor, ParseException

Okay, so first that we may do is installing broken dependency:

wget https://pypi.python.org/packages/3c/ec/a94f8cf7274ea60b5413df054f82a8980523efd712ec55a59e7c3357cf7c/pyparsing-2.2.0.tar.gz
gunzip pyparsing-2.2.0.tar.gz
tar -xvf pyparsing-2.2.0.tar
cd pyparsing-2.2.0 && python setup.py install

After it mising dependency will be installed from sources.

Trying to using pip one more time:

root@rundeck.euovh01.un.private:/tmp/pyparsing-2.2.0# pip
Traceback (most recent call last):
  File "/usr/bin/pip", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 74, in <module>
    import appdirs
ImportError: No module named appdirs

This is the next problem. And you can fix it more quickly:

root@notebook:/home/ci# python -m pip install appdirs
Downloading/unpacking appdirs
  Downloading appdirs-1.4.3-py2.py3-none-any.whl
Installing collected packages: appdirs
Successfully installed appdirs
Cleaning up...

After that my pip was successfully repaired. Kind regards.

How To Code in Python 3, You can do this by using the import statement: >>> import matplotlib in <​module> ImportError: No module named 'matplotlib' In the case above, the In order to install it, we'll need to leave the interactive interpreter and install with pip as usual: Installing collected packages: pyparsing, cycler, pythondateutil, numpy, pytz,  I am trying to start my Python 3 app in Bluemix and it keeps saying it's trying to start. -----> Uploading droplet (32M) 0 of 1 instances running, 1 starting 0 of 1 instances running, 1 starting 0 of 1 instances running, 1 starting 0 of 1 instances r

Similar to @Oleg Mykolaichenko answer, but using pip:

[sudo] pip install pyparsing

[sudo] pip install appdirs

ModuleNotFoundError when running installed packages · Issue #98 , Could you tell me what $ pipenv run python --version and $ ls -l .venv/bin/python return Can you check the contents of your .venv/lib/python3.6/site-packages for me import main ModuleNotFoundError: No module named 'honcho' I'm working on https://github.com/fny/thecurator/tree/pipenv-failure. i'm not sure, because i got it to work by not using apt-installed pip and instead installed pip via easy_install because when installed via apt it created a dependency issue because the version of pip in the apt repo also used url3 and made it stuck at the wrong version, unable to get a compatible version for aws-cli. see the link i posted

ah! I was stuck with for an hour and found this out

pip3 install pyparsing

python -m pip install --user -r $IDF_PATH/requirements.txt alway , Command "python setup.py egg_info" failed with error code 1 in requirements.​txt (line 10)) You are using pip version 9.0.1, however version 18.0 is available. You should consider ImportError: No module named _internal For general help with ESP-IDF installation please check esp32.com forum. Dismiss Join GitHub today. GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.

Changelog, Rename an internal module, to avoid ImportErrors due to improper uninstallation. Add option --no-python-version-warning to silence warnings related to deprecation of Do not attempt to run setup.py clean after a pep517 build error, since a Use canonical distribution names when computing Required-By in pip show . Running the --delorean-setup locally is actually failing for me with (not sure what the difference is compared to CI, but probably is due to using the infra created CentOS image which has updated pip/virtualenv already): ImportError: No module named six.moves This is an expected problem with newer versions of setuptools per pypa/setuptools#942

Installation, Once you have a copy of the source, you can embed it in your own Python package, You might get errors like the listed below when running Wfuzz: CPPFLAGS="-I/usr/local/opt/openssl/include" pip install --no-cache-dir pycurl In newer Ubuntu versions, you can install libcurl openssl flavour: No module named bottle. I use command pip install matplotlib to install it successfully. But when I type pip list, there is no matplotlib package in the list. When I try python2.7 -c 'import matplotlib; print matplotlib.__version__, matplotlib.__file__' It show

CNNScoreVariants problem? Slow or stopped?, You can find our new documentation site and support forum for posting There are no error messages but the process is not consuming any CPU gatk --java-​options -Xmx5G \ line 1, in <module> ImportError: No module named vqsr_cnn. I have updated the document now to show the current testing  ImportError: No module named 'bs4' 1 Answer Databricks 5.5 w/Conda: Still uses pandas 0.24.2 after installing pandas 0.25.0 2 Answers Use external libraries for python-only-jobs (Not for Notebooks) 0 Answers

Comments
  • easy_install pyparsing?
  • Its not working still ! tried all possibilites
  • Please include the exact error messages in your question
  • Traceback (most recent call last): File "/usr/bin/pip", line 5, in <module> from pkg_resources import load_entry_point File "/home/rachana/.local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 72, in <module> import packaging.requirements File "/home/rachana/.local/lib/python2.7/site-packages/packaging/requirements.py", line 9, in <module> from pyparsing import stringStart, stringEnd, originalTextFor, ParseException ImportError: No module named pyparsing
  • What does easy_install pyparsing return?
  • Thanks! You're a life saver. I had to run the install commands with sudo, the otherwise this solution worked perfectly.
  • awesome! do you know what caused this error in the first place?
  • This did not work. The problem is that pip is broken because pyparsing is missing, so running pip install pyparsing will just produce the same ImportError: No module named pyparsing error.