Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: No module named 'docopt' #5

Open
alarichall opened this issue Oct 8, 2017 · 3 comments
Open

ImportError: No module named 'docopt' #5

alarichall opened this issue Oct 8, 2017 · 3 comments

Comments

@alarichall
Copy link

I hope I'm not wasting your time, as I'm very clueless about this sort of thing. When I'm trying to get Linux to work I just fumble about in the dark until something useful happens.

I'm using a Thinkpad X1 yoga 2nd generation
Operating system: Ubuntu 16.04
Kernel: 4.10.0-35-generic (I've tried a few versions of the kernel and this seems to work best so far)

I saved your folder to my home folder and got the following:

alarichall@alarichall-ThinkPad-X1-Yoga-2nd:~$ cd thinkpad_x1_yoga_rotation-master alarichall@alarichall-ThinkPad-X1-Yoga-2nd:~/thinkpad_x1_yoga_rotation-master$ ./thinkpad_x1_yoga_rotation.py Traceback (most recent call last): File "./thinkpad_x1_yoga_rotation.py", line 12, in <module> import dbus, sys, time, subprocess, socket, logging, docopt, multiprocessing, io, os, signal, atexit ImportError: No module named 'docopt'

If you're able to fix this/tell me what I'm doing wrong, I'd be grateful. Otherwise, I hope it provides useful feedback for the future.

Thanks!

@sarmbruster
Copy link
Owner

you need to install a python module, on Ubuntu the most easy way is
sudo apt install python-docopt

The other option is to install pip (using python-pip package) and manage python modules via pip.

@alarichall
Copy link
Author

Thanks for your prompt reply! Alas, that doesn't seem to be helping. Here's what I get after trying to install docopt:

alarichall@alarichall-ThinkPad-X1-Yoga-2nd:~/thinkpad_x1_yoga_rotation-master$ python -m pip install docopt Requirement already satisfied: docopt in /usr/lib/python2.7/dist-packages alarichall@alarichall-ThinkPad-X1-Yoga-2nd:~/thinkpad_x1_yoga_rotation-master$ ./thinkpad_x1_yoga_rotation.py Traceback (most recent call last): File "./thinkpad_x1_yoga_rotation.py", line 12, in <module> import dbus, sys, time, subprocess, socket, logging, docopt, multiprocessing, io, os, signal, atexit ImportError: No module named 'docopt'
If I'm just being incompetent with python, though, don't feel obliged to waste your time on me!

Thanks!

Alaric

@sarmbruster
Copy link
Owner

ah, looks like you have python2.7 and python3 installed - both can coexist.

In this case do a sudo apt install python3-docopt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants