EEVblog Electronics Community Forum
Electronics => Beginners => Topic started by: Muffins on May 19, 2018, 06:15:54 am
-
Hi Guys,
I'm trying to get ESP-Link (https://github.com/jeelabs/esp-link#getting-started) onto an ESP12F. I'm a windows user and the process seems to favor users running linux and python.
I've been following the tutorial described on its github page:https://github.com/jeelabs/esp-link/blob/master/FLASHING.md
I get down to this point:
> git clone https://github.com/themadinventor/esptool.git
Cloning into 'esptool'...
remote: Counting objects: 268, done.
emote: Total 268 (delta 0), reused 0 (delta 0), pack-reused 268
Receiving objects: 100% (268/268), 99.66 KiB | 0 bytes/s, done.
Resolving deltas: 100% (142/142), done.
Checking connectivity... done.
(no problems up to this point)
> cd esptool
> python setup.py install
After which I get the error:
python: can't open file 'setup.py': [Errno 2] No such file or directory
However, the file is present in the directory! I have checked the path and it seems good. Admittedly I have run so far into the night on this one I barely know what I am doing. I've included an image in the attachments of my results.
-
try putting the full path in front of setup.py (C:\windows\system32\esptools\setup.py)
-
I just tried, it gives the same error.
-
I just tried, it gives the same error.
what version of python do you have installed?
-
I know it seems dumb but have you made shure that the command prompt working directory is the same that contains your installation file?
-
I have Python 3.6 installed.
filssavi, what is meant by command prompt working directory?
-
You need to execute those python commands inside the folder of your esptool git clone.
-
.
-
To invoke it in the folder don't you include the path in the command?
C:\Windows\System32\esptool>python .\setup.py install
Also gives the same error.
-
The whole procedure works as described in the FLASHING.md file.
There's a number of problems with your setup:
- You are doing this as administrator, it's not needed here. Your regular user should never be an adm.
- You are in a system protected directory "C:\Windows\System32\". You should not treat it as any old folder.
So:
- Do this as a regular user
- Move the git repo in a regular folder.
See the attached screenshots.
-
.
-
But, in what folder do you have the setup.py script? In C:\Windows\System32\esptool?
The OP cloned the whole thing in the System32 directory. This is a no-no.
As my screenshot shows, even if the file is there one cannot access it.
ETA:
The actual explanation of this is the so called "File System Redirector (https://msdn.microsoft.com/en-us/library/windows/desktop/aa384187%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396)", that Windows 64 bits versions use to maintain backward compatibility with 32 bits executables.
The System32 directory on 64bits systems contains 64bits dlls, so any 32 bits executable would find itself using the wrongly sized dll.
With FSR, when a 32 bits exe opens anything located in the System32 dir it's redirected to SysWOW64, where the system 32 bits dll are located.
Python is distributed as a 32 bit application.
-
.
-
Your working directory in this case is C:\
Running the setup from there is really ill advised (you are likely to incurr in further permissions problems) you usually run python from the directory the setup script is in
Also is there any reason why the setup/source folder is in system32 (again you are asking for permission problems to happen there) you usually keep that stuff in download the script will copy stuff where it needs to in order for stuff to work
It could also be a permissions problem since in recent windows releases the OS prevents even admin user to touch stuff in system32
What I would do is download the stuff again and run the installer from a sensible place (the downloads folder for example) and let python do the rest
To run it you go with the terminal/command prompt (by means of cd) to the exact folder you have the setup script in and then run python ./setup.py install
-
Thanks guys, I installed the ESPtool to a directory outside of system32 and was able to run it.
I appreciate your input.