I am currently trying to install kivy to python 3.6, but when i am trying yo install it it throws the following exception:
C:\Users\magshimim\Desktop\notKivy>python -m pip install kivy
Collecting kivy
Using cached
https://files.pythonhosted.org/packages/29/e6/e07f77a8d85a626bb955fe072d41042c4c
ee6deaca61295f1c08e6407097/Kivy-1.10.0-cp36-cp36m-win32.whl Collecting Kivy-Garden>=0.1.4 (from kivy)
Using cached https://files.pythonhosted.org/packages/7d/68/decaee596ff8168a39432eb3949fc7c0be952ebb9467806823bffc165d48/kivy-garden-0.1.4.tar.gz
Requirement already satisfied: docutils in c:\python36\lib\site-packages (from kivy)
Requirement already satisfied: pygments in c:\python36\lib\site-packages (from kivy)
Requirement already satisfied: requests in c:\python36\lib\site-packages (from Kivy-Garden>=0.1.4->kivy)
Exception:
Traceback (most recent call last):
File "C:\Python36\lib\site-packages\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "C:\Python36\lib\site-packages\pip\commands\install.py", line 335, in run
wb.build(autobuilding=True)
File "C:\Python36\lib\site-packages\pip\wheel.py", line 749, in build
self.requirement_set.prepare_files(self.finder)
File "C:\Python36\lib\site-packages\pip\req\req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "C:\Python36\lib\site-packages\pip\req\req_set.py", line 666, in _prepare_file
check_dist_requires_python(dist)
File "C:\Python36\lib\site-packages\pip\utils\packaging.py", line 48, in check_dist_requires_python
feed_parser.feed(metadata)
File "C:\Python36\lib\email\feedparser.py", line 175, in feed
self._input.push(data)
File "C:\Python36\lib\email\feedparser.py", line 103, in push
self._partial.write(data)
TypeError: string argument expected, got 'NoneType'
Any help?
Try instead:
pip install kivy
Worked for me on my Windows machine. Make sure pip is in the Path enviornment variable on your machine.
Related
I'm trying to install aiohttp on a Python 3.7 virtualenv. It's failing with an odd AttributeError when trying to install the yarl dependency.
$ pip install aiohttp
Collecting aiohttp
Using cached https://files.pythonhosted.org/packages/33/60/c21acb7002110699761d3dec36fad3f5087c2752a4eb495444f877db6
553/aiohttp-3.5.4-cp37-cp37m-manylinux1_x86_64.whl
Collecting multidict<5.0,>=4.0 (from aiohttp)
Downloading https://files.pythonhosted.org/packages/88/f0/4d4cbd1a3744e3985efa49682352d0703df653ffa76b81f10fed86599a
50/multidict-4.5.2-cp37-cp37m-manylinux1_x86_64.whl (309kB)
100% |████████████████████████████████| 317kB 65.0MB/s
Collecting attrs>=17.3.0 (from aiohttp)
Using cached https://files.pythonhosted.org/packages/3a/e1/5f9023cc983f1a628a8c2fd051ad19e76ff7b142a0faf329336f9a62a
514/attrs-18.2.0-py2.py3-none-any.whl
Requirement already satisfied: async-timeout<4.0,>=3.0 in /fast/src/mobitroll/merlin/tools/ws/.py37/lib/python3.7/site
-packages (from aiohttp) (3.0.1)
Requirement already satisfied: chardet<4.0,>=2.0 in /fast/src/mobitroll/merlin/tools/ws/.py37/lib/python3.7/site-packa
ges (from aiohttp) (3.0.4)
Collecting yarl<2.0,>=1.0 (from aiohttp)
Downloading https://files.pythonhosted.org/packages/fb/84/6d82f6be218c50b547aa29d0315e430cf8a23c52064c92d0a8377d7b7357/yarl-1.3.0.tar.gz (159kB)
100% |████████████████████████████████| 163kB 87.1MB/s
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-od3qiiy3/yarl/setup.py", line 102, in <module>
setup(**args)
File "/fast/src/mobitroll/merlin/tools/ws/.py37/lib/python3.7/site-packages/setuptools/__init__.py", line 142, i
n setup
_install_setup_requires(attrs)
File "/fast/src/mobitroll/merlin/tools/ws/.py37/lib/python3.7/site-packages/setuptools/__init__.py", line 131, i
n _install_setup_requires
(k, v) for k, v in attrs.items()
File "/fast/src/mobitroll/merlin/tools/ws/.py37/lib/python3.7/site-packages/setuptools/dist.py", line 442, in __
init__
k: v for k, v in attrs.items()
File "/usr/lib/python3.7/distutils/dist.py", line 292, in __init__
self.finalize_options()
File "/fast/src/mobitroll/merlin/tools/ws/.py37/lib/python3.7/site-packages/setuptools/dist.py", line 600, in fi
nalize_options
ep.require(installer=self.fetch_build_egg)
File "/fast/src/mobitroll/merlin/tools/ws/.py37/lib/python3.7/site-packages/pkg_resources/__init__.py", line 236
7, in require
reqs = self.dist.requires(self.extras)
File "/fast/src/mobitroll/merlin/tools/ws/.py37/lib/python3.7/site-packages/pkg_resources/__init__.py", line 263
5, in requires
dm = self._dep_map
File "/fast/src/mobitroll/merlin/tools/ws/.py37/lib/python3.7/site-packages/pkg_resources/__init__.py", line 269
1, in __getattr__
raise AttributeError(attr)
AttributeError: _dep_map
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-od3qiiy3/yarl/
I tried to look for documented issues in github for aiohttp and yarl but found nothing of sorts.
Also tried to install slightly older versions of yarl (1.0, 1.1, 1.2) but without much luck either.
Any idea what could be the cause of this error?
Upgrading setuptools with pip install -U setuptools fixed the issue.
Can anyone have a look what goes wrong with my pyinstaller?
I also tried to convert a .py file to .exe file, but the same error was generated
Update. 12/15. BTW, I have installed both python 2.7 and python 3 on my computer, would that be the problem?
However, I have tried install pyinstaller under C:\Python27\Scripts to try to avoid the conflict between 2 pythons. (I am not sure if this could still cause the problem but I just try to list all the details I know for the question.)
New update. 12/16. I have tried to move my target file (to convert) to the script folder, where pyinstaller is installed, the file will be converted successfully. But the script folder will be messed up because multiple folders and files will be generated.
I have added the problem that generated from cmd below :)
C:\Python27\Scripts>pip install pyinstaller
Collecting pyinstaller
Requirement already satisfied: pefile>=2017.8.1 in c:\python27\lib\site-packages (from pyinstaller) (2018.8.8)
Requirement already satisfied: pywin32-ctypes in c:\python27\lib\site-packages (from pyinstaller) (0.2.0)
Requirement already satisfied: setuptools in c:\python27\lib\site-packages (from pyinstaller) (28.8.0)
Requirement already satisfied: altgraph in c:\python27\lib\site-packages (from pyinstaller) (0.16.1)
Requirement already satisfied: macholib>=1.8 in c:\python27\lib\site-packages (from pyinstaller) (1.11)
Requirement already satisfied: dis3 in c:\python27\lib\site-packages (from pyinstaller) (0.1.2)
Requirement already satisfied: future in c:\python27\lib\site-packages (from pefile>=2017.8.1->pyinstaller) (0.17.1)
Installing collected packages: pyinstaller
Successfully installed pyinstaller-3.4
C:\Python27\Scripts>pyinstaller
Traceback (most recent call last):
File "c:\python27\lib\runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "c:\python27\lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "C:\Python27\Scripts\pyinstaller.exe\__main__.py", line 5, in <module>
File "c:\python27\lib\site-packages\PyInstaller\__init__.py", line 16, in <module>
from . import compat
File "c:\python27\lib\site-packages\PyInstaller\compat.py", line 212, in <module>
from win32ctypes.pywin32 import pywintypes # noqa: F401
File "c:\python27\lib\site-packages\win32ctypes\pywin32\__init__.py", line 11, in <module>
from win32ctypes.pywin32 import win32api
File "c:\python27\lib\site-packages\win32ctypes\pywin32\win32api.py", line 12, in <module>
from win32ctypes.core import (
File "c:\python27\lib\site-packages\win32ctypes\core\__init__.py", line 36, in load_module
module = importlib.import_module(self.redirect_module)
File "c:\python27\lib\importlib\__init__.py", line 37, in import_module
__import__(name)
File "c:\python27\lib\site-packages\win32ctypes\core\cffi\_dll.py", line 19, in <module>
""")
File "c:\python27\lib\site-packages\cffi\api.py", line 107, in cdef
self._parser.parse(csource, override=override, packed=packed)
File "c:\python27\lib\site-packages\cffi\cparser.py", line 167, in parse
self._internal_parse(csource)
File "c:\python27\lib\site-packages\cffi\cparser.py", line 173, in _internal_parse
ast, macros, csource = self._parse(csource)
File "c:\python27\lib\site-packages\cffi\cparser.py", line 130, in _parse
self.convert_pycparser_error(e, csource)
File "c:\python27\lib\site-packages\cffi\cparser.py", line 159, in convert_pycparser_error
raise api.CDefError(msg)
cffi.api.CDefError: cannot parse "HMODULE WINAPI LoadLibraryExW(LPCTSTR lpFileName, HANDLE hFile, DWORD dwFlags);"
:16:16: before: LoadLibraryExW
Try to upgrade the cffi by using below command:
pip install --upgrade cffi
This question already has answers here:
Error installing coremltools
(5 answers)
Closed 5 years ago.
I am trying to convert a caffe model to core ML model.
Please find the error while running pip install coremltools
Collecting coremltools
Using cached coremltools-0.4.0-py2.7-none-any.whl
Requirement already satisfied: numpy>=1.6.2 in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from coremltools)
Collecting protobuf>=3.1.0 (from coremltools)
Using cached protobuf-3.3.0.tar.gz
Collecting six>=1.9 (from protobuf>=3.1.0->coremltools)
Using cached six-1.10.0-py2.py3-none-any.whl
Requirement already satisfied: setuptools in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from protobuf>=3.1.0->coremltools)
Installing collected packages: six, protobuf, coremltools
Found existing installation: six 1.4.1
DEPRECATION: Uninstalling a distutils installed project (six) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
Uninstalling six-1.4.1:
Exception:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/commands/install.py", line 342, in run
prefix=options.prefix_path,
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_set.py", line 778, in install
requirement.uninstall(auto_confirm=True)
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_install.py", line 754, in uninstall
paths_to_remove.remove(auto_confirm)
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_uninstall.py", line 115, in remove
renames(path, new_path)
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/utils/__init__.py", line 267, in renames
shutil.move(old, new)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 302, in move
copy2(src, real_dst)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 131, in copy2
copystat(src, dst)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 103, in copystat
os.chflags(dst, st.st_flags)
OSError: [Errno 1] Operation not permitted: '/var/folders/5z/5hfw98ks677_r5rqm498kq1c0000gn/T/pip-DMhcCb-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info'
I am new to machine learning. Please suggest a solution
As error said - operation is not permitted. I'm Linux not Mac user - but it's probably because you try to do this without root privilages.
You can try sudo pip install coremltools. But generally speaking installing development libraries system-wide is not best practice.
You should definitely use virtualenv.
I've browsed around but couldn't find anyone else getting this error. I'm trying to make a TwitterBot but I am unable to install tweepy with the following command:
pip install tweepy
I've tried using sudo/su and a few other methods but this exception always pops up:
pip install tweepy
Collecting tweepy
Downloading tweepy-3.5.0-py2.py3-none-any.whl
Requirement already satisfied: requests>=2.4.3 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from tweepy)
Requirement already satisfied: requests-oauthlib>=0.4.1 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from tweepy)
Collecting six>=1.7.3 (from tweepy)
Downloading six-1.10.0-py2.py3-none-any.whl
Requirement already satisfied: oauthlib>=0.6.2 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from requests-oauthlib>=0.4.1->tweepy)
Installing collected packages: six, tweepy
Found existing installation: six 1.4.1
DEPRECATION: Uninstalling a distutils installed project (six) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
Uninstalling six-1.4.1:
Exception:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/commands/install.py", line 342, in run
prefix=options.prefix_path,
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/req/req_set.py", line 778, in install
requirement.uninstall(auto_confirm=True)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/req/req_install.py", line 754, in uninstall
paths_to_remove.remove(auto_confirm)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/req/req_uninstall.py", line 115, in remove
renames(path, new_path)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/utils/__init__.py", line 267, in renames
shutil.move(old, new)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 302, in move
copy2(src, real_dst)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 131, in copy2
copystat(src, dst)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 103, in copystat
os.chflags(dst, st.st_flags)
OSError: [Errno 1] Operation not permitted: '/tmp/pip-ACL5B3-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info'
I think that your problem is linked to six package.
Try to install tweepy running this command:
sudo pip install tweepy --ignore-installed six
or
pip install --ignore-installed six
You can find the six issue here.
Let me know.
The exception is for non root users.
Try,
sudo pip install tweepy
I am new to python and is using pip to download and install packages. I ran the following code on my command window and it throws an error
pip install matplotlib
And the process starts as
Collecting matplotlib
Using cached matplotlib-1.5.3-cp27-cp27m-win32.whl
Collecting numpy>=1.6 (from matplotlib)
Using cached numpy-1.11.2-cp27-none-win32.whl
Collecting python-dateutil (from matplotlib)
Using cached python_dateutil-2.5.3-py2.py3-none-any.whl
Collecting cycler (from matplotlib)
Using cached cycler-0.10.0-py2.py3-none-any.whl
Collecting pyparsing!=2.0.4,!=2.1.2,>=1.5.6 (from matplotlib)
Using cached pyparsing-2.1.10-py2.py3-none-any.whl
Collecting pytz (from matplotlib)
Using cached pytz-2016.7-py2.py3-none-any.whl
Collecting six>=1.5 (from python-dateutil->matplotlib)
Using cached six-1.10.0-py2.py3-none-any.whl
Installing collected packages: numpy, six, python-dateutil, cycler, pyparsing, pytz, matplotlib
Exception:
Traceback (most recent call last):
File "c:\python27\lib\site-packages\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "c:\python27\lib\site-packages\pip\commands\install.py", line 317, in run
prefix=options.prefix_path,
File "c:\python27\lib\site-packages\pip\req\req_set.py", line 742, in install
**kwargs
File "c:\python27\lib\site-packages\pip\req\req_install.py", line 831, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File "c:\python27\lib\site-packages\pip\req\req_install.py", line 1032, in move_wheel_files
isolated=self.isolated,
File "c:\python27\lib\site-packages\pip\wheel.py", line 346, in move_wheel_files
clobber(source, lib_dir, True)
File "c:\python27\lib\site-packages\pip\wheel.py", line 324, in clobber
shutil.copyfile(srcfile, destfile)
File "c:\python27\lib\shutil.py", line 83, in copyfile
with open(dst, 'wb') as fdst:
IOError: [Errno 13] Permission denied: 'c:\\python27\\Lib\\site-packages\\numpy\\core\\multiarray.pyd'
And it gives these traceback errors. I'm unable to figure out what these errors are and how to solve them. Please help. It works perfectly till collecting the packages but at the time of installing it throws errors.
If you're using Windows, the easiest way to install many of the numerically-oriented Python packages is to download one of wheels containing pre-compiled binaries from http://www.lfd.uci.edu/~gohlke/pythonlibs/, and install using pip:
pip install SomePackage-1.0-py2.py3-none-any.whl
Make sure to download the right wheel version (Python2 or Python3, 32 bit or 64 bit) for your Python installation.
Try python -m pip install matplotlib.
or
Open the cmd as administrator
then python -m pip install matplotlib