Pip gives error when installing vpnotebook - python

Vpython versions are not available from their website, but according to https://groups.google.com/forum/#!topic/vpython-users/AmIZF2v4Wkc, "pip install vpython" should work for any version of Python.
I entered "pip install vpython" into the windows command prompt. After several minutes of downloading, pip gave me the following error:
Running setup.py install for vpnotebook ... error
Complete output from command c:\users\zachary\appdata\local\programs\python\python36-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Zachary\\AppData\\Local\\Temp\\pip-build-dx_wvbg0\\vpnotebook\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\Zachary\AppData\Local\Temp\pip-3q5u2e2l-record\install-record.txt --single-version-externally-managed --compile:
ImportError install_kernel_spec
c:\users\zachary\appdata\local\programs\python\python36-32\lib\site-packages\setuptools\dist.py:331: UserWarning: Normalizing '0.1.03' to '0.1.3'
normalized_version,
running install
Installing Python module...
running build
running build_py
creating build
creating build\lib
creating build\lib\vpnotebook
copying vpnotebook\__init__.py -> build\lib\vpnotebook
creating build\lib\vpnotebook\data
copying vpnotebook\data\kernel.json -> build\lib\vpnotebook\data
running install_lib
creating c:\users\zachary\appdata\local\programs\python\python36-32\Lib\site-packages\vpnotebook
creating c:\users\zachary\appdata\local\programs\python\python36-32\Lib\site-packages\vpnotebook\data
copying build\lib\vpnotebook\data\kernel.json -> c:\users\zachary\appdata\local\programs\python\python36-32\Lib\site-packages\vpnotebook\data
copying build\lib\vpnotebook\__init__.py -> c:\users\zachary\appdata\local\programs\python\python36-32\Lib\site-packages\vpnotebook
byte-compiling c:\users\zachary\appdata\local\programs\python\python36-32\Lib\site-packages\vpnotebook\__init__.py to __init__.cpython-36.pyc
running install_egg_info
running egg_info
writing vpnotebook.egg-info\PKG-INFO
writing dependency_links to vpnotebook.egg-info\dependency_links.txt
writing top-level names to vpnotebook.egg-info\top_level.txt
warning: manifest_maker: standard file '-c' not found
reading manifest file 'vpnotebook.egg-info\SOURCES.txt'
writing manifest file 'vpnotebook.egg-info\SOURCES.txt'
Copying vpnotebook.egg-info to c:\users\zachary\appdata\local\programs\python\python36-32\Lib\site-packages\vpnotebook-0.1.3-py3.6.egg-info
running install_scripts
writing list of installed files to 'C:\Users\Zachary\AppData\Local\Temp\pip-3q5u2e2l-record\install-record.txt'
Installing custom kernel ...
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Zachary\AppData\Local\Temp\pip-build-dx_wvbg0\vpnotebook\setup.py", line 30, in <module>
package_data={'vpnotebook': ['data/kernel.json']},
File "c:\users\zachary\appdata\local\programs\python\python36-32\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\users\zachary\appdata\local\programs\python\python36-32\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "c:\users\zachary\appdata\local\programs\python\python36-32\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\Zachary\AppData\Local\Temp\pip-build-dx_wvbg0\vpnotebook\vpnotebook\__init__.py", line 72, in run
run_kernel_install(False)
File "C:\Users\Zachary\AppData\Local\Temp\pip-build-dx_wvbg0\vpnotebook\vpnotebook\__init__.py", line 63, in run_kernel_install
install_kernel_spec(source_dir, kernel_name='vpython', user=user)
NameError: free variable 'install_kernel_spec' referenced before assignment in enclosing scope
----------------------------------------
Command "c:\users\zachary\appdata\local\programs\python\python36-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Zachary\\AppData\\Local\\Temp\\pip-build-dx_wvbg0\\vpnotebook\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\Zachary\AppData\Local\Temp\pip-3q5u2e2l-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Zachary\AppData\Local\Temp\pip-build-dx_wvbg0\vpnotebook\

The immediate fix is to install jupyter before you install vpnotebook:
pip install jupyter
Thanks for reporting this; in the future issues posted at either the location #user1114907 indicated or at the main github repo: https://github.com/BruceSherwood/vpython-jupyter/issues

This appears to be a bug in vpnotebook, upon which vpython depends. Trying to install vpnotebook in both Python 2.7 and 3.5 fails with the same error, which appears to have been caused by the package's authors not even using a basic linter. I would suggest reporting this to said authors, but there are no contact details, repositories, or project websites listed on the package's PyPI page.

If your python version is greater than 2.7.9, skip to step 3
Install python version > 2.7.9 [2.7.14 is the latest]
Download latest version of python
extract the archive
./configure
make
make install
Download and re-install pip
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
sudo python get-pip.py
Install jupyter First
sudo pip install jupyter
Then, install vpython
sudo pip install vpython
Post-installation Screenshot

Related

Not able to install librosa

I am not able to install librosa in Ubuntu 18.04. I have tried the following commands, all are failed.
pip install librosa
python3.8 -m pip install librosa
sudo pip install librosa
pip install -u librosa
The below error I am getting:
Failed cleaning build dir for numba
Running setup.py bdist_wheel for resampy ... done
Stored in directory: /home/nageshas/.cache/pip/wheels/fa/c1/56/e0e12c6f7f3d2cdea9712b35136a2d40a7817c6210ec096485
Running setup.py bdist_wheel for llvmlite ... error
Complete output from command /usr/bin/python3.8 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-zrky3kzn/llvmlite/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmphpnrxd05pip-wheel- --python-tag cp38:
running bdist_wheel
/usr/bin/python3.8 /tmp/pip-build-zrky3kzn/llvmlite/ffi/build.py
LLVM version... Traceback (most recent call last):
File "/tmp/pip-build-zrky3kzn/llvmlite/ffi/build.py", line 220, in <module>
main()
File "/tmp/pip-build-zrky3kzn/llvmlite/ffi/build.py", line 210, in main
main_posix('linux', '.so')
File "/tmp/pip-build-zrky3kzn/llvmlite/ffi/build.py", line 134, in main_posix
raise RuntimeError(msg) from None
RuntimeError: Could not find a `llvm-config` binary. There are a number of reasons this could occur, please see: https://llvmlite.readthedocs.io/en/latest/admin-guide/install.html#using-pip for help.
error: command '/usr/bin/python3.8' failed with exit status 1
----------------------------------------
Failed building wheel for llvmlite
Running setup.py clean for llvmlite
Successfully built librosa audioread resampy
Failed to build numba llvmlite
Installing collected packages: audioread, decorator, joblib, llvmlite, numpy, setuptools, numba, chardet, urllib3, idna, certifi, requests, pyparsing, packaging, appdirs, pooch, scipy, six, resampy, threadpoolctl, scikit-learn, pycparser, cffi, soundfile, librosa
Running setup.py install for llvmlite ... error
Complete output from command /usr/bin/python3.8 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-zrky3kzn/llvmlite/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-f20fjedr-record/install-record.txt --single-version-externally-managed --compile --user --prefix=:
running install
running build
got version from file /tmp/pip-build-zrky3kzn/llvmlite/llvmlite/_version.py {'version': '0.36.0', 'full': 'e6bb8d137d922bec8beeb01a237254778759becd'}
running build_ext
/usr/bin/python3.8 /tmp/pip-build-zrky3kzn/llvmlite/ffi/build.py
LLVM version... Traceback (most recent call last):
File "/tmp/pip-build-zrky3kzn/llvmlite/ffi/build.py", line 220, in <module>
main()
File "/tmp/pip-build-zrky3kzn/llvmlite/ffi/build.py", line 210, in main
main_posix('linux', '.so')
File "/tmp/pip-build-zrky3kzn/llvmlite/ffi/build.py", line 134, in main_posix
raise RuntimeError(msg) from None
RuntimeError: Could not find a `llvm-config` binary. There are a number of reasons this could occur, please see: https://llvmlite.readthedocs.io/en/latest/admin-guide/install.html#using-pip for help.
error: command '/usr/bin/python3.8' failed with exit status 1
I came across the same issues too.
There are several steps that helped me, but I cannot define the exact one. So I will list all:
First, update setuptools and wheel
python3 -m pip install --upgrade pip setuptools wheel
Second
python setup.py bdist_wheel
Try to install the previous version of librosa
pip install librosa==0.7.2
I hope the first two steps will help

Can't install dlib in Pycharm (help)

I've been trying to work on a face recognition project, but when I try to install dlib in pycharm I get this error.
Collecting dlib
Using cached dlib-19.21.0.tar.gz (3.2 MB)
Using legacy 'setup.py install' for dlib, since package 'wheel' is not installed.
Installing collected packages: dlib
Running setup.py install for dlib: started
Running setup.py install for dlib: finished with status 'error'
DEPRECATION: The -b/--build/--build-dir/--build-directory option is deprecated. pip 20.3 will remove support for this functionality. A possible replacement is use the TMPDIR/TEMP/TMP environment variable, possibly combined with --no-clean. You can find discussion regarding this at https://github.com/pypa/pip/issues/8333.
ERROR: Command errored out with exit status 1:
command: 'C:\Users\Alexis\.virtualenvs\pythonProject\Scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Alexis\\AppData\\Local\\Temp\\pycharm-packaging\\dlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\Alexis\\AppData\\Local\\Temp\\pycharm-packaging\\dlib\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Alexis\AppData\Local\Temp\pip-record-kq4elzu2\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\Alexis\.virtualenvs\pythonProject\include\site\python3.9\dlib'
cwd: C:\Users\Alexis\AppData\Local\Temp\pycharm-packaging\dlib\
Complete output (77 lines):
running install
running build
running build_py
package init file 'tools\python\dlib\__init__.py' not found (or not a regular file)
warning: build_py: byte-compiling is disabled, skipping.
running build_ext
Building extension for Python 3.9.0 (tags/v3.9.0:9cf6752, Oct 5 2020, 15:34:40) [MSC v.1927 64 bit (AMD64)]
Invoking CMake setup: 'cmake C:\Users\Alexis\AppData\Local\Temp\pycharm-packaging\dlib\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\Alexis\AppData\Local\Temp\pycharm-packaging\dlib\build\lib.win-amd64-3.9 -DPYTHON_EXECUTABLE=C:\Users\Alexis\.virtualenvs\pythonProject\Scripts\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\Alexis\AppData\Local\Temp\pycharm-packaging\dlib\build\lib.win-amd64-3.9 -A x64'
-- Building for: Visual Studio 16 2019
-- Selecting Windows SDK version to target Windows 10.0.19041.
CMake Error at CMakeLists.txt:14 (project):
Failed to run MSBuild command:
MSBuild.exe
to get the value of VCTargetsPath:
Microsoft (R) Build Engine version 4.8.4084.0
[Microsoft .NET Framework, version 4.0.30319.42000]
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 11/1/2020 2:39:22 PM.
Project "C:\Users\Alexis\AppData\Local\Temp\pycharm-packaging\dlib\build\temp.win-amd64-3.9\Release\CMakeFiles\3.18.2\VCTargetsPath.vcxproj" on node 1 (default targets).
C:\Users\Alexis\AppData\Local\Temp\pycharm-packaging\dlib\build\temp.win-amd64-3.9\Release\CMakeFiles\3.18.2\VCTargetsPath.vcxproj(14,2): error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
Done Building Project "C:\Users\Alexis\AppData\Local\Temp\pycharm-packaging\dlib\build\temp.win-amd64-3.9\Release\CMakeFiles\3.18.2\VCTargetsPath.vcxproj" (default targets) -- FAILED.
Build FAILED.
"C:\Users\Alexis\AppData\Local\Temp\pycharm-packaging\dlib\build\temp.win-amd64-3.9\Release\CMakeFiles\3.18.2\VCTargetsPath.vcxproj" (default target) (1) ->
C:\Users\Alexis\AppData\Local\Temp\pycharm-packaging\dlib\build\temp.win-amd64-3.9\Release\CMakeFiles\3.18.2\VCTargetsPath.vcxproj(14,2): error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.14
Exit code: 1
-- Configuring incomplete, errors occurred!
See also "C:/Users/Alexis/AppData/Local/Temp/pycharm-packaging/dlib/build/temp.win-amd64-3.9/Release/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Alexis\AppData\Local\Temp\pycharm-packaging\dlib\setup.py", line 223, in <module>
setup(
File "C:\Users\Alexis\.virtualenvs\pythonProject\lib\site-packages\setuptools\__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "C:\Users\Alexis\AppData\Local\Programs\Python\Python39\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Users\Alexis\AppData\Local\Programs\Python\Python39\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\Users\Alexis\AppData\Local\Programs\Python\Python39\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Alexis\.virtualenvs\pythonProject\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "C:\Users\Alexis\AppData\Local\Programs\Python\Python39\lib\distutils\command\install.py", line 546, in run
self.run_command('build')
File "C:\Users\Alexis\AppData\Local\Programs\Python\Python39\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\Alexis\AppData\Local\Programs\Python\Python39\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Alexis\AppData\Local\Programs\Python\Python39\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\Users\Alexis\AppData\Local\Programs\Python\Python39\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\Alexis\AppData\Local\Programs\Python\Python39\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Alexis\AppData\Local\Temp\pycharm-packaging\dlib\setup.py", line 135, in run
self.build_extension(ext)
File "C:\Users\Alexis\AppData\Local\Temp\pycharm-packaging\dlib\setup.py", line 172, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "C:\Users\Alexis\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\Alexis\\AppData\\Local\\Temp\\pycharm-packaging\\dlib\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\Alexis\\AppData\\Local\\Temp\\pycharm-packaging\\dlib\\build\\lib.win-amd64-3.9', '-DPYTHON_EXECUTABLE=C:\\Users\\Alexis\\.virtualenvs\\pythonProject\\Scripts\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\Alexis\\AppData\\Local\\Temp\\pycharm-packaging\\dlib\\build\\lib.win-amd64-3.9', '-A', 'x64']' returned non-zero exit status 1.
----------------------------------------
ERROR: Command errored out with exit status 1:
'C:\Users\Alexis\.virtualenvs\pythonProject\Scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Alexis\\AppData\\Local\\Temp\\pycharm-packaging\\dlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\Alexis\\AppData\\Local\\Temp\\pycharm-packaging\\dlib\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Alexis\AppData\Local\Temp\pip-record-kq4elzu2\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\Alexis\.virtualenvs\pythonProject\include\site\python3.9\dlib' Check the logs for full command output.
----------------------------------------------------------------------------
try pip install dlib --no-cache-dir if that doesn't work downgrade to python version 3.8.
I tried installing it on version 3.8 and it work fine.
Installed Pycharm
Windows 10
Python 3.8.3 (with pipenv, but should work with pip also)
ex: pipenv install (as virtual env)
since "pipenv install dlib" was giving installation errors after struggling for sometime, able to install the latest dlib library (dlib==19.20.0)
Below is the procedure which helped me to succeed in installing the latest dlib - we have to Manually compile the dlib for Python
Install visual studio (I installed Microsoft Visual Studio Community 2019 Version 16.6.3)
Make Sure to select Visual C++ Or C++ environment - complete the installation - Nothing else is needed (In Visual Studio 2019 go to the Individual Components tab, Visual C++ Tools for Cmake, and check the checkbox under the "Compilers, build tools and runtimes" section.)
Goto - https://cmake.org/download/ and download the cmake for 64bit (cmake-3.18.0-rc4-win64-x64.msi is what i installed)
When installing, make sure to add CMake to the system path (once installation is complete -> check that Environment variable to see this is present)
Goto https://pypi.org/project/dlib/ -> Click on "Download Files"
dlib-19.20.0.tar.gz (is what i had as latest) -> Download the same
extract the file "dlib-19.20.0.tar.gz" till you see the files (dlib, dlib.egg-info, python_examples, tools, MANIFEST.in, PKG-INFO, README.md setup.cfg, setup.py)
Copy all these files (select all (ctrl+a)and copy(ctrl+c)) -> Make sure to copy only these files and not its parent directory along
Goto site-packages in python installation (C:\Users\AppData\Local\Programs\Python\Python38\Lib\site-packages)
Paste all the files copied in step 7,8
open command prompt and goto -> C:\Users\AppData\Local\Programs\Python\Python38\Lib\site-packages
execute command -> python setup.py install
Thats all you should be done - it might take 5 - 10 mins to complete the process, you should see something like below in the end Installed c:\users\appdata\local\programs\python\python38\lib\site-packages\dlib-19.20.0-py3.8-win-amd64.egg Processing dependencies for dlib==19.20.0 Finished processing dependencies for dlib==19.20.0

Installation error for language_check in python 2.7

I have tried to install language_check library in Python 2.7 by using...
pip install language_check
and...
pip install language_check --upgrade
In both cases, I get the following error...
Collecting language-check
Using cached language-check-0.8.tar.gz
Installing collected packages: language-check
Running setup.py install for language-check
Complete output from command "C:\Users\Gaurav M\Anaconda\python.exe" -c "import setuptools, tokenize;__file__='c:\\users\\gaurav~1\\appdata\\local\\temp\\pip-build-ew9qcy\\language-check\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\gaurav~1\appdata\local\temp\pip-b0zy9n-record\install-record.txt --single-version-externally-managed --compile:
Downloading 'LanguageTool-3.2.zip' (87.3 MiB)...
100%
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\users\gaurav~1\appdata\local\temp\pip-build-ew9qcy\language-check\setup.py", line 597, in <module>
sys.exit(main())
File "c:\users\gaurav~1\appdata\local\temp\pip-build-ew9qcy\language-check\setup.py", line 592, in main
run_setup_hooks(config)
File "c:\users\gaurav~1\appdata\local\temp\pip-build-ew9qcy\language-check\setup.py", line 561, in run_setup_hooks
language_tool_hook(config)
File "c:\users\gaurav~1\appdata\local\temp\pip-build-ew9qcy\language-check\setup.py", line 586, in language_tool_hook
download_lt()
File "download_lt.py", line 158, in download_lt
os.path.join(PACKAGE_PATH, dirname))
WindowsError: [Error 5] Access is denied
----------------------------------------
Command ""C:\Users\Gaurav M\Anaconda\python.exe" -c "import setuptools, tokenize;__file__='c:\\users\\gaurav~1\\appdata\\local\\temp\\pip-build-ew9qcy\\language-check\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\gaurav~1\appdata\local\temp\pip-b0zy9n-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\gaurav~1\appdata\local\temp\pip-build-ew9qcy\language-check
I also tried doing...
easy_install language_check
and that throws a different error...
Downloading https://pypi.python.org/packages/05/2e/471a9104b0fe7bb404de6d79e2fdd0c41ad08b87a16cbb4c8c5c9300a608/language-check-0.8.tar.gz#md5=8b4e3aa5e77bff1e33d3312a6dae870b
Processing language-check-0.8.tar.gz
Writing c:\users\gaurav~1\appdata\local\temp\easy_install-qkjgfj\language-check-0.8\setup.cfg
Running language-check-0.8\setup.py -q bdist_egg --dist-dir c:\users\gaurav~1\appdata\local\temp\easy_install-qkjgfj\language-check-0.8\egg-dist-tmp-py6mda
Downloading 'LanguageTool-3.2.zip' (87.3 MiB)...
100%
error: [Error 145] The directory is not empty <built-in function rmdir> c:\users\gaurav~1\appdata\local\temp\easy_install-qkjgfj\language-check-0.8\language_check\LanguageTool-3.2\org\languagetool\rules\uk
How do I install language_check in this case?
I check the sources of the file download_lt.py (github language_check).
It appears that the error occurs when you try to move the folder language_check/LanguageTool-X.Y with the command os.rename() from your TemporaryFile to your Anaconda Lib folder.
So far, #Orions is right, it is a permission problem.
Firstly, you should check your folder permission:
Go to your Local folder (should be C:\Users\Gaurav M\AppData\Local)
Right-click on Temp folder on select properties
Go to Security tab and Edit and Add your name if it doesn't appear under Group or user names.
Repeat the operation for your Anaconda folder. (should be C:\Users\Gaurav M\Anaconda)
Secondly, you can try:
pip install --user language_check
But the pip --user option install the package only for the user.
Install to the Python user install directory for your platform. Typically ~/.local/, or %APPDATA%Python on Windows. (See the Python documentation for site.USER_BASE for full details.)
Last but not least,
I presume you are using cmd or powershellas Command-line interpreter.
In my opinion, using cygwin on Windows makes a lot of things easier. Although It could be painful to configure, I would recommend a pre-configure cygwin solution like Babun.
Good luck!

can't change python version for pyside on Mac

I'm attempting to setup PyCharm with a library provided for my introductory computer science course, but it appears that because of my version of python I am unable to install PySide, which is necessary for the library's imports. python --version outputs
Python 3.5.1 :: Anaconda 4.0.0 (x86_64)
when I try to install pyside with pip install pyside I received the following error:
Collecting PySide
Using cached PySide-1.2.4.tar.gz
Complete output from command python setup.py egg_info:
only these python versions are supported: [(2, 6), (2, 7), (3, 2), (3, 3), (3, 4)]
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/vs/nq_fqyjn3hb_dhz35t4d18nh0000gn/T/pip-build-iyhkri8c/PySide/
I've tried changing my version of python to 2.7, which looks like it would be supported, by installing pysel and running sudo pysel 2.7.12 but that gives me the following error:
Traceback (most recent call last):
File "//anaconda/bin/pysel", line 9, in <module>
load_entry_point('pythonselect==1.3', 'console_scripts', 'pysel')()
File "//anaconda/lib/python3.5/site-packages/pythonselect-1.3-py3.5.egg/pythonselect/pysel.py", line 287, in main
p.set_curr_python(sys.argv[1])
File "//anaconda/lib/python3.5/site-packages/pythonselect-1.3-py3.5.egg/pythonselect/pysel.py", line 212, in set_curr_python
% (pyver_dir, pyver))
pythonselect.pysel.Error: '/Library/Frameworks/Python.framework/Versions/2.7.12' does not exist: you must install Python 2.7.12
BUT I'm certain I did install python 2.7.12, contrary to this error message. I tried reinstalling as a sanity check and confirmed that it IS installed:
brew install python
Warning: python-2.7.12 already installed
I've been wrestling with this for a few days now and it's really got me confused. My thought is that Anaconda might be causing a problem but I'm not sure. Any thoughts?
Edit: I've attempted to install pyenv per your suggestions and encounter the following error. Again, it looks like Anaconda is causing some conflict.
~ ➤ pip install pyenv
Collecting pyenv
Downloading pyenv-20150113.1.tar.gz
Building wheels for collected packages: pyenv
Running setup.py bdist_wheel for pyenv ... error
Complete output from command //anaconda/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/vs/nq_fqyjn3hb_dhz35t4d18nh0000gn/T/pip-build-u_u2wk68/pyenv/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /var/folders/vs/nq_fqyjn3hb_dhz35t4d18nh0000gn/T/tmpmwcdf4cipip-wheel- --python-tag cp35:
running bdist_wheel
running build
installing to build/bdist.macosx-10.5-x86_64/wheel
running install
Cloning into '/Users/johnlewis/.pyenv'...
Cloning into '/Users/johnlewis/.pyenv/plugins/pyenv-doctor'...
Cloning into '/Users/johnlewis/.pyenv/plugins/pyenv-installer'...
Cloning into '/Users/johnlewis/.pyenv/plugins/pyenv-pip-rehash'...
Cloning into '/Users/johnlewis/.pyenv/plugins/pyenv-update'...
Cloning into '/Users/johnlewis/.pyenv/plugins/pyenv-virtualenv'...
Cloning into '/Users/johnlewis/.pyenv/plugins/pyenv-which-ext'...
WARNING: seems you still have not added 'pyenv' to the load path.
# Load pyenv automatically by adding
# the following to your profile:
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
b''
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/vs/nq_fqyjn3hb_dhz35t4d18nh0000gn/T/pip-build-u_u2wk68/pyenv/setup.py", line 33, in <module>
cmdclass=dict(install=PyenvInstall),
File "//anaconda/lib/python3.5/distutils/core.py", line 148, in setup
dist.run_commands()
File "//anaconda/lib/python3.5/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "//anaconda/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "//anaconda/lib/python3.5/site-packages/wheel/bdist_wheel.py", line 232, in run
self.distinfo_dir)
File "//anaconda/lib/python3.5/site-packages/wheel/bdist_wheel.py", line 364, in egg2dist
raise ValueError(err)
ValueError: Egg metadata expected at build/bdist.macosx-10.5-x86_64/wheel/pyenv-20150113.1-py3.5.egg-info but not found
----------------------------------------
Failed building wheel for pyenv
Running setup.py clean for pyenv
Failed to build pyenv
Installing collected packages: pyenv
Running setup.py install for pyenv ... error
Complete output from command //anaconda/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/vs/nq_fqyjn3hb_dhz35t4d18nh0000gn/T/pip-build-u_u2wk68/pyenv/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/vs/nq_fqyjn3hb_dhz35t4d18nh0000gn/T/pip-m94qw5kz-record/install-record.txt --single-version-externally-managed --compile:
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help
error: option --single-version-externally-managed not recognized
----------------------------------------
Command "//anaconda/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/vs/nq_fqyjn3hb_dhz35t4d18nh0000gn/T/pip-build-u_u2wk68/pyenv/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/vs/nq_fqyjn3hb_dhz35t4d18nh0000gn/T/pip-m94qw5kz-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/vs/nq_fqyjn3hb_dhz35t4d18nh0000gn/T/pip-build-u_u2wk68/pyenv/
~ ➤

Mavericks Python 3.4 pip install error

Trying to install pip and I get this error
following https://github.com/Homebrew/homebrew/wiki/Homebrew-and-Python
Sumners-MacBook-Pro:Downloads Sumner$ python get-pip.py
Downloading/unpacking pip
Downloading pip-1.5.4-py2.py3-none-any.whl (1.2MB): 1.2MB downloaded
Installing collected packages: pip
Cleaning up...
Exception:
Traceback (most recent call last):
File "/var/folders/l6/0vw_83pn3kq52x2wjhkmns2r0000gn/T/tmpAovvNy/pip.zip/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/var/folders/l6/0vw_83pn3kq52x2wjhkmns2r0000gn/T/tmpAovvNy/pip.zip/pip/commands/install.py", line 279, in run
requirement_set.install(install_options, global_options, root=options.root_path)
File "/var/folders/l6/0vw_83pn3kq52x2wjhkmns2r0000gn/T/tmpAovvNy/pip.zip/pip/req.py", line 1380, in install
requirement.install(install_options, global_options, *args, **kwargs)
File "/var/folders/l6/0vw_83pn3kq52x2wjhkmns2r0000gn/T/tmpAovvNy/pip.zip/pip/req.py", line 664, in install
self.move_wheel_files(self.source_dir, root=root)
File "/var/folders/l6/0vw_83pn3kq52x2wjhkmns2r0000gn/T/tmpAovvNy/pip.zip/pip/req.py", line 894, in move_wheel_files
pycompile=self.pycompile,
File "/var/folders/l6/0vw_83pn3kq52x2wjhkmns2r0000gn/T/tmpAovvNy/pip.zip/pip/wheel.py", line 202, in move_wheel_files
clobber(source, lib_dir, True)
File "/var/folders/l6/0vw_83pn3kq52x2wjhkmns2r0000gn/T/tmpAovvNy/pip.zip/pip/wheel.py", line 189, in clobber
os.makedirs(destsubdir)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/pip'
Storing debug log for failure in /Users/Sumner/Library/Logs/pip.log
As I cannot comment due to my lack of 50 reputation, I will 'comment' in an answer.
Although you may be admin, you still have to type sudo before you do anything...
To check if your account has admin privileges, type sudo bash in your terminal, and if it says myusername is not in the sudoers file. This incident will be reported., then you aren't an admin.
Here is a short demonstration of the above:
ajs-iMac-5:~ aj8uppal$ sudo bash
Password:
bash-3.2#
bash-3.2# exit
ajs-iMac-5:~ aj8uppal$ pip install colorama
Downloading/unpacking colorama
Downloading colorama-0.2.7.tar.gz
Running setup.py (path:/private/var/folders/f7/r3hxg4tx3859tjpb0n_q9hnw0000gp/T/pip_build_aj8uppal/colorama/setup.py) egg_info for package colorama
Installing collected packages: colorama
Running setup.py install for colorama
error: could not create '/Library/Python/2.7/site-packages/colorama': Permission denied
Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/private/var/folders/f7/r3hxg4tx3859tjpb0n_q9hnw0000gp/T/pip_build_aj8uppal/colorama/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/f7/r3hxg4tx3859tjpb0n_q9hnw0000gp/T/pip-geh1_f-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib
creating build/lib/colorama
copying colorama/__init__.py -> build/lib/colorama
copying colorama/ansi.py -> build/lib/colorama
copying colorama/ansitowin32.py -> build/lib/colorama
copying colorama/initialise.py -> build/lib/colorama
copying colorama/win32.py -> build/lib/colorama
copying colorama/winterm.py -> build/lib/colorama
running install_lib
creating /Library/Python/2.7/site-packages/colorama
THE ERROR: error: could not create '/Library/Python/2.7/site-packages/colorama': Permission denied
----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/private/var/folders/f7/r3hxg4tx3859tjpb0n_q9hnw0000gp/T/pip_build_aj8uppal/colorama/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/f7/r3hxg4tx3859tjpb0n_q9hnw0000gp/T/pip-geh1_f-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/var/folders/f7/r3hxg4tx3859tjpb0n_q9hnw0000gp/T/pip_build_aj8uppal/colorama
Storing debug log for failure in /var/folders/f7/r3hxg4tx3859tjpb0n_q9hnw0000gp/T/tmptJWePV
ajs-iMac-5:~ aj8uppal$ sudo pip install colorama
Downloading/unpacking colorama
Downloading colorama-0.2.7.tar.gz
Running setup.py (path:/private/tmp/pip_build_root/colorama/setup.py) egg_info for package colorama
Installing collected packages: colorama
Running setup.py install for colorama
Successfully installed colorama
Cleaning up...
ajs-iMac-5:~ aj8uppal$
Or you could combine the first two steps and head into the third one, and if it raises an error when you type in sudo, then you aren't an admin.
Here you go! You need admin privilege to do it. Type sudo python get-pip.py and enter the admin password.
It will automatically install pip-6.1.1 for you.
This appears to be because the default version of Python, shipped with the OSX operating system, requires sudo permissions to run in a few places.
In general you probably shouldn't be developing with the operating system version of python, and I personally prefer never to sudo install anything that doesn't obviously need root access.
Instead of using the default version, install a user-specific Python installation with Homebrew.
brew install python
And then you get the pip command properly installed for free!

Categories