I'm a python noob working through this intro to python: https://www.youtube.com/watch?v=rfscVS0vtbw. (definitely no need to watch this. Just adding it as context)
It's been going really well, except now I'm up to the part where I need to use pip, and despite having downloaded version 3.8 of Python, it keeps telling me that it doesn't even have pip installed.
I'm wondering if anyone could walk me through what the issue might be and how to actually start using pip in PyCharm.
I've tried downloading pip and installing it but even that doesn't seem to work. If anyone has an ultra-hand-holdy solution (very much for a noob) that would be appreciated.
I feel like the problem might be that I'm putting things in the wrong directories or something? Obviously there are some built-in versions on Python (2.x) already on the Mac so maybe they are interfering?
Thanks in advance for your help.
If I recall correctly, the version of Python that is used when you use the command python is the 2.x version, which doesn't have pip. So if you want to use python in terminal, you should call it as python3 and pip3 for using the pip command.
If you want to set a different Python version as the default one, you can do that. Here is a tutorial that can get you started with that (there's a plethora of other tutorials if this one isn't clear enough): https://opensource.com/article/19/5/python-3-default-mac
For using PyCharm specifically, you can setup the Python interpreter that is used with PyCharm by going to Preferences(or Settings) -> Project:[name of your project] -> Project Interpreter and then chose the desired Python Interpreter from the drop down menu. You can also create a virtual environment there by clicking on the cog icon and choosing Add. This is the preferred way and very convenient to keep installed packages local to your project. After you're done with that, open up PyCharms terminal (at the bottom of your PyCharm window) and you should be able to normally use pip with the command pip.
Alternatively, you can install Python packages in PyCharm using their built in package manager that you can find in the same window where you set your Python Interpreter. Below the dropdown menu you'll see a + sign, where you can click to add packages.
Related
I don't have much experience with Python. Don't judge me for that. I just beg you to tell me how to take use of VPython. I already have Python installed on Mac. Version 3.9.8. At least I believe to know. It's something called IDLE Shell. Apparently I can run normal Python code there. But I didn't found any source telling me how to access on packages like VPython. Is it possible at all in the shell? Tutorials where that package is used I only see on online editors like Trinket or GlowScript itself. Normally access is granted by typing
GlowScript 2.6 VPython and afterwards the specific code follows. However in the shell it gives error invalid syntax. So does another trick exists?
Edit I have installed VPython via Terminal: pip install VPython.
I ran into the same problem as here. So I tried to install python developer package but I didn't find the way to do this.
Cython's helloworld instruction doesn't contain any info about it, which seems strange and stupid to me to not include basic requirements into instruction, named "Basic Tutorial" (Sorry if I don't get something about it.)
Anyway... I'm using Windows 10, PyCharm, virtual environment with python 3. When I went to package install window, search result contained 5 packages:
So, which one?
I tried to install one, but it gives me an error:
I met this error in the past with some other package already. PyCharm's suggestion is to run that command from terminal. But from my experience that never helped. Usually solution was either to change name (because some names are right for Python 2.x, other for Python 3.x), or to download the package (egg/wheel) manually and install it offline.
This question was asked before already, but that one is for linux, which is not the case for me.
Can someone save some time for me and future generations, please? ;)
How do I install it and make Cython's helloworld example work?
In this SO post I outlined my problems, and I would like to try and solve them by getting rid of all my downloaded python launchers, modules, versions, pip etc (for python 2 & 3) and start afresh. My only problem is that macOS comes pre-loaded with python 2 and I don't think I can or should get rid of that, but I do have other versions of python 2 installed that I do want to delete.
Is there any help that you can offer that will tell me what to delete and what not to?
Should I need to use 'sudo' at all during my uninstalling?
Are there any tests to ensure certain things are completely gone?
Please keep answers fairly simple to understand implement.
When I reinstall the things I need, is it better to do it all via home-brew, then pip; instead of downloading from safari, unless necessary?
If you installed using sudo (or typed your password into an installer), you'll need this to uninstall too. Mac python is in /usr/bin/python and /usr/lib/python*. Yes it can be good to install via homebrew, although I've had good success with the Anaconda distro of Python. The important thing is setting you PATH and PYTHONPATH variables in ~/.profile or ~/.bash_profile so that it sees your custom installed Python before it sees the system install.
I'm running openSUSE 13.2. I already had python 2.7.8 and python 3.4.x. I ran into a situation where a business server was running python 2.6. I wanted to make a virtualenv, but I need to install the specific version first. I couldn't find python 2.6 in yast and I wasn't getting any hits when I was search for stuff in zypper.
So I downloaded the tar ball from python's download page for python 2.6.6 and followed the directions in the readme
./configure
sudo make install
This worked, but it changed my default python interpreter in the process. I worked through that and now things are fine. But I might want to install a different python version in the future without having to worry about it changing my default interpreter. I'm pretty sure there's more I could do on my own, but I need to move on to something else and I'm wondering if anybody was some quick feedback on what I've done so far and what I should do in the future.
If you need to maintain distinct versions simultaneously, it's best to install each in its own tree. configure takes an optional --prefix=/path/to/installation/root argument.
At one site, we would install an add-on software package in something like /opt/local/x86_64-linux-gnu/python-2.6.6. Users who need this specific version can then add /opt/local/x86_64-linux-gnu/python-2.6.6/bin to their $PATH, or use virtualenv or GNU stow.
I've been going with a basic Python3.4 install that I've been installing many modules into for over the past month but have reached a point where pip is coming up short and I'm going to just install the full Anaconda on my system to go deeper into bokeh-server stuff.
I get a popup during the Windows 64bit installer (Anaconda3-2.3.0-Windows-x86_64.exe) saying
A version of Python 3.4 (64-bit) is already at C:\Python34\ We
recommend that if you want Anaconda registered as your system Python,
you unregister this Python first. If you really know this is what you
want, click OK, otherwise click cancel to continue.
Didn't find much documentation on this subject, and I'm not really sure how to "unregister" that installation of Python apart from uninstalling it entirely from Windows which I imagine would accomplish such a thing. Is this basically telling me to check how my Python Launcher for Windows is setup after the Anaconda installation? I'm completely unfamiliar with this notion of python system registration? Is that just a round about warning about which python version takes precedence on the system path, or which installation holds the file associations?
The solution is simply to uninstall python (for example, run the original python installer and select the uninstall option). The python key in the windows registry will be removed (which is what unregister means in this context).
Here is a link to a script that will unregister a Python installation (if you haven't come across it already). I personally have not dealt with anything like this. It seems like it should work, but you may have to tinker around with some of the paths in the script to get things to work. The links in #nightuser 's post will also probably fix the issue.
Why not just remove your version of Python? You could do a pip freeze > requirements.txt with your current Python and add them to Anaconda, or create an environment with Anaconda using those packages. Anaconda has greatly decreased the amount of time I spend setting things up.
You are getting that prompt because you have another version already installed the safe way to do this is going to the directory of the existing version and running the uninstaller. Once the previous version is completely uninstalled. You can run the installation as normal it should works!
enter image description hereYou have already installed python in your environment, so your system can handle your python code. Anaconda can handle your python code as well. If you install Anaconda and expect use python provided by Anaconda, then your system will confuse about assigning the code job. To avoid this confusion, there is always a path to point out which python you want.
You can ask your OS to find specific python by changing your environment path in windows OS:
By deleting the python path your Python will be invisible. Changing path is more convenient compared with the uninstall.
If you got a python compiling software like Pycharm, things are different. Pycharm may have python3.6 while your system got python 3.5. You need to delete path in those software or uninstall python specified by those software.
Pycharm
Actually, instead of registering the Anaconda as the system python, you can install it first, then specify your Pycharm and system path to the Anaconda python path. Thus, your Pycharm will use python provided by Anaconda and package & virtual environment you need.
I edit this for lots of times because I got Great wall, so I can't close something pop up in my screen(cause it is Blank). And everything is missing if I refresh. This is annoying.
My system path Anaconda3's python36
Add path in Pycharm
Or you can't use these packages and Anacon's virtual Environment