Ok, so I have been through many of the different fixes, and I still can't get it to work. In python command line I run the
pip install pyinstaller
it gives me a syntax error, so I run the line of code to set my path, and pip is in my scripts, it still doesn't work. I am not sure how to get this to work. pip is installed but it still refuses to install pyinstaller, saying it has a syntax error. Upon looking this up I find you need to set the path, so I do so, but that does not fix the problem, Help would be very nice!
You have to run that command from the command line (the terminal), not the Python interpreter.
You may think if something is written in Python or for Python it must be run from the interpreter. Well, not necessarily. Speaking of pip or easy_install, they must be run from the terminal.
Related
So the question is as stated above. When i run little script which relies on matplotlib and numpy, both of which I have installed and listed when entering help("modules"), by simply double-clicking on it, it works fine, but if i open it with the IDLE first and then run it in the Shell it doesn't. Why is that? I know that pip did install the packages in a directory outside of PATH, but I added it to it once i got this error message, but it still doesn't work. Any help is greatly appreciated, you would really make a beginners day. I can provide code if necessary, but I think this is most certainly not the problem.
On my computer, I run 3 versions of python, py2.7, py3.8 and py3.9, so I changed the .exe name to python27, python38 and python39. Now I can uninstall py3.8 but I not py39 because I need it to work in another project. So, the different versions of python seem to work correctly as evident here.
All different python versions seems to run correctly and also cassandra -f command outputs (nodetool status get ok).
But now, when I use cqlsh command I get following error
can't detect python version
However, I tried to use the command python27 cqlsh, it runs successfully but I got another error here that I have no idea on how to fix.
I hope someone can help me and i apologise for my english, if i made mistakes.
I have this problem, too. My solution is to carry out the order "python2 -m cqlsh". You need change "python2" to your python2’s name.
I have every library installed using pip;
when I write the code, IDE doesn't show any errors; but when I want to run the code, IDE has ImportError for every function;
I think The Problem is sth about my terminal, but I'm not Really Sure.
Go to the "terminal"(for PyCharm)/"console"(for Spyder) of the IDE you are using, and install the packages using pip in that terminal, it should work!
Problem is the packages you have installed using pip is not being mapped to the IDE
I have installed Python 3.8.1 on my laptop. I wasn't successful in installing pip from the command prompt.
I opened the command prompt, went to were the file get-pip.py is located and ran the command python get-pip.py and nothing happened.
I then went to advanced systems settings/system properties/environment variables and edited the Path, put C:\Python38\scripts. I then tried again to run the command python get-pip.py but nothing happened
I'd appreciate any assistance, thanks
Please be careful that you are actually wanting to run a specific file, hence, the directory that you are in also needs to be the right one. You can not just run the files randomly by opening cmd. First head on where your "get-pip.py" file is, then try to run the command again, and let us know the result.
Had a friend write some script for me. After about an hour, he declared himself one working on it and sent it to me to complete. So I downloaded Python27 and have been tying to get my head in the game.
My friend used some extra modules in his program and I need to get those up and running before I can see the code running.I've tried following several instructionals with no success.
So I was hoping for some help. My Python directory is where it should be in C:\Python27. I've been trying to use the Python )command line) in order to input the code as given and i keep getting back the same result.
"File " line 1
$pip install requests
SyntaxError: invalid syntax
I am completely lost and starting to get a headache. Please help!
'pip' is a command line program, not a python construct.
Try How do I install pip on Windows?
first to get the pip command on Windows.
You should not use python command line interpreter to install the package.
First, follow this question to install pip on Windows. Then you can directly put the pip install command in your cmd.exe and execute it.