![]() ![]() As a CS student sooner or later you will have to learn all of the above and nothing will make it stick better than figuring out by yourself the “how”. Now, for obvs reason I can’t into the tiny details that you are probably expecting, I can’t guide you step-by-step in a Reddit. What you are looking for is called pypi: Or use pyenv, which can manage different versions for you in a relatively easy way (so that you do not have to worry about the $PATH). zshrc), or add the interpreter to P圜harm by picking the exact location where v3.9 is installed. You will need to either figure out where Python 3.9 is installed and add it to your $PATH (for example in your. How did you install Python 3.9? Did you use brew? Did you compile it from source? If I had to guess I would say that the new version is installed somewhere in a location that is not in your $PATH. P圜harm is smart enough to create one for you if you need. So yes, always use a virtual environment for your projects. What you want is to create a virtual environment (or venv) where you can install whichever package you need for a specific project and keep said packages isolated from your OS Python and any other projects. You may need different versions of the same package for different projects and trust me it can be hard to manage that. You do not want to install/uninstall all these packages in your OS Python or generally speaking “in the same place”. ![]() You’ll end up installing a lot of different packages (using pip). The latter is (IMO) the best choice to handle different versions of Python. A note here: you could use brew to install another version of Python, you could download the tar.gz and compile it yourself or you could use pyenv. In addition to this OS or system Python you can install any other specific version that you may need. With “configured interpreter” I assume you mean the system Python? macOS comes with Python installed (it’s BSD under the hood). Thank you all very much for any advice! I hadn't had any problem with coding in Java, C or even Assembly, but getting into python isn't as easy as I thought. But for example "Pygame" needed to be installed by terminal before - and I don't understand why? Mostly they worked just by typing them into the code. Is there a nice list or platform to see all the packages? Should I delete python and install it again with Conda maybe? Also I started a little and easy project where I included some packages. I installed the latest version of python (3.9.6) but P圜harm says my interpreter is Python 3.8. If I set up a new project, what's the difference between using a new environment vs using the configured interpreter? As far as I can tell, using a new environment simply sets up a new instance of python specially for the project, doesn't it? I use a M1 Macbook, installed P圜harm and it automatically installed Python (don't know if it would be smarter to use brew or conda (and don't know the differences)). Im currently studying computer science and since we don't have any python course, I want to learn it by myself. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |