I have been using InstaPy for a while now and yesterday just re-pulled the repository down. It looks like there were some changes with the libraries and now I can't get it to work anymore. The problem is trying to install [regex]. I've tried doing a fresh install and creating a new virtualenv, but nothing seems to work. I'm using Windows and Python 3.4.4. I also see "error: INCLUDE environment variable is empty". I am not sure what to do next. This is the error message that I get:
Collecting regex
Using cached https://files.pythonhosted.org/packages/16/07/ee3e02770ed456a088b90da7c9b1e9aa227e3c956d37b845cef2aab93764/regex-2018.11.22.tar.gz
Building wheels for collected packages: regex
Running setup.py bdist_wheel for regex ... error
Complete output from command C:\Users\ktarayao\Documents\Repos\InstaPy\venv2\Scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\Users\ktarayao\AppData\Local\Temp\pip-install-itlzveft\regex\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\ktarayao\AppData\Local\Temp\pip-wheel-rpmd5idv --python-tag cp34:
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.4
copying regex_3\regex.py -> build\lib.win-amd64-3.4
copying regex_3_regex_core.py -> build\lib.win-amd64-3.4
copying regex_3\test_regex.py -> build\lib.win-amd64-3.4
running build_ext
building '_regex' extension
error: INCLUDE environment variable is empty
Failed building wheel for regex
Running setup.py clean for regex
Failed to build regex
Installing collected packages: regex
Running setup.py install for regex ... error
Complete output from command C:\Users\ktarayao\Documents\Repos\InstaPy\venv2\Scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\Users\ktarayao\AppData\Local\Temp\pip-install-itlzveft\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\ktarayao\AppData\Local\Temp\pip-record-66d16d1i\install-record.txt --single-version-externally-managed --compile --install-headers C:\Users\ktarayao\Documents\Repos\InstaPy\venv2\include\site\python3.4\regex:
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.4
copying regex_3\regex.py -> build\lib.win-amd64-3.4
copying regex_3_regex_core.py -> build\lib.win-amd64-3.4
copying regex_3\test_regex.py -> build\lib.win-amd64-3.4
running build_ext
building '_regex' extension
error: INCLUDE environment variable is empty
----------------------------------------
Command "C:\Users\ktarayao\Documents\Repos\InstaPy\venv2\Scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\Users\ktarayao\AppData\Local\Temp\pip-install-itlzveft\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\ktarayao\AppData\Local\Temp\pip-record-66d16d1i\install-record.txt --single-version-externally-managed --compile --install-headers C:\Users\ktarayao\Documents\Repos\InstaPy\venv2\include\site\python3.4\regex" failed with error code 1 in C:\Users\ktarayao\AppData\Local\Temp\pip-install-itlzveft\regex\
I have the same problem. Have found any solution to your question?
Sorry, no. I haven't found a solution yet and I haven't heard anyone else responding to this thread :'(
Same issue :(
@uluQulu you had a solution for that on Discord, right?
Hey guys
Yes @TarekJ03
I shared the solution in _GitHub_ last year, and recently re-shared at _Discord_ for Marc,
People could easily find it if searched existing issues with the keywords of the issue they have.
Get the solution from #3481, in particular from https://github.com/timgrossmann/InstaPy/issues/3481#issuecomment-443598626.
@ktarayao @jrbadiabo @Sahil624
@ktarayao, I noticed that you have a _Windows_ box.
Although the solution in that thread targets _Mac OS X_, it's explaining the issue, as well, so that you can solve it yourselves for your OS.
Let's dive more into it,
pip is just a tool to install the packages for you.
If package is pure python, it does not need to build it.
But if it has e.g. some C extension, then it has to build it in order to install..
regex package has C code inside it that's why it has to be built.
Okay fine, why it can't build?
1-) pip gets packages from _PyPI_ [by default]
2-) regex package serves built binary wheels only for the Windows platform.
It means, if you have other platform, then you - _your computer_/_device_ has to build it from its source code.
In particular, it serves the built binary wheel distributions only for these python versions:
2.7
, 3.5
, 3.6
, 3.7
for both _Windows_ 32-bit and 64-bit versions.
Apparently, your python is 3.4
and that's why even though you have a _Windows_ OS, you - _your pip_ has to build the regex package from its source.
What you can do?
Thank you so much. This was very helpful. I didn't realize that it was because of the Python 3.4 version. Upgrading Python to the newest version fixed it for me. Thank you for the help!
im using ubuntu and done with this
If you are using Debian/Ubuntu+Python 3, you need to try this: $ sudo apt-get install python3-dev
For CentOS-7 users.
After a fresh install of a CentOS-7 1810 as virtual machine, I tried to install InstaPy in a virtualenv and got this error.
I fixed by installing python3-devel.x86_64
package.
Hope to help who are in my situation.
Bye.
yum remove python3-devel.i686
yum install python3-devel.x86_64
Most helpful comment
Thank you so much. This was very helpful. I didn't realize that it was because of the Python 3.4 version. Upgrading Python to the newest version fixed it for me. Thank you for the help!