Installing Pyinstaller - installation

I am getting the below error while installing Pyinstaller. Pip is already installed and the command used at the Terminal is pip install pyinstaller.
error: could not create
'/Library/Python/2.7/site-packages/_dummy_thread': Permission denied
Command "/usr/bin/python -u -c "import setuptools,
tokenize;file='/private/var/folders/pq/l_flqbp91_xgfmb0j1x8ckyh0000gp/T/pip-install-PIu2W0/future/setup.py';f=getattr(tokenize,
'open', open)(file);code=f.read().replace('\r\n',
'\n');f.close();exec(compile(code, file, 'exec'))" install
--record /private/var/folders/pq/l_flqbp91_xgfmb0j1x8ckyh0000gp/T/pip-record-7rrphN/install-record.txt
--single-version-externally-managed --compile" failed with error code 1 in
/private/var/folders/pq/l_flqbp91_xgfmb0j1x8ckyh0000gp/T/pip-install-PIu2W0/future/
My Python installed version is 3.6 and pip version is 10.0.1; however its showing some python 2.7 text in the output, as below, when I check versions:
Apples-MacBook-Pro:~ solelthermtechnik$ pip --version
pip 10.0.1 from /Library/Python/2.7/site-packages/pip-10.0.1-py2.7.egg/pip (python 2.7)
Apples-MacBook-Pro:~ solelthermtechnik$ python --version
Python 3.6.2
Please help to understand and fix. I could not get any way out of the question in Can I use PyInstaller from Python 2.7 to compile an executable for a Python 3 script?

I figured it out by trying to run with sudo (as admin) and password and it worked. So Pyinstaller successfully installed :)screenshot

Related

Error code (exit code 1) when installing netfilterqueue on macOS

When I try to install the module netfilterqueue for python via pip, I get the error:
"Command
"/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
-u -c "import setuptools, tokenize;file='/private/tmp/pip-install-Ut3XcJ/netfilterqueue/setup.py';f=getattr(tokenize,
'open', open)(file);code=f.read().replace('\r\n',
'\n');f.close();exec(compile(code, file, 'exec'))" install
--record /private/tmp/pip-record-teUDXs/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-install-Ut3XcJ/netfilterqueue/"
I installed the module scapy without any problems, so I'm confused why netfilterqueue isn't installing. I'm currently using macOS High Sierra.
According to these issue on their Github page, it is not supported on macOS.
https://github.com/kti/python-netfilterqueue/issues/14:
libnetfilterqueue is a Linux-only feature, so you won't be able to
install python-netfilterqueue on Mac OS.
https://github.com/kti/python-netfilterqueue/issues/2:
Sorry, python-netfilterqueue will not work on Mac because nfqueue is Linux-only: http://www.netfilter.org/projects/libnetfilter_queue/index.html
error code 1 means operation not permitted, so it is a problem of authorization.
Try with sudo before the command:
sudo pip install python-netfilterqueue

installation of vpython using pip in High Sierra

I am having issue with installing vpython using pip. During the installation I get and error as if I do not have stdio.h, which I do
In file included from _scandir.c:14:
/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:33:10: fatal error: 'stdio.h' file not found
#include <stdio.h>
^~~~~~~~~
1 error generated.
error: command '/usr/bin/clang' failed with exit status 1
Command "/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -u -c "import setuptools, tokenize;__file__='/private/var/folders/mf/h7c_zhyd7yl6t7nkgx10j6pw0000gq/T/pip-build-czavCr/scandir/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/mf/h7c_zhyd7yl6t7nkgx10j6pw0000gq/T/pip-is5WM1-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/mf/h7c_zhyd7yl6t7nkgx10j6pw0000gq/T/pip-build-czavCr/scandir/
I am running High Sierra, latest Xcode
Most posts on the web suggest to install the command line tools with
xcode-select --install but I did and I can compile some of my codes just fine.
Other things I have tried:
removing and reinstalling xcode+command line tools
remove the /Library/Developer/CommandLineTools/
CFLAGS=-stdlib=libc++ pip install vpython
MACOSX_DEPLOYMENT_TARGET=10.13 pip install vpython
but nothing works. I am completely out of ideas
I was unable to understand the problem above, but I have managed to find two workarounds to get a working version of vpython. Somehow the issue seems to be related to python package I installed from python.org and the pip included. I removed it and installed instead python2 and python3 using Homebrew and both pip2 and pip3 managed to install successfully the vpython and other modules.
Another alternative, which seems even better is to install Anaconda Python and then use conda to get vphyton.

Error installing scipy using pip on Windows 10 32 bit

Installing scipy using pip gives me following error.
Command "c:\python27\python.exe -u -c "import setuptools, tokenize;file='c:\users\arun\appdata\local\temp\pip-build-nlwjdr\scipy\setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record c:\users\arun\appdata\local\temp\pip-5qc2vr-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\arun\appdata\local\temp\pip-build-nlwjdr\scipy\
Tried cloning the scipy from github and running setup command. No luck.
python setup.py install
UPDATE: Installed Windows binary available at this link and it worked
http://sourceforge.net/projects/scipy/files/scipy/0.11.0/scipy-0.11.0-win32-superpack-python2.7.exe/download

PIL installation on MAC

I am trying to install PIL in my Mac.I am using the following command:
sudo pip install pil --allow-external pil --allow-unverified pil
But it gives the following error
Command "/Users/akira/anaconda/bin/python -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-bCxMjA/pil/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-YwCGxg-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-build-bCxMjA/pil
Please note that,I have condo installed in my system.I am not able to install PIL in my system in any means.Please help me with this.I have browsed many links,But no solution works for me.
Why are you using pip if you have conda installed? I installed it simply with the command:
conda install pil
Or if you want the latest version (since PIL is now called pillow):
conda install pillow
I had a similar problem when i upgrade my pip,here is what i did(Mac OS 10.11, python ver 2.7.11).
1.Download PIl : http://www.pythonware.com/products/pil/
(ver1.1.6 more compatible with python 2.7,ver1.1.7 have many problems)
2.Run this code in your terminal(cd to your download directory)
$ tar xvfz Imaging-1.1.6.tar.gz
$ cd Imaging-1.1.6
$ python setup.py install
3.Use 'pip list' to check your PIL.and if your install pillow,you can only use one of them.so if you want to use PIL only , uninstall pillow by
sudo -s
pip uninstall pillow

Errors when pip install psycopg2 to virtualenv

I have created virtual environment
leo#kodar:/var/www/python$ mkvirtualenv -p /var/www/python/3.5.0/bin/python3 --no-site-packages env350_185
and trying to install psycopg2 to it.
pip3 install psycopg2
This gives me a big log with errors. Here is the resume string of output log:
Command /var/www/.virtualenvs/env350_185/bin/python3 -c "import setuptools, tokenize;__file__='/tmp/pip-build-xibdmand/psycopg2/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-gtvfmn3f-record/install-record.txt --single-version-externally-managed --compile --install-headers /var/www/.virtualenvs/env350_185/include/site/python3.5 failed with error code 1 in /tmp/pip-build-xibdmand/psycopg2
When I try to do the same with virtual environment created with system version of Python3
mkvirtualenv -p /usr/bin/python3 --no-site-packages env_sys
it gives success.
What could the problem be? Other packages like Django 1.8.5 can be installed correctly. I have also tested it with python 3.4.3 from custom folder and get the same error. Only system python3 (3.4.3) works.
Full pip error log is here: https://gist.github.com/leoKiddy/25beaa96c67b2cfa2263

Resources