Why cannot install python package by cmd [closed] - python

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
Why cannot install by input "pip install xxxx"in cmd,
only can install by input "python -m pip install xxxx"?
//problem solved , but dont know why
example.png

You can use pip install directly after adding C:\Program Files\Python37\Scripts to the environment PATH variable in windows.
Note: The path C:\Program Files\Python37\Scripts is where pip.exe is installed or present on your computer based on Pythong version.

Related

How to build and install a Python package locally without uploading to PyPI? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I created a small Python project using a project template. Now I would like to configure the project to be locally installable.
When I run the command:
$ python3.8 -m pip install fdroid_build_checker
I get the following error:
ERROR: Could not find a version that satisfies the requirement fdroid_build_checker (from versions: none)
ERROR: No matching distribution found for fdroid_build_checker
A future step would be to configure the project to be published as a small command line tool.
Your command is searching for the package in PyPi, which won't work because you haven't published the package there.
To install a local package, you should be able to just run pip install path_containing_fdroid_build_checker/froid_buildchecker
You'll have to make sure that your package contains a setup.py file (1) in order for pip to build a wheel and install it successfully.
See https://stackoverflow.com/a/41537134/2741222
1 - https://packaging.python.org/tutorials/packaging-projects/#creating-setup-py

Can´t to install Flask-SQLAlchemy with Python 3.5 on Mac [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I'm trying to install Flask-SQLAlchemy==2.3.2 with Python 3.5.4 comand: "pip install -r Flask-SQLAlchemy==2.3.2" but the console show me this error:
*DEPRECATION: Python 3.5 reached the end of its life on September 13th, 2020. Please upgrade your Python as Python 3.5 is no longer maintained. pip 21.0 will drop support for Python 3.5 in January 2021. pip 21.0 will remove support for this functionality.
ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'Flask-SQLAlchemy==2.3.2'*
Thanks!! :)
You do not have to put “-r" in the command and then it will work perfectly.
By the way try upgrading Python to 3.8 or 3.9 if possible as it is out of support.
Thanks
pip3 install Flask-SQLAlchemy==2.3.2
try this
The -r option you've passed on in the command means 'Install from the given requirements file.'
Since you're not installing packages from a file, remove the -r option and run the command.
pip install Flask-SQLAlchemy==2.3.2

how do I install pygame for python 3.9 for mac? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I do pip install pygame and it says that I have it installed, but for python 2.7 so I do pip3 install pygame and it doesn't work, instead it gives some a bunch of errors. If you have an answer please help!
When installing it I would make sure you are first running python 3 in your terminal or command line before putting in your install command. I know there is a dev version out.
pip install pygame==2.0.0.dev6
If you're on mac you might try pip3 instead of just pip.

ModuleNotFoundError: No module named 'tensorflow' [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
When I'm importing TensorFlow with Spyder as so:
import tensorflow as tf
I then face the following error:
ModuleNotFoundError: No module named 'tensorflow'
How can I overcome this issue?
Since you plan to use tensforflow with Anaconda, you need to install it through Anaconda. It is advisable to do this as follows:
C:> conda create -n tensorflow
C:> activate tensorflow
C:> pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.0.1-cp35-cp35m-win_amd64.whl
It is recommended you create a virtual environment as shown above as this makes managing different versions of Python easier. All packages you install (in this case Tensorflow) will become available whenever you activate this virtual environment, and they will not conflict with other versions of Python you may have.

How to install Flask offline? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
The community reviewed whether to reopen this question 1 year ago and left it closed:
Original close reason(s) were not resolved
Improve this question
I've downloaded Flask on my pc, then I'm disconnected, now I need to install Flask without internet connection. What else I need to install Flask offline and in which order should I install them?
You need to download all of flask's dependencies:
Werkzeug>=0.7
Jinja2>=2.4, which requires:
MarkupSafe
Babel>=0.8, which requires:
pytz
itsdangerous>=0.21
click >= 2.0
Install them in that order before you install Flask.
You can install the downloaded packages in several ways, the easiest is to use pip, which you then also need to download and install first if you don't already have it. Then you just do
pip install ThePackageFile-0.0.0.tgz
If you don't have pip installed on the target machine, you can expand the archive and then run the setup.py script:
tar xvzf ThePackageFile-0.0.0.tgz
# .. some output
python ThePackageFile/setup.py install

Categories