WSL python3 ModuleNotFoundError: No module named xxx [closed] - python

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 5 years ago.
Improve this question
I am using python 3.6.2 on WSL (Windows Linux subsystem) and trying to set tensorflow environment (and installing some other libraries as well). However, i always get an error when I exit and login again:
ModuleNotFoundError: No module named 'tensorflow'
So I have to reinstall the libraries again and the problem will be fixed until I logout again. This problem only happens with my python3. I also tried python3 and use import tensorflow to find the library, but it also returned the same error.
I think the problem may be related with system path because python cannot find the library in its original searching directory. when i enter sys.path it returns:
['', '/home/jeoker/anaconda3/lib/python36.zip', '/home/jeoker/anaconda3/lib/python3.6', '/home/jeoker/anaconda3/lib/python3.6/lib-dynload', '/home/jeoker/anaconda3/lib/python3.6/site-packages']
But when I do conda list, the result always show the files in /home/jeoker/anaconda2. I tried sudo pip3 install tensorflow, but it gived me this: Requiement already satisfied. It seems that the path where the libraries are installed is not the same as where python is looking into.
Does anyone know how can I fix this problem? thanks in advance!!

Well, since no one is answering this question, I have to close the question. What I did to overcome the issue was just to uninstall the whole WSL and reinstall it.

Related

Have already set PYTHONPATH, but why it cant able to import my custom modules in Python? [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 1 year ago.
Improve this question
The following is my 'env' in my mac via Terminal
And I have already add my workspace path with PYTHONPATH in file ~/.bash_profile like below:
Since I want to import some custom functions which written by myself, here is the custom function bath:
/Users/LSH/WSFG_DEV/workspace/ws_functions (But I think it's better to include the whole workspace)
So weird that although it says no module named 'ws_functions', but the VSC still can address my custom functions (etc: send_IFTTT_notice_rich / send_IFTTT_notice_simple...)
May I know what kind of things I am still missing?
Update # 25 July :
So weird that I cant even print the PYTHONPATH with os module...
You're not running in a bash login shell, so ~/.bash_profile doesn't do anything. In fact, you're not even using bash, so ~/.bash_profile doesn't do anything. Try setting PYTHONPATH in ~/.zshrc.

All ways getting AttributeError while installing CSV module [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 2 years ago.
Improve this question
enter code here[how to to install the module][1]
I cannot able to install this CSV module
[1]:https://i.stack.imgur.com/WQndX.jpg
csv is a default module in python3. But if there is an error in importing the module, there could have been an error while downloading python (that is if you aren't using python on cmd and on a text editor). I recommend you reinstall the editor. And also could you please tell if you are able to install any other packages/modules via pip? Because if you cannot install modules via pip, there definitely was some kind of an error while downloading pip too.

Atom: Can't search for Packages or Themes in the Install Packages section of Settings [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 2 years ago.
Improve this question
I'm new to Atom (and relatively new to programming) and I just installed it about a few hours ago. I was trying to set it up by installing some new packages and themes in the Install Packages section of Settings. It was working fine for a while but now I'm getting errors when I try to search. A red box appears below the search field with this error:
Searching for “pre” failed.Hide output…
i.filter is not a function
[object Object]
I'm on Windows 10 with Atom 1.49.0 x64 installed. Python 3.8 is also installed with the path set. It seems to run code fine. I even found a theme on the Atom website and was able to install from there, I just can't search. I feel like I messed something up.
I've searched Google, Stack Overflow, and the discussion section for Atom and I'm finding nothing that fixes this issue. I've restarted my computer and uninstalled/reinstalled Atom. I will say that after I reinstalled Atom, it still had all my setting changes I had made and it had all the packages that I had already installed still there. So maybe the uninstall didn't remove those with the program. But I wouldn't know where to go to clear that.
Any help would be appreciated. Thanks!
Atom Server seems to have a problem today.
Packages that were installed well a few days ago are not available today.

OpenCV Can't Find cv2.Face in init.py to assign Recognizer [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 3 years ago.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Improve this question
I'm trying to follow a recent Python OpenCV tutorial and it's not finding the .face class. I've tried everything on StackOverflow. Before marking this as a duplicate, please see what I've already tried.
I've tried to pip install opencv-contrib-python and all the other cv2. classes work except cv2.face is not recognized. I've installed and uninstalled opencv-python and opencv-contrib-python and restarted my computer. I also tried to use this link about using the CMake gui but I have no idea what I'm doing and I get an error when I try to do it. https://github.com/opencv/opencv_contrib
import cv2
recognizer = cv2.face_lbphfacerecognizer.create()
My PyCharm errors before I've even finished typing face and the error pops up immediately. Cannot find reference 'face' in init_.py
Unresolved reference "cv2" inside cv2 (cv2.cv2)
According to these answers, this is a bug in pycharm.
You can find the answer here or just ignore the "error" and do without autocompletion.

VS 2017 Preview Python Package Import Issues [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 5 years ago.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Improve this question
I have an custom conda environment set up in VS2017 Preview for some ML packages I want to run against each other in a single env (CNTK, Tensorflow, ... ect). When importing the modules from a Interactive Window in VS there is no problem, but when I try to attach a debugger and run I seem to get import errors. Is there some custom search path I need to add or some command to "activate" the conda env within my script aside from setting it as the active environment in my solution?
]2
Edit: Figured out my issue, I had to set the solution working directory to the location of my virtual env, oops ><, anyway that seems to clear up import errors
Figured out my issue, I had to set the solution working directory to the location of my virtual env, oops ><, anyway that seems to clear up import errors

Categories

Resources