I’m using windows 7.
Your suggestion definitely made a difference, I now get the error:
debug, PYTHONPATH c:\python27\lib;c:\python27\lib\site-packages
Traceback (most recent call last):
File "main.py", line 12, in init main (C:\users\vagrant\appdata\local\temp\tmpmqvpk4\main.c:2978)
File "c:\python27\lib\site-packages\requests\__init__.py", line 60, in <module>
from .packages.urllib3.exceptions import DependencyWarning
File "c:\python27\lib\site-packages\requests\packages\__init__.py", line 29, in <module>
import urllib3
ImportError: No module named urllib3
The obvious next thing to try was pip install urllib3
, which installs fine. pio account register
then gives the following error
debug, PYTHONPATH c:\python27\lib;c:\python27\lib\site-packages
Traceback (most recent call last):
File "main.py", line 12, in init main (C:\users\vagrant\appdata\local\temp\tmpmqvpk4\main.c:2978)
File "c:\python27\lib\site-packages\requests\__init__.py", line 60, in <module>
from .packages.urllib3.exceptions import DependencyWarning
File "c:\python27\lib\site-packages\requests\packages\__init__.py", line 29, in <module>
import urllib3
File "c:\python27\lib\site-packages\urllib3\__init__.py", line 8, in <module>
from .connectionpool import (
File "c:\python27\lib\site-packages\urllib3\connectionpool.py", line 7, in <module>
from socket import error as SocketError, timeout as SocketTimeout
File "c:\python27\lib\socket.py", line 47, in <module>
import _socket
ImportError: No module named _socket
Motivated by your hint to add things to PYTHONPATH
, I had a look at my sys.path
which has the following contents:
['', 'c:\\python27\\lib', 'C:\\Python27\\python27.zip', 'C:\\Python27\\DLLs', 'C:\\Python27\\lib\\plat-win', 'C:\\Python27\\lib\\lib-tk', 'C:\\Python27', 'C:\\Python27\\lib\\site-packages']
Given that _socket
suggests a python binary library, I tried:
set PYTHONPATH=C:\python27\lib;C:\python27\dlls
Running pio account register
after this was successful!
Does this give you enough information to turn this workaround into a fix? Does this indicate that my configuration is somehow broken, or is this a problem with platformio?