Forums

Installing textract with dependencies...

Hi, I was trying to install texract package for python using pip install --user textract.

Both pip2.7 and pip3.6 are failing to do so.

Is there any chance this package with dependencies could be installed?

Thanks.

Hmm, it looks like it depends on pulseaudio, which is an operating system package. We can install that, but unfortunately it will need a new system image, which won't be coming very soon -- at least a month away :-(

Thanks for replying. Then I will wait I guess :)

Hello, its been 6 months passed and still cant get install textract package which depends on pulseAudio

still no update I'm afraid. We've got a bunch of infrastructure and regulatory issues to work through for now, unfortunately.

Hi all, I 've created a new virtual environment for my project and installed flask successfully, however when I tried to install dlib library I got this error:

Command "/usr/local/bin/python3.6 -u -c "import setuptools, tokenize;file='/tmp/pip-build-a15ynvwq/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 /tmp/pip-6rkf9b5_-record/ins tall-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-a15ynvwq/dlib/

Is there a way I can install dlib using bash console? Thanks you

That doesn't look like a very useful error message. Perhaps there's something more useful in the files mentioned, or perhaps the dlib developers may be able to help.

Hi Glenn, Could you please help to find a dlib developer who may help me in this matter!!! Thank you

I would suggest getting help from sites such as codementor.

Hi Conrad, can I install dlib in my account using bash console? I mean does pythonanywhere support dlib library for python? I tried it before but no luck and I got this message as I said before: pip install dlib Command "/usr/local/bin/python3.6 -u -c "import setuptools, tokenize;file='/tmp/pip-build-a15ynvwq/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 /tmp/pip-6rkf9b5_-record/ins tall-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-a15ynvwq/dlib/

Many thanks

just to clarify- dlib seems like a c++ library? I assume you are trying to install it with the python API bindings as detailed here.

Following their instructions, I get this error:

running install
running build
running build_py
package init file 'dlib/__init__.py' not found (or not a regular file)
running build_ext
error: [Errno 38] Function not implemented

That sounds like this is something wrong with their library? What happens if you try to do the same on a local machine?

I also checked and PythonAnywhere should already have build-essential cmake libgtk-3-dev and libboost-all-dev installed. I'm not sure if there are any other prerequisites.

I have only tried this for python3.6- which they may not support. Feel free to try other versions of python as well.

Hi Conrad, Thank you for your kind response - I 've already installed dlib on my pc using anaconda and it works fine. Yesterday I tried to install cmake in my account using bash console, but I got this error: permission denied. How can I get around this problem?

Any help would be really appreciated.

make sure you are have the correct prefix/destination directory configured.

I still think you probably won't be able to make directly from master (but maybe from an older release/tag- check what version your local machine dlib-py is)

Thanks, you're very helpful. Just to update you that I 've installed cmake on my account using python 2.7 instead of 3.6.

Great! Keep us posted :D

H i Conrad, I deleted my flask app and when I created a new one I got this error:

Could not open PYTHONSTARTUP IOError: [Errno 2] No such file or directory: '/home/mylash/.pythonstartup.py'

How can I resolve this error, please.

It sounds like you accidentally deleted your .pythonstartup file when you deleted the Flask app. You can just create a new one from the "Files" page inside PythonAnywhere -- add the following code to it to get the default PythonAnywhere setup:

import rlcompleter
import readline
readline.parse_and_bind("tab: complete")

Thank you.

One more question please, I created a web app using manual configuration and created a virtualenv in my home directory. I imported cv2 (opencv) python from the console in dashboard and it worked fine. However, when I tried to import cv2 in my flask_app.py file, I received an error saying: 'ModuleNotFoundError: No module named 'cv2'' Any idea how to bind my web app files to the the created virtualenv? Thank you.

How are you running your flask_app.py file? Is it from a bash console? Or is it from the file editor? If it is the former (bash console), make sure that your virtualenv is activated- you can also get a console with your virtualenv activated from the webapps tab where you had configured your virtualenv.

If it is the latter (file editor), then see this and configure it for your virtualenv python.

Thank you.

No problem -- let us know if you have any issues.

Hi Everyone, Just a quick question, how do I make sure that my flask_app.py is using python, packages from my virtualenv, and not from system.

Thank you.

Configure it on the web app tab.

Thank you.

Hi there When I run my flask web app I got this error: "Error running WSGI application ImportError: No module named main_flask_app_file File "/var/www/mylash_pythonanywhere_com_wsgi.py", line 118, in <module> from main_flask_app_file import app as application"

I deleted my app and create a new one but I also got the same error! Please advice what to do to get around this problem - Thank you.

I see you cross-posted this to another thread so I'll answer it there.

Thanks.