Error installing cryptography on Big Sur running on Apple Silicon - python

I've tried to install cryptography on my brand new Air M1. But something goes wrong.
I already tried some solutions from google but it didn't help.
Environment Details:
Python 3.9.1
pip 21.0.1
macOS BigSur 11.2 Appl1 M1
cffi==1.14.5
openssl#1.1
Steps to reproduce:
pip3 install cryptography
traceback:
copying src/cryptography/hazmat/bindings/openssl/binding.py -> build/lib.macosx-11-arm64-3.9/cryptography/hazmat/bindings/openssl
running egg_info
writing src/cryptography.egg-info/PKG-INFO
writing dependency_links to src/cryptography.egg-info/dependency_links.txt
writing requirements to src/cryptography.egg-info/requires.txt
writing top-level names to src/cryptography.egg-info/top_level.txt
reading manifest file 'src/cryptography.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'docs/_build'
warning: no previously-included files found matching 'vectors'
warning: no previously-included files matching '*' found under directory 'vectors'
warning: no previously-included files matching '*' found under directory '.github'
warning: no previously-included files found matching 'release.py'
warning: no previously-included files found matching '.coveragerc'
warning: no previously-included files found matching 'codecov.yml'
warning: no previously-included files found matching '.readthedocs.yml'
warning: no previously-included files found matching 'dev-requirements.txt'
warning: no previously-included files found matching 'tox.ini'
warning: no previously-included files found matching 'mypy.ini'
warning: no previously-included files matching '*' found under directory '.zuul.d'
warning: no previously-included files matching '*' found under directory '.zuul.playbooks'
writing manifest file 'src/cryptography.egg-info/SOURCES.txt'
copying src/cryptography/py.typed -> build/lib.macosx-11-arm64-3.9/cryptography
running build_ext
generating cffi module 'build/temp.macosx-11-arm64-3.9/_padding.c'
creating build/temp.macosx-11-arm64-3.9
generating cffi module 'build/temp.macosx-11-arm64-3.9/_openssl.c'
running build_rust
=============================DEBUG ASSISTANCE=============================
If you are seeing a compilation error please try the following steps to
successfully install cryptography:
1) Upgrade to the latest pip and try again. This will fix errors for most
users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip
2) Read https://cryptography.io/en/latest/installation.html for specific
instructions for your platform.
3) Check our frequently asked questions for more information:
https://cryptography.io/en/latest/faq.html
4) Ensure you have a recent Rust toolchain installed:
https://cryptography.io/en/latest/installation.html#rust
5) If you are experiencing issues with Rust for *this release only* you may
set the environment variable `CRYPTOGRAPHY_DONT_BUILD_RUST=1`.
=============================DEBUG ASSISTANCE=============================
error: Can not find Rust compiler
----------------------------------------
ERROR: Failed building wheel for cryptography
Failed to build cryptography
ERROR: Could not build wheels for cryptography which use PEP 517 and cannot be installed directly

Rust currently works on m1 via
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
However you will most likely experience another error after fixing rust.
import _cffi_backend as backend
ImportError: dlopen(/private/var/folders/fd/s3rl30nj6790c3p5df6x2_700000gn/T/pip-build-env-w44a7bqz/overlay/lib/python3.x/site-packages/_cffi_backend.cpython-3X-darwin.so, 2): no suitable image found. Did find:
/private/var/folders/fd/s3rl30nj6790c3p5df6x2_700000gn/T/pip-build-env-w44a7bqz/overlay/lib/python3.X/site-packages/_cffi_backend.cpython-3X-darwin.so: mach-o, but wrong architecture
The issue is discussed here where it's stated that CFFI maintainers don't support m1 macs: https://github.com/gevent/gevent/issues/1721

it works for me after fresh updates.
sudo xcode-select --install.

Related

I get and error when I try to do pip install

Every single time I try to install something using the pip install command, a whole bunch of errors just hops in, I've had this problem for a while, I've tried searching up solutions and they didnt work. now im here asking for some help :)
This is the red text that shows up when I do the command
ERROR: Command errored out with exit status 1:
command: 'c:\users\kevin løfgren\appdata\local\programs\python\python38-32\python.exe' 'c:\users\kevin løfgren\appdata\local\programs\python\python38-32\lib\site-packages\pip\_vendor\pep517\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\KEVINL~1\AppData\Local\Temp\tmpi743067b'
cwd: C:\Users\Kevin Løfgren\AppData\Local\Temp\pip-install-wli5xph4\pyinstaller_493a92d116a644ecb3d769ba9d19aa63
Complete output (38 lines):
running dist_info
creating C:\Users\Kevin Løfgren\AppData\Local\Temp\pip-modern-metadata-tr16djzk\pyinstaller.egg-info
writing C:\Users\Kevin Løfgren\AppData\Local\Temp\pip-modern-metadata-tr16djzk\pyinstaller.egg-info\PKG-INFO
writing dependency_links to C:\Users\Kevin Løfgren\AppData\Local\Temp\pip-modern-metadata-tr16djzk\pyinstaller.egg-info\dependency_links.txt
writing entry points to C:\Users\Kevin Løfgren\AppData\Local\Temp\pip-modern-metadata-tr16djzk\pyinstaller.egg-info\entry_points.txt
writing requirements to C:\Users\Kevin Løfgren\AppData\Local\Temp\pip-modern-metadata-tr16djzk\pyinstaller.egg-info\requires.txt
writing top-level names to C:\Users\Kevin Løfgren\AppData\Local\Temp\pip-modern-metadata-tr16djzk\pyinstaller.egg-info\top_level.txt
writing manifest file 'C:\Users\Kevin Løfgren\AppData\Local\Temp\pip-modern-metadata-tr16djzk\pyinstaller.egg-info\SOURCES.txt'
reading manifest file 'C:\Users\Kevin Løfgren\AppData\Local\Temp\pip-modern-metadata-tr16djzk\pyinstaller.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
Error in sitecustomize; set PYTHONVERBOSE for traceback:
SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xf8 in position 0: invalid start byte (sitecustomize.py, line 7)
warning: no files found matching 'pyinstaller-gui.py'
no previously-included directories found matching 'bootloader\build'
no previously-included directories found matching 'bootloader\.waf-*'
no previously-included directories found matching 'bootloader\.waf3-*'
no previously-included directories found matching 'bootloader\waf-*'
no previously-included directories found matching 'bootloader\waf3-*'
no previously-included directories found matching 'bootloader\_sdks'
no previously-included directories found matching 'bootloader\.vagrant'
warning: no previously-included files found matching 'bootloader\.lock-waf*'
no previously-included directories found matching 'doc\source'
no previously-included directories found matching 'doc\_build'
warning: no previously-included files matching '*.tmp' found under directory 'doc'
warning: no files found matching 'news\_template.rst'
no previously-included directories found matching 'news'
no previously-included directories found matching 'old'
no previously-included directories found matching 'scripts'
no previously-included directories found matching 'tests\scripts'
no previously-included directories found matching '.github'
warning: no previously-included files found matching '.*'
warning: no previously-included files found matching '*.yml'
warning: no previously-included files found matching '*~'
warning: no previously-included files found matching '.directory'
warning: no previously-included files matching '*.py[co]' found anywhere in distribution
writing manifest file 'C:\Users\Kevin Løfgren\AppData\Local\Temp\pip-modern-metadata-tr16djzk\pyinstaller.egg-info\SOURCES.txt'
creating 'C:\Users\Kevin Løfgren\AppData\Local\Temp\pip-modern-metadata-tr16djzk\pyinstaller.dist-info'
error: invalid command 'bdist_wheel'
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\kevin løfgren\appdata\local\programs\python\python38-32\python.exe' 'c:\users\kevin løfgren\appdata\local\programs\python\python38-32\lib\site-packages\pip\_vendor\pep517\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\KEVINL~1\AppData\Local\Temp\tmpi743067b' Check the logs for full command output.
Looks like the wheel package is not detected.
Try installing it with:
pip install wheel
I think that it could be a permission problem. Execute the Windows shell as admin and try again.

bug in installing pyinstaller

So I tried the pip install pyinstaller command and thats what happened:
So I had this bug:
Collecting pyinstaller
Using cached pyinstaller-4.1.tar.gz (3.5 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\aris\onedrive\υπολογιστής\python\python.exe' 'c:\users\aris\onedrive\υπολογιστής\python\lib\site-packages\pip\_vendor\pep517\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\aris\AppData\Local\Temp\tmp_o2ged7z'
cwd: C:\Users\aris\AppData\Local\Temp\pip-install-ipo7dr00\pyinstaller_7b00b43eae9b4a19be431faa4f4cf9f4
Complete output (38 lines):
Error in sitecustomize; set PYTHONVERBOSE for traceback:
SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xf5 in position 0: invalid start byte (sitecustomize.py, line 7)
running dist_info
creating C:\Users\aris\AppData\Local\Temp\pip-modern-metadata-tgdlk_61\pyinstaller.egg-info
writing C:\Users\aris\AppData\Local\Temp\pip-modern-metadata-tgdlk_61\pyinstaller.egg-info\PKG-INFO
writing dependency_links to C:\Users\aris\AppData\Local\Temp\pip-modern-metadata-tgdlk_61\pyinstaller.egg-info\dependency_links.txt
writing entry points to C:\Users\aris\AppData\Local\Temp\pip-modern-metadata-tgdlk_61\pyinstaller.egg-info\entry_points.txt
writing requirements to C:\Users\aris\AppData\Local\Temp\pip-modern-metadata-tgdlk_61\pyinstaller.egg-info\requires.txt
writing top-level names to C:\Users\aris\AppData\Local\Temp\pip-modern-metadata-tgdlk_61\pyinstaller.egg-info\top_level.txt
writing manifest file 'C:\Users\aris\AppData\Local\Temp\pip-modern-metadata-tgdlk_61\pyinstaller.egg-info\SOURCES.txt'
reading manifest file 'C:\Users\aris\AppData\Local\Temp\pip-modern-metadata-tgdlk_61\pyinstaller.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'pyinstaller-gui.py'
no previously-included directories found matching 'bootloader\build'
no previously-included directories found matching 'bootloader\.waf-*'
no previously-included directories found matching 'bootloader\.waf3-*'
no previously-included directories found matching 'bootloader\waf-*'
no previously-included directories found matching 'bootloader\waf3-*'
no previously-included directories found matching 'bootloader\_sdks'
no previously-included directories found matching 'bootloader\.vagrant'
warning: no previously-included files found matching 'bootloader\.lock-waf*'
no previously-included directories found matching 'doc\source'
no previously-included directories found matching 'doc\_build'
warning: no previously-included files matching '*.tmp' found under directory 'doc'
warning: no files found matching 'news\_template.rst'
no previously-included directories found matching 'news'
no previously-included directories found matching 'old'
no previously-included directories found matching 'scripts'
no previously-included directories found matching 'tests\scripts'
no previously-included directories found matching '.github'
warning: no previously-included files found matching '.*'
warning: no previously-included files found matching '*.yml'
warning: no previously-included files found matching '*~'
warning: no previously-included files found matching '.directory'
warning: no previously-included files matching '*.py[co]' found anywhere in distribution
writing manifest file 'C:\Users\aris\AppData\Local\Temp\pip-modern-metadata-tgdlk_61\pyinstaller.egg-info\SOURCES.txt'
creating 'C:\Users\aris\AppData\Local\Temp\pip-modern-metadata-tgdlk_61\pyinstaller.dist-info'
error: invalid command 'bdist_wheel'
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\aris\onedrive\υπολογιστής\python\python.exe' 'c:\users\aris\onedrive\υπολογιστής\python\lib\site-packages\pip\_vendor\pep517\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\aris\AppData\Local\Temp\tmp_o2ged7z' Check the logs for full command output.
Does anyone know how I can solve it??
The error says:
error: invalid command 'bdist_wheel' ---------------------------------------- ERROR: Command errored out with exit status 1: 'c:\users\aris\onedrive\υπολογιστής\python\python.exe'
Try installing wheel first. mostly the error describes itself. try going through them carefully, it will save you lot of debugging time.
Run this command:
pip install wheel
Let me know if the error still exists.
Install the wheel package first. While you're at it, upgrade the whole pip "stack":
python -m pip install -U wheel setuptools pip

Error installing Flask - Python

I am still trying to install Flask on the 'virtual enviroments'. I had some errors trying to get the pip commands when virtualenv activated. (had something to do that my username has a space in the name)
But finally found a solutions, just type the right path to where pip is located, to avoid the username folder.
(venv) C:\Users\Daniel P-C>cd C:\Python34\Scripts
(venv) C:\Python34\Scripts>pip
Usage:
pip <command> [options]
etc...
well when trying to install flask I get the following errors
(venv) C:\Python34\Scripts>pip install flask
Downloading/unpacking flask
Running setup.py (path:C:\Users\DANIEL~1\AppData\Local\Temp\pip_build_Daniel P
-C\flask\setup.py) egg_info for package flask
warning: no files found matching '*' under directory 'tests'
warning: no previously-included files matching '*.pyc' found under directory
'docs'
warning: no previously-included files matching '*.pyo' found under directory
'docs'
warning: no previously-included files matching '*.pyc' found under directory
'tests'
warning: no previously-included files matching '*.pyo' found under directory
'tests'
warning: no previously-included files matching '*.pyc' found under directory
'examples'
warning: no previously-included files matching '*.pyo' found under directory
'examples'
no previously-included directories found matching 'docs\_build'
no previously-included directories found matching 'docs\_themes\.git'
Downloading/unpacking Werkzeug>=0.7 (from flask)
Running setup.py (path:C:\Users\DANIEL~1\AppData\Local\Temp\pip_build_Daniel P
-C\Werkzeug\setup.py) egg_info for package Werkzeug
warning: no files found matching '*' under directory 'werkzeug\debug\templat
es'
warning: no files found matching '*' under directory 'tests'
warning: no previously-included files matching '*.pyc' found under directory
'docs'
warning: no previously-included files matching '*.pyo' found under directory
'docs'
warning: no previously-included files matching '*.pyc' found under directory
'tests'
warning: no previously-included files matching '*.pyo' found under directory
'tests'
warning: no previously-included files matching '*.pyc' found under directory
'examples'
warning: no previously-included files matching '*.pyo' found under directory
'examples'
no previously-included directories found matching 'docs\_build'
Downloading/unpacking Jinja2>=2.4 (from flask)
Running setup.py (path:C:\Users\DANIEL~1\AppData\Local\Temp\pip_build_Daniel P
-C\Jinja2\setup.py) egg_info for package Jinja2
warning: no files found matching '*' under directory 'custom_fixers'
warning: no previously-included files matching '*' found under directory 'do
cs\_build'
warning: no previously-included files matching '*.pyc' found under directory
'jinja2'
warning: no previously-included files matching '*.pyc' found under directory
'docs'
warning: no previously-included files matching '*.pyo' found under directory
'jinja2'
warning: no previously-included files matching '*.pyo' found under directory
'docs'
Downloading/unpacking itsdangerous>=0.21 (from flask)
Running setup.py (path:C:\Users\DANIEL~1\AppData\Local\Temp\pip_build_Daniel P
-C\itsdangerous\setup.py) egg_info for package itsdangerous
warning: no previously-included files matching '*' found under directory 'do
cs\_build'
Downloading/unpacking markupsafe (from Jinja2>=2.4->flask)
Downloading MarkupSafe-0.23.tar.gz
Running setup.py (path:C:\Users\DANIEL~1\AppData\Local\Temp\pip_build_Daniel P
-C\markupsafe\setup.py) egg_info for package markupsafe
Installing collected packages: flask, Werkzeug, Jinja2, itsdangerous, markupsafe
Running setup.py install for flask
warning: no files found matching '*' under directory 'tests'
warning: no previously-included files matching '*.pyc' found under directory
'docs'
warning: no previously-included files matching '*.pyo' found under directory
'docs'
warning: no previously-included files matching '*.pyc' found under directory
'tests'
warning: no previously-included files matching '*.pyo' found under directory
'tests'
warning: no previously-included files matching '*.pyc' found under directory
'examples'
warning: no previously-included files matching '*.pyo' found under directory
'examples'
no previously-included directories found matching 'docs\_build'
no previously-included directories found matching 'docs\_themes\.git'
Running setup.py install for Werkzeug
warning: no files found matching '*' under directory 'werkzeug\debug\templat
es'
warning: no files found matching '*' under directory 'tests'
warning: no previously-included files matching '*.pyc' found under directory
'docs'
warning: no previously-included files matching '*.pyo' found under directory
'docs'
warning: no previously-included files matching '*.pyc' found under directory
'tests'
warning: no previously-included files matching '*.pyo' found under directory
'tests'
warning: no previously-included files matching '*.pyc' found under directory
'examples'
warning: no previously-included files matching '*.pyo' found under directory
'examples'
no previously-included directories found matching 'docs\_build'
Running setup.py install for Jinja2
warning: no files found matching '*' under directory 'custom_fixers'
warning: no previously-included files matching '*' found under directory 'do
cs\_build'
warning: no previously-included files matching '*.pyc' found under directory
'jinja2'
warning: no previously-included files matching '*.pyc' found under directory
'docs'
warning: no previously-included files matching '*.pyo' found under directory
'jinja2'
warning: no previously-included files matching '*.pyo' found under directory
'docs'
Running setup.py install for itsdangerous
warning: no previously-included files matching '*' found under directory 'do
cs\_build'
Running setup.py install for markupsafe
building 'markupsafe._speedups' extension
==========================================================================
WARNING: The C extension could not be compiled, speedups are not enabled.
Failure information, if any, is above.
Retrying the build without the C extension now.
==========================================================================
WARNING: The C extension could not be compiled, speedups are not enabled.
Plain-Python installation succeeded.
==========================================================================
Successfully installed flask Werkzeug Jinja2 itsdangerous markupsafe
Cleaning up...
it says that it has successfully installed flask, but when running python and trying to type import flask it is like it isn't installed? What can I do?
(venv) C:\Python34\Scripts>python
Python 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 10:38:22) [MSC v.1600 32 bit (In
tel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import flask
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'flask'
I am btw running on Windows 7
Be sure, you use pip and python from venv
For a module/package to be installed by pip into virtualenv, you must use the pip from virtualenv.
For importing modules/packages being installed into virtualenv environment you have to run python interpreter from given virtualenv.
In case, you run your pip or python from directory C:\Python 34\Scripts, it is very likely, you use system wide pip and install flask into system Python. On Linux you would get problems as installing into system wide python requires root privileges, on MS Windows default Python installation it does not complain.
Advice: Create your virtualenv out of default Python installation directory and use pip and python from this virtulaenv. This is what usually happens, when you activate the virtualenv, so there is no need to explicitly using full path to pip or python (anyway, using explicit path to venv python and pip would not harm anything.
I had exactly the same problem as you, and the answer of Jan didn't work for me.
The problem was simply that I installed virtualenv using apt-get:
$ sudo apt-get install virtualenv
Instead of installing it with pip:
$ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
$ sudo python get-pip.py
$ sudo pip install virtualenv
It solved the problem for me. You can even uninstall the apt-get package after:
$ sudo apt-get remove virtualenv
virtualenv is still installed (but the good one!).
Did you add python to your path?
Try this:
Click Start
Search Advanced Systems setting and click
Click on Environmental Variables.
Append ;C:\python27 to the Path variable
Restart the Command Prompt.

How can I set up Debian x86_64 so a Django project sees django.contrib.staticfiles?

I have a new Debian VPS, and a Django project that I am trying to deploy is not seeing django.contrib.staticfiles.*. Doing a "pip install django-staticfiles" has not observably changed things.
What is the best way to have things running well enough that such Django projects will run?
--EDIT--
I tried to uninstall Django and then install with pip and a virtualenv. This resulted in another error, failing to import execute_manager. The terminal output was:
Proceed (y/n)? y
Successfully uninstalled gunicorn
root#ps306627:/home/cjsh/pragmatometer# exit
(pragmatometerenvironment)cjsh#ps306627:~/pragmatometer$ pip uninstall django
Uninstalling Django:
/home/cjsh/pragmatometerenvironment/bin/django-admin.py
/home/cjsh/pragmatometerenvironment/lib/python2.6/site-packages/Django-1.6.3-py2.6.egg-info
/home/cjsh/pragmatometerenvironment/lib/python2.6/site-packages/django
Proceed (y/n)? y
Successfully uninstalled Django
(pragmatometerenvironment)cjsh#ps306627:~/pragmatometer$ pip install django
Downloading/unpacking django
Downloading Django-1.6.3.tar.gz (6.6Mb): 6.6Mb downloaded
Running setup.py egg_info for package django
warning: no previously-included files matching '__pycache__' found under directory '*'
warning: no previously-included files matching '*.py[co]' found under directory '*'
Installing collected packages: django
Running setup.py install for django
changing mode of build/scripts-2.6/django-admin.py from 644 to 755
warning: no previously-included files matching '__pycache__' found under directory '*'
warning: no previously-included files matching '*.py[co]' found under directory '*'
changing mode of /home/cjsh/pragmatometerenvironment/bin/django-admin.py to 755
Successfully installed django
Cleaning up...
(pragmatometerenvironment)cjsh#ps306627:~/pragmatometer$ pip install gunicorn
Downloading/unpacking gunicorn
Downloading gunicorn-18.0.tar.gz (366Kb): 366Kb downloaded
Running setup.py egg_info for package gunicorn
warning: no previously-included files matching '*.pyc' found under directory 'docs'
warning: no previously-included files matching '*.pyo' found under directory 'docs'
warning: no previously-included files matching '*.pyc' found under directory 'tests'
warning: no previously-included files matching '*.pyo' found under directory 'tests'
warning: no previously-included files matching '*.pyc' found under directory 'examples'
warning: no previously-included files matching '*.pyo' found under directory 'examples'
Installing collected packages: gunicorn
Running setup.py install for gunicorn
warning: no previously-included files matching '*.pyc' found under directory 'docs'
warning: no previously-included files matching '*.pyo' found under directory 'docs'
warning: no previously-included files matching '*.pyc' found under directory 'tests'
warning: no previously-included files matching '*.pyo' found under directory 'tests'
warning: no previously-included files matching '*.pyc' found under directory 'examples'
warning: no previously-included files matching '*.pyo' found under directory 'examples'
Installing gunicorn_paster script to /home/cjsh/pragmatometerenvironment/bin
Installing gunicorn script to /home/cjsh/pragmatometerenvironment/bin
Installing gunicorn_django script to /home/cjsh/pragmatometerenvironment/bin
Successfully installed gunicorn
Cleaning up...
(pragmatometerenvironment)cjsh#ps306627:~/pragmatometer$ python manage.py runserver
Traceback (most recent call last):
File "manage.py", line 2, in <module>
from django.core.management import execute_manager
ImportError: cannot import name execute_manager
Thanks,
What I saw was irritation at a manage.py that was out of sync with the newer version of python the system was running.
The new, working manage.py, with old one commented out, is:
#!/usr/bin/env python
import os, sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "pragmatometer.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
##!/usr/bin/env python
#from django.core.management import execute_manager
#import imp
#try:
# imp.find_module('settings') # Assumed to be in the same directory.
#except ImportError:
# import sys
# sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n" % __file__)
# sys.exit(1)
#
#import settings
#
#if __name__ == "__main__":
# execute_manager(settings)

pip install virtualenwrapper permission denied error on mac OSX Lion

I'm new to programming--loving it. On mac OSX Lion I've installed virtualenv with pip and it works.
But pip install virtualenvwrapper shows warnings and then error: /Library/Python/2.7/site-packages/virtualenvwrapper: Permission denied
$ pip install virtualenvwrapper Downloading/unpacking
virtualenvwrapper Downloading virtualenvwrapper-4.1.1.tar.gz (81kB):
81kB downloaded Running setup.py egg_info for package
virtualenvwrapper
Installed /private/var/folders/6v/3cyz6tp514b2mqt02wc8x9k40000gn/T/pip_build_lynnrasmussen/virtualenvwrapper/pbr-0.5.23-py2.7.egg
[pbr] Processing SOURCES.txt
warning: LocalManifestMaker: standard file '-c' not found
warning: no files found matching 'AUTHORS'
warning: no files found matching 'ChangeLog'
warning: no previously-included files found matching '.gitignore'
warning: no previously-included files found matching '.gitreview'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no files found matching '*.html' under directory 'docs'
warning: no files found matching '*.css' under directory 'docs'
warning: no files found matching '*.js' under directory 'docs'
warning: no files found matching '*.png' under directory 'docs' Requirement already satisfied (use --upgrade to upgrade): virtualenv
in /Library/Python/2.7/site-packages (from virtualenvwrapper)
Downloading/unpacking virtualenv-clone (from virtualenvwrapper)
Downloading virtualenv-clone-0.2.4.tar.gz Running setup.py egg_info
for package virtualenv-clone
Downloading/unpacking stevedore (from virtualenvwrapper) Downloading stevedore-0.13.tar.gz (760kB): 760kB downloaded Running
setup.py egg_info for package stevedore
Installed /private/var/folders/6v/3cyz6tp514b2mqt02wc8x9k40000gn/T/pip_build_lynnrasmussen/stevedore/pbr-0.5.23-py2.7.egg
[pbr] Processing SOURCES.txt
warning: LocalManifestMaker: standard file '-c' not found
warning: no previously-included files found matching '.gitignore'
warning: no previously-included files found matching '.gitreview'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no files found matching '*.py' under directory 'tests' Installing collected packages: virtualenvwrapper, virtualenv-clone,
stevedore Running setup.py install for virtualenvwrapper
[pbr] Reusing existing SOURCES.txt
changing mode of build/scripts-2.7/virtualenvwrapper.sh from 644 to 755
changing mode of build/scripts-2.7/virtualenvwrapper_lazy.sh from 644 to 755
Skipping installation of /Library/Python/2.7/site-packages/virtualenvwrapper/init.py
(namespace package)
error: /Library/Python/2.7/site-packages/virtualenvwrapper: Permission denied
Complete output from command /usr/bin/python -c "import setuptools;file='/private/var/folders/6v/3cyz6tp514b2mqt02wc8x9k40000gn/T/pip_build_lynnrasmussen/virtualenvwrapper/setup.py';exec(compile(open(file).read().replace('\r\n',
'\n'), file, 'exec'))" install --record
/var/folders/6v/3cyz6tp514b2mqt02wc8x9k40000gn/T/pip-EJKEQQ-record/install-record.txt
--single-version-externally-managed:
running install
running build
running build_py
creating build
creating build/lib
creating build/lib/virtualenvwrapper
copying virtualenvwrapper/init.py -> build/lib/virtualenvwrapper
copying virtualenvwrapper/hook_loader.py ->
build/lib/virtualenvwrapper
copying virtualenvwrapper/project.py -> build/lib/virtualenvwrapper
copying virtualenvwrapper/user_scripts.py ->
build/lib/virtualenvwrapper
running egg_info
writing requirements to virtualenvwrapper.egg-info/requires.txt
writing virtualenvwrapper.egg-info/PKG-INFO
writing namespace_packages to
virtualenvwrapper.egg-info/namespace_packages.txt
writing top-level names to virtualenvwrapper.egg-info/top_level.txt
writing dependency_links to
virtualenvwrapper.egg-info/dependency_links.txt
writing entry points to virtualenvwrapper.egg-info/entry_points.txt
[pbr] Reusing existing SOURCES.txt
running build_scripts
creating build/scripts-2.7
copying virtualenvwrapper.sh -> build/scripts-2.7
copying virtualenvwrapper_lazy.sh -> build/scripts-2.7
changing mode of build/scripts-2.7/virtualenvwrapper.sh from 644 to
755
changing mode of build/scripts-2.7/virtualenvwrapper_lazy.sh from 644
to 755
running install_lib
Skipping installation of
/Library/Python/2.7/site-packages/virtualenvwrapper/init.py
(namespace package)
copying virtualenvwrapper/hook_loader.py ->
/Library/Python/2.7/site-packages/virtualenvwrapper
error: /Library/Python/2.7/site-packages/virtualenvwrapper: Permission
denied
You should install as Super User.
Try :
sudo pip install virtualenvwrapper

Categories