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

ImportError: No module named cv2 #43

Closed
cyberfunk opened this issue Mar 25, 2019 · 1 comment
Closed

ImportError: No module named cv2 #43

cyberfunk opened this issue Mar 25, 2019 · 1 comment

Comments

@cyberfunk
Copy link

cyberfunk commented Mar 25, 2019

Hello,
I followed the various steps and installed all of the dependancies. When I run the test code I get: ImportError: No module named cv2

cv2 is located at: /usr/local/lib/python3.7/site-packages/cv2

I have a file called .bash_profile located at /Users/MyUserName/.bash_profile which I added this line to: export PATH="/usr/local/opt/python/libexec/bin:$PATH"

Also I get an error after installing PsyTorch and running the first line of their test code to verify correct install: from future import print_function

That test fails with error: from: can't read /var/mail/future

I have no idea what's going on with this as it's my first time trying to run ESRGAN

I used Homebrew to install Python 3 then used the pip3 command to install the required dependencies. I did not use Anaconda as I've never used that before but have used Homebrew many times in the past on other projects.

Any help is much appreciated:-)

@cyberfunk
Copy link
Author

UPDATE: I solved my own issue. I needed to clear my bash_profile and add the following text:

alias python='python3'
PYTHONPATH="${PYTHONPATH}:/usr/local/lib/python3.7/site-packages/"
export PYTHONPATH

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

1 participant