how to use an installed pip3 package on command line [duplicate] - python

This question already has an answer here:
Packaging a Python library with an executable
(1 answer)
Closed 3 years ago.
i made a pip3 package example-pkg-martinbarker-test online here that just prints a command. I installed it with pip install example-pkg-martinbarker-test==0.0.1 , how do I run the installed pip3 package from my terminal command line?
I'm trying to find a command like python3 -m example-pkg-martinbarker-test that will run my package from the command line, but all the resources online when I look for this information are just about installing packages. please help, I know this must be incredibly simple

if i well understand, you need first import your package in your python code (a python file) then call its functions

Related

pip module not found even after pip install Python 3.10 [duplicate]

This question already has answers here:
How do I use installed packages in PyCharm?
(14 answers)
Closed 5 months ago.
I am using PyCharm editor for python coding and want to install pyttsx3 library and also download from cmd not the problem is pycharm is not identifying the module as installed. Can you suggest what to do I am on Windows 10
click to open error screenshot
I see in your PyCharm instance that you have a specific interpreter called "jarvis". You need to make sure that the pip install command you are executing in the command prompt is installing this package in the site-packages folder of the jarvis interpreter.
You can install it in the same environment as Giacomo suggested using PyCharm to be sure. Click the "Terminal" tab and run the pip install command there.

pip is not working in the vs code i tried changing the environment variables.. i'm stuck with this [duplicate]

This question already has answers here:
'pip' is not recognized as an internal or external command
(40 answers)
Closed 1 year ago.
pip not working with any followed commands:
pip is not showing anywhere:
It sounds like you may not have pip installed, judging from your pictures. If so type this to check python -m pip --version.
If you don't have it installed, perhaps try python -m pip install.
If you do have pip installed and are trying to install pygame, I suggest trying python -m pip install pygame.
I also found that using python didn't work but replacing it with py did. I did these things (a while ago) in terminal on a windows 10 machine, so my suggestions may not be relevant.

installing pip autopep8 failed, invalid syntax? [duplicate]

This question already has answers here:
python3 --version shows "NameError: name 'python3' is not defined"
(2 answers)
Closed 4 years ago.
everyone.
I just started to learn python, and am currently trying to add some nice additional features to Atom.
I was trying to follow the steps from the video "Setting up a Python Development Environment in Atom":
https://www.youtube.com/watch?v=DjEuROpsvp4 (just for those who are interested to know more ,starting from around 13:30.)
But I failed at installing pip autopep8. As I downloaded "pip autopep8" in Atom and typed in "pip install autopep8" at the command line in python. what I got was a warning of "invalid syntax", which lead me to nowhere to know what got wrong.
invalid syntax, installing pip autopep8
I hope someone could help me figure out what was the problem, and how could I push the installing forward. Thank you all!
Try in CMD:
pip install autopep8
Upon looking at your image, don't run pip through your IDLE, run it straight from CMD
https://i.stack.imgur.com/RH9cR.png <-- Example
Editing because I found some additional info for future users. If you're running additional versions of python on the same system (Centos for instance requires python 2 for a lot of dependencies) you can use the pip instance of a specific python install by running the following:
python3.6 -m pip install discord
As an example, python3.6 in my case was the additional instance I installed on my Centos server. Normal pip was installing packages for the Python 2 instance.

Install pip on a fresh compiled python [duplicate]

This question already has answers here:
How to install pip with Python 3?
(23 answers)
Closed 5 years ago.
I have just downloaded the python 3.4 source from the web site and compiled it with ./configure and make. I get a fully functional python.
Everyone says that pip comes embedded with python but that is not true if I compile it from source.
On a console I do:
./python -m pip install numpy
from the compilation folder, and I get:
No module named pip
I am on a RHEL7 system and I want to produce a standalone python folder with all the needed modules. My intention is to ship this python folder along with some python software so that I am sure that everything is ok. (Not to rely on others installing all the packages that are needed on a fresh RHEL7 installation)
Instead of pip try pip3. It is python version 3.x and appropriate one for it is pip3 I guess.

syntax error using pip on python 3.6 [duplicate]

This question already has answers here:
Why does "pip install" inside Python raise a SyntaxError?
(7 answers)
Closed 5 years ago.
trying to use pip to install a library is getting me a syntax error . i tried everything on the internet , the only way to install a module using pip is an answer i found here: Why does "pip install" inside Python raise a SyntaxError?
which states:
import pip
package_name='selenium'
pip.main(['install', package_name])
is there a way to fix pip here so that i use the normal syntax like:
pip install somemodule
Some other answers where about changing the environment variables however they did not specify how to do that on Windows 7
You can use the windwos shell (cmd.exe) to install selenium using pip.
Search the directory of your python installation, inside it is a folder called scripts. Open it and in scripts hold shift and right-click. Now you get a context menu where you can choose open console in this folder (or something similar, my windows is not english).
If you have your windows shell in scripts, type:
pip install --upgrade pip
to get the newest pip version.
Now you can install selenium with:
pip install selenium

Categories