Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to import modules #7

Closed
s-ff opened this issue Mar 19, 2019 · 5 comments
Closed

Unable to import modules #7

s-ff opened this issue Mar 19, 2019 · 5 comments

Comments

@s-ff
Copy link

s-ff commented Mar 19, 2019

After successfully installing all the requirements, I am not able to run the script ./main.py:

Traceback (most recent call last):
File "./main.py", line 3, in
from youtube import Youtube
File "/home/fariss/smd/youtube.py", line 13, in
from moviepy.editor import *
File "/home/fariss/.local/lib/python3.6/site-packages/moviepy/editor.py", line 23, in
import imageio
File "/home/fariss/.local/lib/python3.6/site-packages/imageio/init.py", line 22, in
from .core import FormatManager, RETURN_BYTES
File "/home/fariss/.local/lib/python3.6/site-packages/imageio/core/init.py", line 10, in
from .util import Image, Array, Dict, asarray, image_as_uint, urlopen
File "/home/fariss/.local/lib/python3.6/site-packages/imageio/core/util.py", line 27, in
import numpy as np
File "/home/fariss/.local/lib/python3.6/site-packages/numpy/init.py", line 142, in
from . import core
File "/home/fariss/.local/lib/python3.6/site-packages/numpy/core/init.py", line 91, in
raise ImportError(msg.format(path))
ImportError: Something is wrong with the numpy installation. While importing we detected an older version of numpy in ['/home/fariss/.local/lib/python3.6/site-packages/numpy']. One method of fixing this is to repeatedly uninstall numpy until none is found, then reinstall this version.

I also don't know what packages to install manually.

@kaletaa
Copy link

kaletaa commented Mar 24, 2019

Have you tried uninstalling all numpy instances like the error says?

@s-ff
Copy link
Author

s-ff commented Mar 24, 2019

Hi @kaletaa,
I did just that. It got rid of the numpy error. However, I am still not able to run the script, here's the output:

fariss@fariss:~$ ./main.py
Traceback (most recent call last):
  File "./main.py", line 3, in <module>
    from youtube import Youtube
  File "/home/fariss/smd/youtube.py", line 13, in <module>
    from moviepy.editor import *
  File "/home/fariss/.local/lib/python3.6/site-packages/moviepy/editor.py", line 26, in <module>
    imageio.plugins.ffmpeg.download()
  File "/home/fariss/.local/lib/python3.6/site-packages/imageio/plugins/ffmpeg.py", line 79, in download
    get_remote_file(fname=fname, directory=directory, force_download=force_download)
  File "/home/fariss/.local/lib/python3.6/site-packages/imageio/core/fetching.py", line 130, in get_remote_file
    _fetch_file(url, filename)
  File "/home/fariss/.local/lib/python3.6/site-packages/imageio/core/fetching.py", line 189, in _fetch_file
    % os.path.basename(file_name)
OSError: Unable to download 'ffmpeg-linux64-v3.3.1'. Perhaps there is a no internet connection? If there is, please report this problem.

So, I tried installing 'ffmpeg-linux64-v3.3.1' manually, and I am getting this:

fariss@fariss:~$ python3
Python 3.6.7 (default, Oct 22 2018, 11:32:17) 
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import imageio
>>> imageio.plugins.ffmpeg.download()
Imageio: 'ffmpeg-linux64-v3.3.1' was not found on your computer; downloading it now.
Try 1. Download from https://github.com/imageio/imageio-binaries/raw/master/ffmpeg/ffmpeg-linux64-v3.3.1 (43.8 MB)
Downloading: 23339008/45929032 bytes (50.8%)Error while fetching file: The read operation timed out.
Try 2. Download from https://github.com/imageio/imageio-binaries/raw/master/ffmpeg/ffmpeg-linux64-v3.3.1 (43.8 MB)
Downloading: 7340032/45929032 bytes (16.0%)Error while fetching file: The read operation timed out.
Try 3. Download from https://github.com/imageio/imageio-binaries/raw/master/ffmpeg/ffmpeg-linux64-v3.3.1 (43.8 MB)
Downloading: 3907584/45929032 bytes (8.5%)Error while fetching file: The read operation timed out.
Try 4. Download from https://github.com/imageio/imageio-binaries/raw/master/ffmpeg/ffmpeg-linux64-v3.3.1 (43.8 MB)
Downloading: 1032192/45929032 bytes (2.2%)Error while fetching file: The read operation timed out.
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/fariss/.local/lib/python3.6/site-packages/imageio/plugins/ffmpeg.py", line 79, in download
    get_remote_file(fname=fname, directory=directory, force_download=force_download)
  File "/home/fariss/.local/lib/python3.6/site-packages/imageio/core/fetching.py", line 130, in get_remote_file
    _fetch_file(url, filename)
  File "/home/fariss/.local/lib/python3.6/site-packages/imageio/core/fetching.py", line 189, in _fetch_file
    % os.path.basename(file_name)
OSError: Unable to download 'ffmpeg-linux64-v3.3.1'. Perhaps there is a no internet connection? If there is, please report this problem.
>>> 
>>> imageio.plugins.ffmpeg.download()
Imageio: 'ffmpeg-linux64-v3.3.1' was not found on your computer; downloading it now.
Try 1. Download from https://github.com/imageio/imageio-binaries/raw/master/ffmpeg/ffmpeg-linux64-v3.3.1 (43.8 MB)
Downloading: 25337856/45929032 bytes (55.2%)Error while fetching file: The read operation timed out.
Try 2. Download from https://github.com/imageio/imageio-binaries/raw/master/ffmpeg/ffmpeg-linux64-v3.3.1 (43.8 MB)
Downloading: 17154048/45929032 bytes (37.3%)Error while fetching file: The read operation timed out.
Try 3. Download from https://github.com/imageio/imageio-binaries/raw/master/ffmpeg/ffmpeg-linux64-v3.3.1 (43.8 MB)
Downloading: 32776192/45929032 bytes (71.4%)Error while fetching file: The read operation timed out.
Try 4. Download from https://github.com/imageio/imageio-binaries/raw/master/ffmpeg/ffmpeg-linux64-v3.3.1 (43.8 MB)
Downloading: 4505600/45929032 bytes (9.8%)Error while fetching file: The read operation timed out.
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/fariss/.local/lib/python3.6/site-packages/imageio/plugins/ffmpeg.py", line 79, in download
    get_remote_file(fname=fname, directory=directory, force_download=force_download)
  File "/home/fariss/.local/lib/python3.6/site-packages/imageio/core/fetching.py", line 130, in get_remote_file
    _fetch_file(url, filename)
  File "/home/fariss/.local/lib/python3.6/site-packages/imageio/core/fetching.py", line 189, in _fetch_file
    % os.path.basename(file_name)
OSError: Unable to download 'ffmpeg-linux64-v3.3.1'. Perhaps there is a no internet connection? If there is, please report this problem.

@kaletaa
Copy link

kaletaa commented Mar 25, 2019

It can't see the ffmpeg binary, yeah. I'm trying to fix this bug too, I've opened another issue in this repo about it ( #8 )

Edit: I see that you are trying to install it from the REPL, can you try manually getting the binary from that github link and see if it works that way?

@s-ff
Copy link
Author

s-ff commented Mar 29, 2019

Problem fixed. Thanks.

@s-ff s-ff changed the title Not able to import modules Unable to import modules Mar 29, 2019
@s-ff
Copy link
Author

s-ff commented Mar 30, 2019

Closed issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants