Can't install pygame on python 3.8.3 - python

I am on the latest version of python and I have tried all the commands to install pyjama, but the error I get is:
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: pygame in /Library/Python/2.7/site-packages (1.9.6)
I don't know where to find this information or how to downgrade to a older version of python.
Can anyone help??

could you provide the commands you used for installation which results in that error?
Seems like you've already installed it on Python2 and are trying to install it there again. If you're using pip, maybe you could try using pip3 instead. Alternatively you can also use the following command:
python3 -m pip install XXX

Related

how do I update python pip to 3.4 on a raspberry pi?

I was trying to install preview-generator and so I typed pip install preview-generator and I got this: ERROR: Package 'preview-generator' requires a different Python: 2.7.16 not in '>= 3.4' so I tried pip install -U pip and it said that Requirement already up-to-date: pip in ./.local/lib/python2.7/site-packages (20.3.4) so how would I update it?
Edit: I tried pip3 install preview-generator and it worked
My suggestion is: don't mess your system's python installation. There might be other modules that depend on that being what it is. Use pyenv to manage python versions.
Check https://github.com/pyenv/pyenv
Check this post for a detailed explanation: https://realpython.com/intro-to-pyenv/

pip installing in usr/lib/python3.6/site-packages instead of virtualenv on ubuntu server

I'm having a problem when installing packages on my virtualenv.It all started when I upgraded my pip to the latest version. I tried to revert my pip version to where I find it stable. When I try to install, for example, django-tables2, it says:
Requirement already satisfied: django-tables2 in /usr/lib/python3.6/site-packages (2.3.1)
Requirement already satisfied: Django>=1.11 in /usr/local/lib/python3.6/dist-packages (from django-tables2) (2.2.4)
Requirement already satisfied: pytz in /usr/local/lib/python3.6/dist-packages (from Django>=1.11->django-tables2) (2019.2)
Requirement already satisfied: sqlparse in /usr/local/lib/python3.6/dist-packages (from Django>=1.11->django-tables2) (0.3.0)
WARNING: You are using pip version 19.3.1; however, version 20.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
But when I check my folder in my virtualenv, it doesn't show there. I tried some commands like which pip and which pip3 and it says this:
(unidaenv) root#UnidaWebApplication:/home/unidaweb/unidaproject# which pip
/home/unidaweb/unidaproject/unidaenv/bin/pip
(unidaenv) root#UnidaWebApplication:/home/unidaweb/unidaproject# which pip3
/home/unidaweb/unidaproject/unidaenv/bin/pip3
(unidaenv) root#UnidaWebApplication:/home/unidaweb/unidaproject#
I also tried pip list but I can't find the package that I installed to my virtualenv.
I'm getting a bad gateway error when I try to add it on my settings.py, I don't really know how to fix this but when I'm in the version of pip that I know was stable running my project, I don't get this error and I can install any package that I needed to my project. Any help would be much appreciated. I'm stuck on this for about a week, hoping that someone could help me with this issue.
virtualenvs can break occasionally especially if the somebody updated the python executable the virtualenv was based or some packages / shared libraries of it.
I'd suggest to try out with a new virtualenv. (delete the broken one and replace it)
Further.
for debugging I suggest to type following two commands:
type -a python and type -a pip
In case your search path has some hidden surprises it could be safer to call
python -m pip instead of python though in a properly setup virtualenv it shouldn't make a difference.

error: The 'python-dateutil' distribution was not found and is required by Mathics

Hello i am trying to install mathics
python3 setup.py install --user
but i get this
error: The 'python-dateutil' distribution was not found and is required by Mathics
and when i try to install date util i get this
root#thodo-Inspiron-15-3567:/home/thodo/Documents/Mathics-master# pip install python-dateutil
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Requirement already satisfied: python-dateutil in /usr/local/lib/python2.7/dist-packages (1.4)
can somebody help install mathics thanks in advance
There is numerous references in your output to python 2.7, hence your pip is installing to python 2.7.
To install to python3, simply use
python3 -m pip install python-dateutil

Why is pip asking me to upgrade when it's already up-to-date?

I have a brand new installation of python 3.7.1 64-bit and I'm using the latest pyCharm as my IDE. I have no other installation of python on this machine.
I go to install numpy and I get this message:
(venv) C:\Users\John\PycharmProjects\project>pip install numpy
Requirement already satisfied: numpy in c:\users\john\pycharmprojects\pysims\venv\lib\site-packages (1.15.4)
You are using pip version 10.0.1, however version 18.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
So I run the suggested command but it's already up-to-date
(venv) C:\Users\John\PycharmProjects\project>python -m pip install --upgrade pip
Requirement already up-to-date: pip in c:\users\john\pycharmprojects\pysims\venv\lib\site-packages (18.1)
So I check the version but it's still the old version
(venv) C:\Users\John\PycharmProjects\pySIMS>pip -V
pip 10.0.1 from c:\users\john\pycharmprojects\pysims\venv\lib\site-packages\pip-10.0.1-py3.7.egg\pip (python 3.7)
I thought I'd try py -3 to upgrade and it works.
(venv) C:\Users\John\PycharmProjects\pySIMS>py -3 -m pip install --upgrade pip
Collecting pip
Using cached https://files.pythonhosted.org/packages/c2/d7/90f34cb0d83a6c5631cf71dfe64cc1054598c843a92b400e55675cc2ac37/pip-18.1-py2.py3-none-any.whl
Installing collected packages: pip
Found existing installation: pip 10.0.1
Uninstalling pip-10.0.1:
Successfully uninstalled pip-10.0.1
Successfully installed pip-18.1
But the version is still old
(venv) C:\Users\John\PycharmProjects\pySIMS>pip -V
pip 10.0.1 from c:\users\john\pycharmprojects\pysims\venv\lib\site-packages\pip-10.0.1-py3.7.egg\pip (python 3.7)
WHAT IS GOING ON? Am I missing something totally obvious? I've never had an issue like this working in Python 2 but since I've moved to Python 3 it's been nothing but errors.
This is looking like you have multiple installation of pip, one that comes first in the PATH (pip) and another that is recognized by python (python -m pip).
Try running the command:
pip show pip
and
python -m pip show pip
And check if the path are the same.
If not i would suggest uninstalling the undesired one, or change your your PATH environment variable to have the folder containing the correct pip come before the folder with the wrong one.
When I got this error I had 2 pip version folders in site-packages. One pip-19.2.3.dist-info and another something like pip-10.0.1. I deleted the first one, leaving only the default version. Then running python -m pip install --upgrade pip fixed the problem
I had a similar issue where I was upgrading pip; however, my issue what that I had a pip.conf file that pointed to a repo that didn't have the version to upgrade to. I removed the pip.conf to allow it to go to the default repo and it was able to download the correct version and upgrade.
1.Open you project setting(File>Settings)
2.Project>Project Interpreter
3.find pip and lick the triangle on the right(in the red circle I draw)

How to install PIL to Python 3.5 on a mac?

I am very new to Python installations and trying to install PIL. I have a feeling they are being installed to the wrong directory. PIP seems to have been installed fine.
Pycharm says
Try to run this command from the system terminal. Make sure that you
use the correct version of 'pip' installed for your Python interpreter
located at
'/Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5'.
However when checking in terminal the reply is
Jamess-MacBook-Pro:~ JamesParsons$ pip install Pillow
Requirement already satisfied (use --upgrade to upgrade): Pillow in
/Library/Python/2.7/site-packages
Its also mentions a different version of Python.
How would the best way to install PIL be as Pycharm is coming up with unresolved reference still?
On your command line:
$ which python
I'm betting that this returns:
/Library/Python/2.7/site-packages
This shows your 'basic' Python (which comes preinstalled on Mac) location. Now do:
$ which python3
If that shows this:
/Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5'
Then check for a pip3 version:
$ which pip3
If that exists and has a similar location to python3, then try this:
$ pip3 install Pillow
If that works, there is a good chance PyCharm will now pick up the correct installation.

Categories

Resources