I always fails when compiling WebKit , OS : Windows10 1809 x64 - python

1).Before compiling WebKit, I reinstalled Windows 10. The terminal I used when
compiling it was PowerShell.
2).The guide I use is here: https://webkit.org/webkit-on-windows/,I did not
install cygwin.
In addition, I set up two environment variables in accordance with another
guide: WEBKIT_LIBRARIES & WEBKIT_OUTPUTDIR. This guide is here:
https://webkit.org/building-webkit-on-windows
3).The main problem is that when I run "perl build-webkit" in powershell,
it will report an error:
"Free to wrong pool 1b8e80 not 9504a10099d76a14 at
C:/Perl64/lib/IO/Socket/SSL.pm line 2739.
Can't spawn "perl Tools/Scripts/update-webkit-support-libs": No such file
or directory at build-webkit line 257.
Died at build-webkit line 257."
and every time I run this command, I will receive almost the same error, for
example, I just ran it again.Then the error is as follows:
"Free to wrong pool e38e80 not 95054c000387c36b at
C:/Perl64/lib/IO/Socket/SSL.pm line 2739.
Can't spawn "perl Tools/Scripts/update-webkit-support-libs": No such
file or directory at build-webkit line 257.
Died at build-webkit line 257."
4). I tried to solve my problem through Google search, but I didn't find any
useful content, so give me some help please, thanks.

You can start powershell as user or as administrator. I'll suggest, you retry executing as administrator. If you are a regular user or logged on as admin, it's not the same than the right mousebutton to find the right way.
Be sure, that you have all scripts. Maybe, that your archive is buggy.

Sometimes its useful, to place the dll into the system32 directory. I think, that in your case, the mistake is in assiciation. You have both on Win10x64, the x86 and x64 dll's.
I'll suggest, that you try to build on a win7 x86 win32 first. Second step should a contact to the mozilla webkit team.
My experience of Cygwin was a very short one. It's like a toy without battery.

The problem has been solved by running the command "perl build-webkit -- skip-library-update" in PowerShell.
It's better to download and extract WebKitAuxiliaryLibrary.zip and WebKitSupportLibrary.zip to the right location first, and then build-webkit.

Related

Why does my VS Code not recognize 'python' as an internal or external command

so I just considered using VS Code for writing python as i'm settling into programming. After following the full guide here: https://code.visualstudio.com/docs/python/python-tutorial and everything seemed ok.
But my code wont run, but runs well in my PyCharm but on VS Code it pops this error below:
"'python' is not recognized as an internal or external command,
operable program or batch file."
I have followed threads here advising reboot of computer and all but its not working for me, I would love to at least know what the problem is because my decision to use VSC is because i'd like to have one IDE that supports more languages so that write in one place or at least a few IDEs.
Any help will be appreciated.
Thanks in advance.
thanks, I've fixed it by uninstalling the existing python and reinstalling latest version, most importantly i realized i was adding a new path instead of editing the existing path. In recent windows clicking edit on the existing path will open a new dailog where you can then add a new path, that will be added to the existing path. Then I restarted my computer and then typed python --version at command prompt and there it was :) by the way this link (geek-university.com/python/add-python-to-the-windows-path) was most helpful but you have to do it as i described.

My VSC always opens a file when something is executed in shell - How to prevent this?

I am sorry if this question is maybe trivial but i couldn't come into the formal description of the problem, thus have not really found the answer yet.
So with basic english, everytime the shell executes some programm,
ex.
jupyter notebook
or
virtualenv <name>
I expected the shell to:
run a notebook server
or
make a virtual environment folder
instead the file which responsible for the execution is opened in my VS Code.
I don't know what option did I chose while i installed VSC so maybe i'm missing something here?
Thanks for the answer.
I just changed default opening program of *.py file into powershell and it shows this error. This is going forward
when executing jupyter notebook
Could not load file or assembly 'System.Management.Automation,
Version=3.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The
paging file is too small for this operation to complete.
(Exception from HRESULT: 0x800705AF)
and when executing virtualenv :
Thread failed to start.
I got this link for some insight:
Could not load file or assembly 'System.Management.Automation'
will update here for further solution.

Trying to directly run .py file using Enthought Canopy Python on Windows 7

I am trying to set up Canopy with Windows so that it will not, by default, try to open as a GUI. Essentially I want to do exactly this:
http://docs.enthought.com/canopy/configure/canopy-cli.html#create-epd-dist
The only problem is that the instructions listed here do not seem to work as expected.
Here's what I want to happen. I have a folder full of scripts. The folder (my_program/) is in my path. I want to call script_1.py on the command line from any directory and have it execute. With the old Enthought distribution this is what happens. It is also what happens with Canopy on Mac. However, running Canopy on Windows, instead the Canopy GUI pops up with script_1.py open for editing.
I ran this command as in the docs:
Canopy\App\Canopy_cli.exe setup C:\Python27 --set-default
It created a "Canopy 64 bit (standalone) Command Prompt" in addition to the regular Command Prompt. However, the behavior in both this new Command Prompt and the regular Command Prompt remains the same -- script_1.py simply opens the Canopy GUI.
Here is my PATH variable:
c:\python27\scripts;
c:\users\****\appdata\local\enthought\canopy\user\scripts;
C:\Users\****\AppData\Local\Enthought\Canopy\User;
C:\Users\****\AppData\Local\Enthought\Canopy\User\Scripts;
C:\Python27;
C:\Python27\Scripts;
C:\Users\****\Documents\my_program;
Any ideas why I'm not able to set up Canopy as an EPD-like environment, or how to do so? Thanks!
Update:
First, I ran this command as Jonathan March outlined in his answer:
ftype Python.File=c:\Users\**\AppData\Local\enthought\Canopy\User\Scripts\python.exe %1
However, with this the behavior remained the same. The above turned out to be half of the solution.
Fortunately, I was able to get it working using regedit. I had to edit Computer\HKEY_CLASSES_ROOT.py by changing the default from "Enthought.Canopy" to "Python.File". And I also changed Computer\HKEY_CLASSES_ROOT.py\OpenWithProgIds by deleting the "Enthought.Canopy" key and adding a "Python.File" key.
I'm really happy to have it working, however mucking around with regedit is a difficult task for Windows users of my software. Now I'm wondering, is there a simpler way to do this, perhaps in the install script that puts my folder of command-line scripts into their path? Any ideas are appreciated.
Sorry for the confusion -- "EPD-like" refers to running python directly, not to the windows file associations, but I can definitely see your point. Here's how to get what you want:
1) Even if you are a full admin on this system, open an "Administrator:Command Prompt" window as described in in steps 1 and 2 in this article: https://support.enthought.com/entries/23736288-Windows-On-some-systems-admin-users-cannot-immediately-install-for-all-users-
2) In this window, type the following command at the command prompt:
ftype Python.File=c:\Users\**\AppData\Local\enthought\Canopy\User\Scripts\python.exe %1
Test that it now works as desired, then close this window.

NameError: name 'ls' is not defined

I am running Windows 7 and just installed Python 2.7.4 and all I get are SyntaxError:'s. For example when I type:
>>>ls
I get
Traceback (most recent call last):
file "<stdin>", line 1, in <module>
NameError: name 'ls' is not defined.
I am new to Python and have no idea what the problem is.
Math calculations work as well as code seems to work. It's just commands like cd, ls, sudo apt-get update (and upgrade). Any guidance would be appreciated.
I think it's unfortunate that you're being downvoted so heavily here. If you're new to programming, this can be an honest mistake to make since a lot of tutorials assume that you're already familiar with the command line.
The main problem you have (as others have pointed out) is distinguishing between the operating system shell (which is also known as the console, terminal, command line, or command prompt) and the Python shell.
The operating system shell/command prompt is one of the fundamental ways you can interact with your computer. When you open the command prompt, you run arbitrary programs by typing in their name, run commands such as ls, sudo, cd, and apt-get.
If you type in python, for example, it'll cause the command prompt to start the Python shell. From there, you can run all of the Python commands, as usual. However, this is an entirely separate program with an entirely separate set of rules. The things you can do in the command prompt will not work in Python, and vice-versa.
Now, another point of confusion is distinguishing between the Windows command prompt and the Linux command prompt. You can install and run Python in both, but certain commands (in particular, sudo and apt-get) are available only on Linux operating systems. Unfortunately, the rules for using the Windows command prompt and the Linux command prompt differ somewhat, meaning that some instructions you find will be applicable only in one kind of operating system.
So no wonder you're confused! You're trying to learn about Python, but a good number of tutorials/articles will mention this second, entirely different system with hardly a word of introduction, and expect you to already know how to use it.
If you're curious about learning more about using the command line, here's a good crash course you can read. It'll teach you what you need to know for all 3 major operating systems (Windows, Linux, and Mac) and will hopefully make what you read online more clear.
I see from your profile you are learning about Raspberry Pi. A Raspberry Pi can use Debian (or Ubuntu, which is based on Debian) as the Linux distribution. The commands you are trying in Python are shell commands to run on that operating system.
Python is another command you can run on Raspberry Pi, but that doesn't mean that installing Python on Windows gives you those other commands on Windows too. You have two entirely different things confused here.
it's just commands like cd, ls, sudo apt-get update (and upgrade). Any
guidance would be appreciated
Python doesn't support those commands. Those are operating system level commands, not python level commands.
The Root of my problem was that I was not asking the right question. I was trying to run scripts in the interactive-mode and entering 'ls' and 'dir' to see where I was in the directory. With everyone's guidance I finally found the part in the Docs about Executable Python Scripts that said Windows automatically associates the 'py' extension with python.exe.
here. Then it all came together in my head. I had associated the 'py' extension with my editor instead of python and that I should have been at the Windows command prompt.
Thanks for everyone's help and quick responses.
The answers above are correct, but they don't help you with your issue!
One solution that will work in Python is:
%ls

How to install python 3.2.3 on Windows 7 enterprise

although I have been using python a long time very easily in a Linux environment, I have tremendous trouble to even install it correctly in a windows environment. I hope this is a question to be asked here, as it is not directly a programming question.
Especially, I have the following problems:
When on the command line, python is not a recognized command. Do I have to set the Windows path manually myself? If so, how to do that?
When starting a python script, should this be done with python.exe or pythonw.exe? What is the difference?
I also tried to install ipython several times, it never got installed (even after following the starting ipythonenter link description here thread.
When starting a script with python.exe, a window pops up and closes immediately. I saw some hints in putting in a readline command, which is of no help if there is a syntax error in the script. So how to be able to keep the window open, or how to run the command on the cmd.exe?
Thank you for any help on these items.
Alex
1) Look here: www.computerhope.com/issues/ch000549.htm
2) It has already been answered, always try to use search before asking question:
pythonw.exe or python.exe?
4) When using cmd.exe just navigate to your script folder using dir for changing directories and C:,D:,etc. for changing drives. Then run script by typing just the script name. When installed correctly, Python automatically launches .py scripts with python, so you don't have to write 'python' before script name. When run in cmd, window will stay open. If you want it to stay open even when launching script with double-click, use function waiting for user input, see here How to keep a Python script output window open?
You might want to use Python3.3, there is a new launcher for Python scripts in it. By that, you can start Python scripts with py <scriptname> which has the benefit of being installed in your path (C:\Windows\system32) and you can use a shebang to tell whether the script is for Python2 or Python3.
Also
In addition to the launcher, the Windows installer now includes an
option to add the newly installed Python to the system PATH
(contributed by Brian Curtin in issue 3561).

Categories