Error in pip install datefinder - python

While I was trying to pip install python package "datefinder", I met the error about regex and visual c++. I have viewed lots of Stackoverflow posts and cannot find a solution yet. One post is similar but got no reply. Any comment is appreciated!
C:\Users\sheldonc\Downloads>pip install datefinder-0.6.1-py2.py3-none-any.whl
Processing c:\users\sheldonc\downloads\datefinder-0.6.1-py2.py3-none-any.whl
Requirement already satisfied: python-dateutil>=2.4.2 in c:\users\sheldonc\appdata\local\programs\python\python36-32\lib\site-packages (from datefinder==0.6.1)
Collecting regex==2016.01.10 (from datefinder==0.6.1)
Using cached regex-2016.01.10.tar.gz
Requirement already satisfied: pytz in c:\users\sheldonc\appdata\local\programs\python\python36-32\lib\site-packages (from datefinder==0.6.1)
Requirement already satisfied: six>=1.5 in c:\users\sheldonc\appdata\local\programs\python\python36-32\lib\site-packages (from python-dateutil>=2.4.2->datefinder==0.6.1)
Installing collected packages: regex, datefinder
Running setup.py install for regex ... error
Complete output from command c:\users\sheldonc\appdata\local\programs\python\python36-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\sheldonc\\AppData\\Local\\Temp\\pip-build-iv39m2te\\regex\\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\sheldonc\AppData\Local\Temp\pip-ht1mrgoz-record\install-record.txt --single-version-externally-managed --compile:
c:\users\sheldonc\appdata\local\programs\python\python36-32\lib\site-packages\setuptools\dist.py:334: UserWarning: Normalizing '2016.01.10' to '2016.1.10'
normalized_version,
running install
running build
running build_py
creating build
creating build\lib.win32-3.6
copying Python3\regex.py -> build\lib.win32-3.6
copying Python3\_regex_core.py -> build\lib.win32-3.6
copying Python3\test_regex.py -> build\lib.win32-3.6
running build_ext
building '_regex' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
----------------------------------------
Command "c:\users\sheldonc\appdata\local\programs\python\python36-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\sheldonc\\AppData\\Local\\Temp\\pip-build-iv39m2te\\regex\\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\sheldonc\AppData\Local\Temp\pip-ht1mrgoz-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\sheldonc\AppData\Local\Temp\pip-build-iv39m2te\regex\

There is hardcoded value of regex version in setup.py. You need to download source code from https://github.com/akoumjian/datefinder and change regex version from regex==2016.01.10 to regex>=2016.01.10 or your latest. e.g.:
line 85: install_requires=['regex>=2016.01.10', 'python-dateutil>=2.4.2', 'pytz'],
Then install with
pip install ./path_to_datefinder_source

Related

I get an error when trying to install PyAudio

When I try to install PyAudio in CMD with py -m pip install PyAudio I get this:
Collecting PyAudio
Using cached https://files.pythonhosted.org/packages/ab/42/b4f04721c5c5bfc196ce156b3c768998ef8c0ae3654ed29ea5020c749a6b/PyAudio-0.2.11.tar.gz
Installing collected packages: PyAudio
Running setup.py install for PyAudio ... error
Complete output from command C:\Users\jiney\AppData\Local\Programs\Python\Python37-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\jiney\\AppData\\Local\\Temp\\pip-install-h8j63lfi\\PyAudio\\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\jiney\AppData\Local\Temp\pip-record-eik80aaq\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win32-3.7
copying src\pyaudio.py -> build\lib.win32-3.7
running build_ext
building '_portaudio' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
----------------------------------------
Command "C:\Users\jiney\AppData\Local\Programs\Python\Python37-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\jiney\\AppData\\Local\\Temp\\pip-install-h8j63lfi\\PyAudio\\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\jiney\AppData\Local\Temp\pip-record-eik80aaq\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\jiney\AppData\Local\Temp\pip-install-h8j63lfi\PyAudio\
I am extremely confused here and I really don't know what to do, when I use the same method using py -m install (package) it works but just not with PyAudio.
Any replies are appreciated, thanks!
It appears you need to install Microsoft Visual C++ as per this line in the error message:
Microsoft Visual C++ 14.0 is required.
Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/

Issues during installation of python jnius library. (dependencies?)

I would like to install jnius library for python using pip. I'm getting an error during installation. Here is what happend:
C:\Users\Janka\AppData\Local\Programs\Python\Python35-32>python.exe -m pip
install jnius
Collecting jnius
Using cached https://files.pythonhosted.org/packages/45/f5/5673f3906a9e8ca68cb7bc2d9a1eaa944c321271c4af621dbb51c13d385a/jnius-1.1.0.tar.gz
Requirement already satisfied: six>=1.7.0 in
c:\users\janka\appdata\local\programs\python\python35-32\lib\site-packages
(from jnius) (1.11.0)
Requirement already satisfied: cython in
c:\users\janka\appdata\local\programs\python\python35-32\lib\site-packages
(from jnius) (0.28.3)
Building wheels for collected packages: jnius
The first error I can't solve:
possibly, I do not have setup.py file. Can I install it somehow through pip? or what should I do? maybee I do have It, if so, where can I find it or how do I check it?
Running setup.py bdist_wheel for jnius ... error
Complete output from command
C:\Users\Janka\AppData\Local\Programs\Python\Python35-32\python.exe -u -c
"import setuptools,
tokenize;__file__='C:\\Users\\Janka\\AppData\\Local\\Temp\\pip-install-
pnoxk945\\jnius\\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 C:\Users\Janka\AppData\Local\Temp\pip-
wheel-ngvrr7r6 --python-tag cp35:
WARNING: Not able to assign machine() = AMD64 to a cpu value!
(Well, windows did not give up :D)
Using cpu = 'i386' instead!
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win32-3.5
copying jnius_config.py -> build\lib.win32-3.5
creating build\lib.win32-3.5\jnius
copying jnius\reflect.py -> build\lib.win32-3.5\jnius
copying jnius\signatures.py -> build\lib.win32-3.5\jnius
copying jnius\__init__.py -> build\lib.win32-3.5\jnius
running build_ext
cythoning jnius\jnius.pyx to jnius\jnius.c
building 'jnius' extension
Well, I need Microsoft Visual C++ 14.0, I tried the suggested link, but the web page says "expired account"
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual
C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
----------------------------------------
Failed building wheel for jnius
Running setup.py clean for jnius
Failed to build jnius
Installing collected packages: jnius
and again, the setup.py file..
Running setup.py install for jnius ... error
Complete output from command
C:\Users\Janka\AppData\Local\Programs\Python\Python35-32\python.exe -u -c
"import setuptools,
tokenize;__file__='C:\\Users\\Janka\\AppData\\Local\\Temp\\pip-install-
pnoxk945\\jnius\\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\Janka\AppData\Local\Temp\pip-
record-rdnylq3b\install-record.txt --single-version-externally-managed --
compile:
WARNING: Not able to assign machine() = AMD64 to a cpu value!
Using cpu = 'i386' instead!
running install
running build
running build_py
creating build
creating build\lib.win32-3.5
copying jnius_config.py -> build\lib.win32-3.5
creating build\lib.win32-3.5\jnius
copying jnius\reflect.py -> build\lib.win32-3.5\jnius
copying jnius\signatures.py -> build\lib.win32-3.5\jnius
copying jnius\__init__.py -> build\lib.win32-3.5\jnius
running build_ext
skipping 'jnius\jnius.c' Cython extension (up-to-date)
building 'jnius' extension
error: Microsoft Visual C++ 14.0 is required - again, where can I get it? / how do I install it?
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual
C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
----------------------------------------
Command "C:\Users\Janka\AppData\Local\Programs\Python\Python35-32\python.exe
-u -c "import setuptools,
tokenize;__file__='C:\\Users\\Janka\\AppData\\Local\\Temp\\pip-install-
pnoxk945\\jnius\\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\Janka\AppData\Local\Temp\pip-
record-rdnylq3b\install-record.txt --single-version-externally-managed --
compile" failed with error code 1 in C:\Users\Janka\AppData\Local\Temp\pip-
install-pnoxk945\jnius\
C:\Users\Janka\AppData\Local\Programs\Python\Python35-32>
(I am using windows 10)
You need to install Visual Studio 2015. During install tick the box for Languages--> C++.
Also you may need to set your environment variable
GYP_MSVS_VERSION = 2015
Alternatively you could download the C++ compiler for Python 2.7 here
https://www.microsoft.com/en-us/download/details.aspx?id=44266
More details on the installation can be found here
https://pyjnius.readthedocs.io/en/latest/installation.html#installation-for-windows

pip install pyemd error?

I'm trying to install pyemd package in Python through pip and getting following error:
C:\Users\dipanwita.neogy>pip install pyemd
Collecting pyemd
Using cached pyemd-0.4.3.tar.gz
Requirement already satisfied: numpy<2.0.0,>=1.9.0 in c:\users\dipanwita.neogy\a
naconda3\lib\site-packages (from pyemd)
Building wheels for collected packages: pyemd
Running setup.py bdist_wheel for pyemd ... error
Complete output from command C:\Users\dipanwita.neogy\Anaconda3\python.exe -u
-c "import setuptools, tokenize;__file__='C:\\Users\\DIPANW~1.NEO\\AppData\\Loca
l\\Temp\\pip-build-nk13uh5b\\pyemd\\setup.py';f=getattr(tokenize, 'open', open)(
__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __fil
e__, 'exec'))" bdist_wheel -d C:\Users\DIPANW~1.NEO\AppData\Local\Temp\tmpngn2np
rmpip-wheel- --python-tag cp36:
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win32-3.6
creating build\lib.win32-3.6\pyemd
copying pyemd\__about__.py -> build\lib.win32-3.6\pyemd
copying pyemd\__init__.py -> build\lib.win32-3.6\pyemd
running build_ext
building 'pyemd.emd' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C+
+ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
----------------------------------------
Failed building wheel for pyemd
Running setup.py clean for pyemd
Failed to build pyemd
Installing collected packages: pyemd
Running setup.py install for pyemd ... error
Complete output from command C:\Users\dipanwita.neogy\Anaconda3\python.exe -
u -c "import setuptools, tokenize;__file__='C:\\Users\\DIPANW~1.NEO\\AppData\\Lo
cal\\Temp\\pip-build-nk13uh5b\\pyemd\\setup.py';f=getattr(tokenize, 'open', open
)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __f
ile__, 'exec'))" install --record C:\Users\DIPANW~1.NEO\AppData\Local\Temp\pip-e
rihhtfj-record\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win32-3.6
creating build\lib.win32-3.6\pyemd
copying pyemd\__about__.py -> build\lib.win32-3.6\pyemd
copying pyemd\__init__.py -> build\lib.win32-3.6\pyemd
running build_ext
building 'pyemd.emd' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual
C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
----------------------------------------
Command "C:\Users\dipanwita.neogy\Anaconda3\python.exe -u -c "import setuptools,
tokenize;__file__='C:\\Users\\DIPANW~1.NEO\\AppData\\Local\\Temp\\pip-build-nk1
3uh5b\\pyemd\\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\DIPANW~1.NEO\AppData\Local\Temp\pip-erihhtfj-record\install-r
ecord.txt --single-version-externally-managed --compile" failed with error code
1 in C:\Users\DIPANW~1.NEO\AppData\Local\Temp\pip-build-nk13uh5b\pyemd\
I cannot find anything regarding this error. Please suggest me what should I do?
The error you are receiving is: error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools. You need to read the error message carefully.
You just need to go to the link they have provided for you and follow the instructions: http://landinghub.visualstudio.com/visual-cpp-build-tools
Following below steps helped me overcome the error:
While installing the Visual Studio: Download Visual Studio
-> Desktop development with C++
-> Check C++/CLI support for v142 build tools (14.24)
Having the below dependency ready:
get Python --Version in CLI.
Download and install whl file from Twisted WHL file
pip install C:\"Twisted‑19.10.0‑cp36‑cp36m‑win_amd64.whl"
Finally Run:
pip install -v pyemd

"pip install" permission denied on Mac

I tried to install the base65536 module, by typing this into Terminal:
pip install base65536
Yet it produced this error:
Collecting base65536
Using cached base65536-0.1.1.tar.gz
Requirement already satisfied: six in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from base65536)
Installing collected packages: base65536
Running setup.py install for base65536 ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;file='/private/var/folders/2h/n5zk2_w50273k4hdxw8l05240000gn/T/pip-build-tl_DyR/base65536/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/2h/n5zk2_w50273k4hdxw8l05240000gn/T/pip-ZZqmm6-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib
creating build/lib/base65536
copying base65536/about.py -> build/lib/base65536
copying base65536/init.py -> build/lib/base65536
copying base65536/core.py -> build/lib/base65536
running install_lib
creating /Library/Python/2.7/site-packages/base65536
error: could not create '/Library/Python/2.7/site-packages/base65536': Permission denied
----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;file='/private/var/folders/2h/n5zk2_w50273k4hdxw8l05240000gn/T/pip-build-tl_DyR/base65536/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/2h/n5zk2_w50273k4hdxw8l05240000gn/T/pip-ZZqmm6-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/2h/n5zk2_w50273k4hdxw8l05240000gn/T/pip-build-tl_DyR/base65536/
How can I fix this?
Thats because you dont have admin permissions.
try this
sudo pip install base65536
When it says Permission Denied that means that you are not an administrator on your computer and therefore cannot do this. Try running as administrator. If you are using windows, right click on app and select 'Run as Administrator'. If you are using mac, and you are not the administrator on your computer, type su (Whatever the name of the admin. user is)
For example, su adminUsername
Then type
pip install base65536

Access denied message when tried to install python module

When i tried installing oauth module in python using pip
pip install oauth
I get this error
Downloading/unpacking oauth
Downloading oauth-1.0.1.tar.gz
Running setup.py (path:/tmp/pip_build_mounarajan/oauth/setup.py) egg_info for package oauth
Installing collected packages: oauth
Running setup.py install for oauth
error: could not create '/usr/local/lib/python2.7/dist- packages/oauth': Permission denied
Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_mounarajan/oauth/setup.py';exec(compile( getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-N_OqTH-record/install- record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/oauth
copying oauth/__init__.py -> build/lib.linux-x86_64-2.7/oauth
copying oauth/oauth.py -> build/lib.linux-x86_64-2.7/oauth
running install_lib
creating /usr/local/lib/python2.7/dist-packages/oauth
error: could not create '/usr/local/lib/python2.7/dist- packages/oauth': Permission denied
----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_mounarajan/oauth/setup.py';exec(compile( getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-N_OqTH-record/install- record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_mounarajan/oauth
Storing debug log for failure in /home/mounarajan/.pip/pip.log
How could i change the permissions for python directory?
Thid problem accours when i try to install any module using pip
You might want to use sudo for installing modules using pip.

Categories