xCode Stripping extended attributes failed / xattr - python

When I try to upload an app to the app store I get the following error:
Stripping extended attributes failed.
"/usr/bin/xattr -crs /var/folders/t2/fjp18t212bdc6kgb3pjzk81m0000gn/T/XcodeDistPipeline.ZBT/Root/Payload/testvgd.app" exited with a non-zero status. The /usr/bin/xattr tool may be damaged.
When I try to run this tool /usr/bin/xattr from command-line I get:
"pkg_resources.DistributionNotFound: The 'xattr==0.6.4' distribution was not found and is required by the application"
Where and how can I add this xattr distribution? I downloaded it from: https://pypi.python.org/pypi/xattr/0.6.4, but when I try to install this, I get: error: package directory 'xattr' does not exist.
Is there a fix or workaround for this? Thanks!

I was afraid I had to clean re-install of Mac, however: an update of MacOS was enough to solve the error in xattr
I hope I save someone the trouble of a clean install with this answer :)

I restart the MAC computer solved the problem.

Related

How do I fix this python converting file into an app - still have not found a solution

This question is not a duplicate of this question, because I am trying to create an app.
I am currently following this tutorial, but when I try to run my app,
my command prompt prints out this error:
Why does this error happen and how can I solve it? I read through all the answers to the linked question, but none of them are pertinent to my problem.
Please anyone help me, I still haven't found a working solution; I am getting desperate!!!
Edit: I can't just install and uninstall pynput? Idk why it doesn't work because shouldn't pynput come with idle?
Version: 3.74 python idle, most updated version of pyinstaller
The following might help you if you haven't tried them already:
Update pip from the command line
Unistall pyinstaller
Re-install pyinstaller and try it again
If the above does not work, try running the following command in the command line. Make sure there are some print statements in your code to see if it works.
python monitoring_culmination_product.py
If you got a message saying "python is not recognised as an internal or external command" then python might have not been added as an environment path.Try this to fix the issue.
You could always re-install python if things get difficult.(make sure you install the appropriate version 32-64bit)
If the command though executed without a problem. Try to use pyinstaller on another file to see if the problem has to make sure the problem has to do with pyinstaller.
From a personal experience, pyinstaller can be unreliable at times so I put the following line in my projects just to make sure. It might help you too.
import pkg_resources.py2_warn
Disclaimer: Although it is not specified I assume that you are using Windows
You could try to use conda create to get an environment containing all the need dependencies (numpy, etc) and then use pyinstaller as explained in this discussion.
Please fall back to 1.6.8 version of pynput. pip install pynput==1.6.8
Ref : https://stackoverflow.com/a/63721929/14759065

How to compile TeX file from Python

I'm trying to create a pdf file inside a python/django project. I'm using PyLatex, which helps, but it's generate_pdf method breaks when it calls pdflatex. I keep getting this error:
FileNotFoundError: [Errno 2] No such file or directory: 'pdflatex'
I tried everything - os.system() ... subprocess. Any way I try, it can't find pdflatex. I'm running on Windows, but I need to be able to to do this within the web-app anyway.
Thanks for any help!
You just need to install pdflatex (and you will need to install on your server when you release your web-app). Instructions for installing on windows can be found in the top answer here.
Do you have "pdflatex" installed? As per this question, you may have to install "MiKTeX" and point os.system() at C:\Program Files\MiKTeX <MikTeX version>\miktex\bin to make it work.
Hope that helps.
Do you have texlive installed? If yes, then the issue is with the system path variable. If not already added, add it to the system path.
#
Updated answer:
I took the time and decided to replicate your issue. I too use windows.
I copied the basic example from Pylatex and tested it on my machine, I was able to replicate the same error as you despite having TexLive installed. To solve it I did the following steps:
Installed MikTex (I believe you have it installed).
Tried running it again but failed with the error missing package latexmk.
Using MikTex package manager, I installed the latexmk package.
Tried running but still failed, error missing perl.exe command.
I had to install perl to my windows, use the following links -- https://learn.perl.org/installing/windows.html
When I tried again, it compiled successfully.
The issue was not having the package latexmk for MikTex and perl.exe of which you should have posted as part of the error logs. Try that and let me know if successful.

python ffvideo , 'libavutil/rational.h' file not found

I currently have a problem while installing an ffvideo (0.0.13) app to a django project. I use zc.buildout and simply get fatal error's while building:
'libavutil/rational.h' file not found
My System is running on OSX 10.10, I tried to install ffmpeg-dev via macport.
The lib is at /opt/local/include/libavutil/
Anyone got an idea or knows the problem?
install newer ffmpeg library, I'm personally using brew
ffvideo is quite old and not touch for the last few years, maybe look at the PyAV - which looks much better.

Can't install PyDev for Eclipse Indigo

I have problem with installation of PyDev in Eclipse Indigo. I used Help -> Install new software -> and http://pydev.org/updates repository. I try it for 3 days yet but it is still not work. First, I got error: unabled to read repository.
Today, repository was found but during installation of package I got error:
An error occurred while collecting items to be installed
session context was:(profile=epp.package.java, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
Unable to read repository at http://update-production-pydev.s3.amazonaws.com/pydev/updates/plugins/org.python.pydev_2.2.2.2011082312.jar.
Read timed out
Unable to read repository at http://update-production-pydev.s3.amazonaws.com/pydev/updates/plugins/org.python.pydev.debug_2.2.2.2011082312.jar.
Read timed out
Unable to read repository at http://update-production-pydev.s3.amazonaws.com/pydev/updates/plugins/org.python.pydev.jython_2.2.2.2011082312.jar.
Read timed out
It seems like the repository is out of order. Does somebody know, what to do? Thanks!
use http://update-production-pydev.s3.amazonaws.com/pydev/updates/site.xml
Just checked and it seems to be working. As a note, a new PyDev release is available (2.2.3).
If it still doesn't work for you, you can try the zip release (see: http://pydev.org/download.html for instructions on getting/installing it).
I had this problem, but updating eclipse fixed it
Using this url https://dl.bintray.com/fabioz/pydev/6.3.2 worked for me.
Got this from http://www.pydev.org/updates/

ImportError exception encountered while trying to use Fabric

I am using Ubuntu and virtualenv, and I am having this recurring problem, while attempting to use Fabric to create a deployment script. Fabric depends on paramiko, which depends on PyCrypto.
Each time I try to use Fabric, or PyCrypto directly, I get this error:
ImportError: cannot import name Random
I have tried reinstalling with pip install -U PyCrypto. I have also tried installing the python-crypto and python-crypto-dbg packages with Aptitude, to no avail. I still get the same error. Anyone have any ideas that might help me solve this problem? Thanks in advance!
It's possible that there's a file name collision in your the directory from which you're running Fabric. Do you have a file called Crypto.py in your project?
Can you get Crypto.Random to import from outside of your project directory? (but still using your virtualenv. Ipython is a big help here.)
I've had the same trouble in the past using Ubuntu. I no longer have a Ubuntu install available, but on my old 10.04 box, the file Random in the Crypto directory was missing. Make sure it exists, if it doesn't, that's the problem.

Categories