The following is the EXACT output when running the command sudo python -m pip install pygame on raspberry pi:
Collecting pygame
Using cached pygame-1.9.3.tar.gz
Complete output from command python setup.py egg_info:
WARNING, No "Setup" File Exists, Running "config.py"
Using UNIX configuration...
Hunting dependencies...
SDL : found 1.2.15
FONT : found
IMAGE : found
MIXER : found
PNG : found
JPEG : found
SCRAP : found
PORTMIDI: not found
PORTTIME: not found
FREETYPE: found 2.5.2
Missing dependencies
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-nOupZN/pygame/
I have tried installing pygame in ways without using pip but all of them fail in other ways and I think this problem may be the easiest to fix. I don't mind the missing dependencies. I know error code 1 is "operation not permitted" error, but i did use sudo, so I don't know why this comes up. I apologize for having so much code, but I wanted to provide as much information as possible. I have no idea what the problem is, but if anyone can help it would be a lifesaver.
Notes:
The last line of the output appears in red text in the shell
nOupZN is probably just random; I've tried installing multiple times and that part changes each time
I am using python 2.7.9 and do not wish to switch
I have recently upgraded pip
The error still occurs even when using the --user flag
The error still occurs even when running sudo su beforehand
sudo apt-get install python3-pygame
I've been struggling to learn the right way to install stuff on my Pi too. I've just started this past year, and pretty much new to linux. I've converged on this technique working most of the time.
Related
For a ML project on credit-card (ML with python coursera) I needed to import snapml. But unfortunately in pip install module its not unstalling.
Its showing -" error could not find a version that satisfies the requirement snapml"
and "error no matching distribuition found for snapml"
I also tried .whl file which also isnt working.
What should I do fix the issues?
Tried to install and didnt work
enter image description here I am trying to installing Rasa. I run this command rasa init. It's working fine. But when I am trying to run this command rasa x it throws an error as shown in the above image(link). One solution I have found is to remove domain_path=domain_path from the x.py file which can be found in such a path: C:\Users\Admin\anaconda3\envs\Myenv\Lib\site-packages\rasa\cli\x.py . Even though the other solution I've heard is to downgrade the version of Python and pip. Versions are (Rasa Version: 2.8.1, Python Version:3.7, pip version: 20.2) But still, I can't get rid of it. If anybody has a solution, please help.
To solve this issue, please follow the below steps:
pip install rasa==2.8.1
check rasa --version
then install
pip install rasa-sdk==2.8.1
Install this version rasa-x==0.39.3
pip install rasa-x==0.39.3 --extra-index-url https://pypi.rasa.com/simple
Some know errors:
ImportError: cannot import name ‘RowProxy’ from ‘sqlalchemy.engine’ try running pip install SQLAlchemy==1.3.22 should fix it.)
And, if you get an error not being able to import yaml then run pip install pyyaml.
I've a problem to install the aforementioned module via cpanm in my multi-threading version of Perl (not the original one).
I've Ubuntu 16.04.
When trying to compile and test this module it gives me the following error:
/usr/bin/ld: impossible to find -lz
collect2: error: ld returned 1 exit status
Makefile:494: instructions set for target "blib/arch/auto/Net/SSLeay/SSLeay.so" fail
make: *** [blib/arch/auto/Net/SSLeay/SSLeay.so] Error 1
-> FAIL Installing Net::SSLeay::Handle failed. See /home/my_name/.cpanm/work/1548275319.13675/build.log for details. Retry with --force to force install it.
openssl,ssllib-dev-perl,libnet-ssleay-perl, libcrypt-ssleay-perl already installed via apt-get.
I've also tried to compile manually this module, without success. I forced the installation too...no way.
The error seems linked with something missing in /usr/bin/ld: (impossible to find -lz collect2).
Is there anyone who can help me with this?
Cpanm has always worked pretty well. Up to now i've been able to get all my modules installed and well functioning, apart from Net::SSLeay::Handle.
Thanks in advace for your help
Ok, i solved by installing this packages (Ubuntu 16.04LTS):
-openssl
-libssl-dev
-libnet-ssleay-perl
-libcrypt-ssleay-perl
-zlib1g-dev as suggested above
Once you're done doing that, remember to avoid testing the module when gcc will be finishing compiling it, because in most cases it fails.
So the best incantation in doing this should be as follows:
-cpanm install -v --notest Net::SSLeay::Handle
Many thanks again to all Perl mates writing in this forum.
You saved the day
first log in cpan
sudo cpan
force intalling the module should work
force install Net::SSLeay::Handle
This should also install missing modules or notice it
I am going to be asking a question that seems to have been asked numerous times. However, all of the solutions posted in the others, seems to not be working. This leads me to believe that my problem may be system related, but I'm not an expert.
I am a newbie to Python, but not to Linux, and not a newbie to software by any means.
I am running Linux Mint, 17.3 (Rosa), 64-bit, and have recently installed Python3.5 per https://www.reddit.com/r/linuxquestions/comments/3nbfdx/how_to_upgrade_from_python_27_to_35_linux_mint/ and that seems to have worked.
Python 3.5.0 (default, Nov 19 2016, 10:27:39)
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
When running:
pip list | grep pyserial
I get the following:
pyserial (2.6)
My problem is simply this: I can't run the following pyPractice.py file:
import serial
...with the following cli prompt:
me#machine /home/me/Desktop/practice $ python3.5 pyPractice.py
I have tried many solutions, such as those posted in the following locations, but all seem to have failed for one reason or another:
1) pyserial, ImportError: No module named serial
RESULT-> pyserial is already installed, as you can see above. When I tried to install 'serial', no dice, not recognized
me#machine /home/me/Desktop/practice $ sudo pip install serial
[sudo] password for me:
Downloading/unpacking serial
Could not find any downloads that satisfy the requirements serial
Cleaning up...
No distributions at all found for serial
Storing debug log for failure in /home/me/.pip/pip.log
2) Python ImportError: No module named serial
RESULT-> nearly the same as above. Near the end, the proposed fix is to type:
sudo apt-get install python3-serial
However, I get the following:
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3-serial is already the newest version.
The following package was automatically installed and is no longer required:
php5
Use 'apt-get autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 379 not upgraded.
3) Serial import python
RESULT-> No sure...I started to look at this option, but wouldn't you know it, there isn't a serial in my python3.5 packages. So, even if I did have a path correct, I wouldn't know where to start.
I am pretty new to Python, so feel free to take me back to basics. I am not adverse to reading, so links to sites which explain your thoughts are acceptable. I am pretty handy with Linux.
[somewhat useless side note: I am trying to start out slow, but am trying to work through running a simple cube drawing script, which was found here ]
In your first method there are two errors: for Python 3 you should use the command pip3, and the module is called pyserial.
As for the second method, maybe the package has been installed improperly. Try to remove it and install again, maybe with the option --reinstall. Also maybe the command sudo dpkg-reconfigure python3-serial would help.
Trying to install mysql-python. Got following error. Got mysql and pythond already installed. Any help will be highly appreciated
[root#uu include]# easy_install mysql-python
Searching for mysql-python
Reading http://cheeseshop.python.org/pypi/mysql-python/
Couldn't find index page for 'mysql-python' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading http://cheeseshop.python.org/pypi/
Reading http://cheeseshop.python.org/pypi/MySQL-python/1.2.3c1
Reading http://sourceforge.net/projects/mysql-python
Best match: MySQL-python 1.2.3c1
Downloading http://pypi.python.org/packages/source/M/MySQL-python/MySQL-python-1.2.3c1.tar.gz#md5=310dd856e439d070b59ece6dd7a0734d
Processing MySQL-python-1.2.3c1.tar.gz
Running MySQL-python-1.2.3c1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-toQ0nx/MySQL-python-1.2.3c1/egg-dist-tmp-OeN5eG
unable to execute gcc: No such file or directory
error: Setup script exited with error: command 'gcc' failed with exit status 1
This will install GCC and others often required:
yum groupinstall 'Development Tools'
Can also be installed individual i.e yum install gcc
you need to install gcc (on centos, some variety of dev-tools)