can cppclean be ran in windows? - python

So this is probably a very newbie question (which I am) but looking for tools for C++ code I found cppclean, so I follow the instructions on the repository cppclean but when running cppclean from a cmd terminal I get cppclean is not recognized as an internal or external command I guess I am missing some steps apart from doing pip install cppclean do I need to compile it or anything like it? I have tried to run it from the cmd and the python terminal. Is it even possible to run cppclean in windows or is it just for unix systems? Sorry if the question is too obvious but I have very little python knowledge.

You have to add the Python scripts path, e.g. C:\Users\USER\AppData\Local\Programs\Python\Python37-32\Scripts, to your system environment Path variable. (Replace USER with your actual user name and Python37-32 with your actual Python version). It's described here

Related

vsCode won't recognize python installation, but does?

When I put "py --list" in the terminal I get this:
Installed Pythons found by C:\Windows\py.exe Launcher for Windows
No Installed Pythons Found!
I set my environment variables. I actually got VS Code to run some code I threw together that didn't use any imports, but now that I'm trying to use any python commands in the terminal, I'm getting errors. What gives?
python should work, since it is finding installations.
If you are working on Windows, very often it's all about permissions. Try running your terminal and VSCode as administrator! Worked a lot of times for me, also with other languages.
Please ensure that you have installed the python extension and selected the correct python interpreter (Ctrl+Shift+P and type Python: Select Interpreter).
If this didn't work, you may have to reinstall python.
Read the document about Vscode-Python for more details.

Windows Python 3.9, pip, vscode not working correctly tried every tutorial

I've gotten this to work relatively easy on my Mac I with django but for some reason Windows has been a heartache.
the problem is that in the console I can only get py to start executing python.
python and python3 do not work whatsoever
and also I can't get pip to install either because the py command won't execute it but python and python3 just open the windows store.
I've installed python to the path with the installer and I made the location of the file C:\Python\Python39
changed the hierarchy in the PATH in user variables and system variables to where python is at the top in both.
I've edited the vscode settings
I've also turned off the App execution aliases. That did nothing.
I'm at a complete loss so if any one has any advice I'd be so appreciative.
This tutorial helped me make pip working when I started programing
https://youtu.be/28eLP22SMTA

Being Prompted With "python was not found" Even After Successfully Installing Python 3.8.0 From 'https://www.python.org/downloads/' (Windows 10)

I am beginning to learn python, but i'm bumping into a quite irritating issue. I have installed python 3.8.0 from their website. I can still write and run programs in python (using pycharm, for example) but when i enter "python" in Powershell, or cmd.exe, they either give me a warning saying that python could not be found and/or take me to the windows store page for Python 3.7.0.
With this problem happening I'm really not sure if there was some issue during the installation of Python, or if its just related to the path my computer is taking to Python. But it is driving me crazy!
It might be under different executable name. Have you tried python3.8 in cmd.exe? Quite often symlink python -> python3.8 is not made, but python3.8 and python3 should work.
If not, python installation might not be in your system's PATH. Here are instructions how to view/edit window's environmental variables, including PATH. You'll have to locate where python is installed and verify that directory is in PATH or add it.

PyCharm terminal doesn't recognize Python or Pip

I'm using PyCharm for a project, and I've been having a problem I can't understand. In the "terminal" (in PyCharm), I activate the virtualenv I want, which has Python and all my other packages. The project works, which means the packages are being found, because otherwise it wouldn't work. But the thing is, neither python nor pip are recognized in the PyCharm terminal. This happens whether the virtualenv is activated or deactivated, so I don't think that's the issue.
I get the "python is not a recognized internal or external command" message, but if I do it in the file system, for instance, I can use python, pip, and everything else just fine, so I think it might be a configuration of my PyCharm, most likely, but I don't even know where to look, I don't see anything in the settings that I find odd. Any help could save me a lot of time I've been stuck with this. I'm on Windows 10, by the way.
The environment variable 'PATH' is 'C:\Users\Iván\AppData\Local\Programs\Python\Python36', and python is recognized anywhere but within the PyCharm terminal.
If you are using windows.
You have to add paths to python & pip in environment variables. If you have no previous experience doing so. I would ask to use this link https://www.youtube.com/watch?v=DrhkbjDAUV0.
If I am getting your problem wrong sorry.

Python conflicts when importing?

I have windows 10 with 2 user accounts, one is an old one that has Python installed. My latest account also has Python installed. I used pip install tweepy, and it now exists in the site packages. If I open my Python shell (v3.6.5), it imports fine. However, I can't get this to work when switching to Python in cmd. In here, after typing python, it says Python 3.6.6. Obviously they are different, yet they seem to be originating from the same directory.
Any ideas?
[edit] I have just realised that I have an external application that runs on Python 3.6.6., so I guess it's defaulting because of that. However, I can't uninstall that since I need it - is there a way to specify which version of Python is launched when I type python into the cmd?
[edit2]: This is the issue, and the solution there works. However, I want to be able to just type python into cmd, rather than the entire path. Since both exist in the path (and I don't want to remove the other 3.6.6.), is there a way to achieve this?
Have you thought about using a virtual environment?
https://virtualenv.pypa.io/en/latest/
When you enter "python" into your cmd it searched python.exe in the directories listed on your PATH variable.
All you need to do is to modify your PATH and add the directory path in which the python with the desired version is located.

Categories

Resources