I've downloaded pygame-1.9.1release.tar.gz from the Pygame website. I extracted and installed it and it's working fine in the command line Python interpreter in Terminal (Ubuntu). But I want to install it for some IDE, like PyCharm. How can I do it?
Well, you don't have to download it for PyCharm here. You probably know how it checks your code. Through the interpreter! You don't need to use complex command lines or anything like that. You need to is:
Download the appropriate interpreter with PyGame included
Open your PyCharm IDE (Make sure it is up to date)
Go to File
Press Settings (Or Ctrl + Alt + S)
Double click on the option that looks like Project: Name_of_Project
Click on Project Interpreter
Choose the interpreter you want to use that includes PyGame as a module
Save your options
And you are ready to go! Here is an alternate (I have never done this, please try to test it)
Add PyGame in the same folder as your PyCharm file (Your PyCharm stuff is always in
a specific file placed by you during installation/upgrade)
Please consider putting your PyCharm stuff inside a folder for easy access.
I hope this helps you!
For PyCharm 2017 do the following:
File - Settings
Double click on your project name
Select Project Interpreter
Click on green + button on the right side of the window
Type Pygame in search window
Click Install package.
Not I'm saying that the answers above won't work, but it might be frustrating to a newbie to do command line magic.
If you are using PyCharm and you are on a Windows 10 machine use the following instructions:
Click on the Windows start menu and type cmd and click on the Command Prompt icon.
Use the command pushd to navigate to your PyCharm project which should be located in your user folder on the C:\ drive. Example: C:\Users\username\PycharmProjects\project name\venv\Scripts.
(If you are unsure go to the settings within PyCharm and navigate to the Python Interpreter settings. This should show you the file path for the interpreter that your project is using. Credit to Anthony Pham for instructions to navigate to interpreter settings.)
HINT: Use copy and paste in the command prompt to paste in the file path.
Use the command pip install pygame and the pip program will handle the rest for you.
Restart you Pycharm and you should now be able to import pygame
Hope this helps. I had a fun time trying to find out the correct way to get it installed, so hopefully this helps someone out in the future.
I just figured it out!
Put the .whl file in C:\Program Files\Anaconda3
While in the folder, click on the blue File tab in the upper left corner of the Window Explorer (assuming you're using Windows)
Click on Open Windows PowerShell as administrator
Write or just copy and paste: py -m pip install pygame
It should start installing
Done!
I hope it works for you. I know it did for me.
I already had pygame installed with python38-32
since its working just fine with it. I used this version of python us my project interpreter.
1.File -settings
2.according to your settings look for project interpreter
3.click on your current project interpreter and click on the add symbol
4.choose system interpreter
5.select the python version thats works with pygame for you
6.Note: some versions of pygame don't work with some versions of python be sure
of what are you doing.
7.hope it works.
Related
I've looked around but I've only found answers for past versions. I have a new version of WebStorm and I want to open my projects from the command line, but wstorm . and webstorm . doesn't seem to work.
I've tried going to Tools > Create Command Line Launcher... and I get this:
I go to ToolBox's WebStorm Settings and I'm met with this:
Generate shell scripts is turned on, but the but the commands still do not work in my terminal.
Am I missing something? Am I supposed to add in a Shell scripts location? I'm not entirely sure I understand.
It's actually very easy. First you open up Webstorm, and press SHIFT twice. This will bring up a search box, where you type: Create Command Line Launcher. You will see a search result from Tools will be highlighted, click on it, and it will suggest the default path. Just click on Ok. Your command line launcher is now ready, so you can open terminal, cd to your project root folder, and type webstorm ./ to launch webstorm.
If the Create Command Line Launcher option is not working, try the following:
If you are on MacOS, try adding the path as instructed in their official page. And if you are on Linux, just uninstall the current version and reinstall as a snap package using sudo snap install webstorm --classic. This way, you can launch it from the terminal just by typing webstorm
After opening a ticket with Jetbrains support, the default path is /usr/local/bin. Adding this worked.
You can use open-ide tool. It allows you to define all of your editors and to open any folder with your editor straight from terminal
Error message showing is :
The specified target component - nb-base/8.0.1.0.201408251540 was not
found in the registry. The installer can continue as if the target
component was specified. Click yes to continue, No to exit the
installer.
I have tried a lot to uninstall my NetBeans8.0.2 but were unable. After lot of googling found out a solution. I think I should have and entry in stackoverflow.
Best way to remove Netbeans can be done using following steps
Remove the Netbeans folder from program file
Delete the .nbi(hidden) folder from your C:\User{Current User}
Go to control panel and remove it
It works for me hope it will you too!
Actually Devashish's answer is (partly) correct. If you click link provided by him, you will see that the problem (most likely) is because the install was done by a different user than the user who is uninstalling. (In my case, I added an admin user after the Netbeans install, so all computer changes now pass through the admin user)
Here is what I did to complete the install:
Find a .nbi folder under C:\Users\folder. This folder has .nbi folder under it
Open a command prompt and Go to NetBeans folder which has uninstall.exe
Run this command in the command prompt:
uninstall.exe --userdir c:\Users\folder\\.nbi
folder is the folder you found in step 1.
This uninstalled for me. Hope it helps you.
Go to C:\Users{User}\AppData\Roaming\NetBeans
Delete "lock" file
Uninstall NetBeans
Please follow the link to have a solution:
https://netbeans.org/bugzilla/show_bug.cgi?id=251943
The comment 5 has easiest solution:
Run Command Prompt in Administrator mode and run the following command :
uninstall.exe --userdir c:\Users\Administrator.nbi
Does not seem to work in my Win 10 environment. I've also tried
.\uninstall.exe --userdir c:\Users\Administrator\.nbi
.\uninstall.exe --userdir c:\Users\Administrator.nbi
'NetBeans 8.0.1'\uninstall.exe --userdir c:\Users\eric_2\.nbi
.\'NetBeans 8.0.1'\uninstall.exe --userdir c:\Users\eric_2\.nbi
.\'NetBeans 8.0.1'\uninstall.exe --userdir c:\Users\eric_2.nbi
You get the point. I'm running the WindowsPowerShell as an Administrator.
Someone here must have successfully deleted it even with the error message from the OP. I just have to find out who!
Eric
After struggling here and there, I:
Opened c:\Users\XXX\AppData\Roaming\NetBeans\8.2\lock where XXX was the user name. Then, I renamed lock. (The name didn't matter.)
Then, I went back and uninstalled NetBeans.
By the way, I had to delete Java separately.
I was having the exact same problem as above.
Prior to the "symptoms", I installed the application in a newly created folder on the C drive (Not the Program Files default installation directory).
I then changed the name of the folder directory where the executable was installed to enable a third-party script to launch the NetBeans executable as the script required no spaces in the path. In any case, in attempting to uninstall the application again, I got the above error.
I tried running the command as outlined above (namely) running the command prompt with the following:
C:\Netbeans\NetBeans 8.0.2>uninstall.exe --userdir C:\Users\mark.burl.nbi
it launched the uninstall but the same error popped up.
I then undertook the following and the problem was solved for me:
I manually deleted the NetBeans executable folder.
I then reinstalled NetBeans to the default Program Files location.
I then uninstalled NetBeans again no problem.
From PowerShell as administrator I removed all directories here described and finally enter regedit and search for all occurrences of “NetBeans (x86)”. And delete all of them then restart and after that everything is clear
You need to do the following:
Go to C:\Users{User}\AppData\Roaming\NetBeans
Delete the folder named after your Netbean version you want to uninstall
Uninstall NetBeans
Finally i found the reason. i.e while installing NetBeans i used our IT Team Admin credentials (assume user-1 ). But i am uninstalling with my credentials(assume user-2).
So, you can't uninstall. Follow below steps.
1.Go to C:\Program Files\NetBeans 8.0.1> you will find uninstall.exe file.
2.Find who is installed your netbeans for me user-1 (Admin).(You can find all users here C:\Users )
3.Then search for .nbi folder you can get at C:\Users\{user-1}\.nbi
Note: here user-1 is who installed your NetBeans initially.
finally open cmd prompt and run the command below given.
C:\Program Files\NetBeans 8.0.1>uninstall.exe --userdir C:\Users\{user-1}\.nbi
referred from https://stackoverflow.com/a/45387962/10971996
I had the same problem and no matter how hard I tried it won't uninstall until I installed it all over again then uninstalled.
Stop/ pause protection for your anti-virus. Then click on un-install. It will work for sure.
I am having a problem starting Canopy.
I was running a large calculation when I restarted the kernel.
Ever since then I have not been able to get Canopy to open to the editor. When I open the program, The 'Welcome to Canopy' window opens but when I try to open an editor or a recent file I get the following error:
"The kernel (user python environment) has failed to start. Please verify that the kernel interpreter path is correct."
I have tried closing and opening Canopy.
Shutting my computer down and starting Canopy.
Uninstalling and re-installing Canopy (I started with 1.1 and this time downloaded 1.2)
And followed the directions at https://support.enthought.com/entries/23097479-Restarting-Canopy-after-Unexpected-error-ParseError-
When I click on the Show Details button in the error window, it says:
Error message:
[Error 740] The requested operation required elevation
How can I get Canopy up and running again? Or are there other environment better than Canopy for free download?
Thanks
This is a new one! Are you by chance running Windows Vista? If not, which Windows version? Are you still logged in as the same user that you were before the original crash? Any other changes that you have made in the system configuration?
I suggest that you delete the following directories
C:\Users\<your user name>\AppData\Roaming\Enthought
C:\Users\<your user name>\AppData\Local\Enthought\Canopy\User
C:\Users\<your user name>\AppData\Local\Enthought\Canopy\System
then restart Canopy. When it asks you, accept its default locations for the environment path.
Note that to see the AppData directory in Windows Explorer, you must set Explorer to show hidden files (Computer / Organize / Folder & Search Options / View / Advanced settings / Show hidden...)
For the better than canopy part of your question, try Anaconda it's put out by Travis Oliphant, formerly of Enthought, and creator of NumPy and SciPy ... and it's awesome. It comes with Numba, which nearly eliminates the need for Cython or writing c-extensions in general. For your first question, I have no experience with canaopy other than frustration so I am no help.
Anaconda can be downloaded for free here
I had both Python 2.6 and 2.7 installed on my system and IDLE that I used (by right clicking on a Python file and selecting 'edit with IDLE') was from version 2.6. For some reason, I had to completely remove Python 2.6 form my system. Now, Python files don't show 'edit with IDLE' on right click, even though IDLE 2.7 is installed. I have also tried uninstalling Python 2.7 completely and re installing it. What could be wrong?
Thanks
Happened with me too once.
Install Python. Then open IDLE and save an empty file with a .py extension. Then close IDLE. Go to the file that you have just saved. Then right click >> open with >> choose default program. Then choose python. There will be some more options like pythonw but you only choose python. After you are done, right click on the file and you will find "Edit with IDLE"So, that is it.
The way to do it is to go right click on the file then choose look another app on PC and go C:\Python27\Lib\idlelib and choose the idle (batch file for windows)
I'm new to Python and Django. In fact, I'm new to web framework too. I'm using Windows 7 OS and have installed Django.
I knew Django has been installed successfully. When I go to tutorials, this command, "django-admin.py startproject appproject" always suggested to be run before starting the project.
However, when I run this command, django-admin.py was not recognized as keyword.
Can anyone please help me to see what's wrong here?
On windows python scripts get installed to C:\Python27\Scripts (by default for Python2.7). However the python installer does not automatically Add this location to your PATH. What you need to do is either replace any call to django-admin.py with C:\Python27\Scripts\django-admin.py, or add it to your path. You can do that by:
Open your Start Menu and Locate My Computer, Right Click on it and choose Properties
On the left hand side select "Advanced System Settings".
Next click on the "Environment Variables" button.
Look in the bottom scroll box until you find one named PATH. Select this and hit Edit.
To the end of the current value, append ";C\Python27\Scripts".
Close/Save everything, including your cmd.exe prompt. When you reopen it C:\Python27\Scripts should be on your path, and django-admin.py should work.