I am trying to execute the code in this GitHub repository. I get the following error:
Traceback (most recent call last):
File "/home/bellman/Documents/face/MaskFaceGAN/main.py", line 7, in <module>
from trainer import Trainer
File "/home/bellman/Documents/face/MaskFaceGAN/trainer.py", line 7, in <module>
from model_module import batch_mse_loss
File "/home/bellman/Documents/face/MaskFaceGAN/model_module.py", line 6, in <module>
from models import BranchedTiny, FaceParser, Generator
File "/home/bellman/Documents/face/MaskFaceGAN/models/__init__.py", line 2, in <module>
from .face_parser import FaceParser
File "/home/bellman/Documents/face/MaskFaceGAN/models/face_parser/__init__.py", line 1, in <module>
from .face_parser import FaceParser
File "/home/bellman/Documents/face/MaskFaceGAN/models/face_parser/face_parser.py", line 7, in <module>
from torchvision.models.segmentation.segmentation import deeplabv3_resnet50
ModuleNotFoundError: No module named 'torchvision.models.segmentation.segmentation'
I checked the directory: anaconda3/envs/mfg/lib/python3.10/site-packages/torchvision/models/segmentation and actually didn't find any segmentation.py file.
conda list gives:
Please help!
Related
i tried to use odoo 13 src with python 3.7.4 on windows 8, i configured pycharm
script path : D:\odoo_13_projects\odoo13\odoo-bin
parameters : -r odoo -w odoo --db_host=localhost --addons-path=D:\odoo_13_projects\odoo13\addons
and i installed python requirements but always odoo didn't work
Traceback (most recent call last):
File "C:\Users\Pc\AppData\Local\Programs\Python\Python37\lib\site-packages\werkzeug\serving.py", line 56, in <module>
from http.server import BaseHTTPRequestHandler
File "C:\Users\Pc\AppData\Local\Programs\Python\Python37\lib\http\server.py", line 92, in <module>
import email.utils
File "C:\Users\Pc\AppData\Local\Programs\Python\Python37\lib\email\utils.py", line 33, in <module>
from email._parseaddr import quote
File "C:\Users\Pc\AppData\Local\Programs\Python\Python37\lib\email\_parseaddr.py", line 16, in <module>
import time, calendar
File "D:\odoo_13_projects\odoo13\addons\calendar\__init__.py", line 4, in <module>
from . import controllers
File "D:\odoo_13_projects\odoo13\addons\calendar\controllers\__init__.py", line 4, in <module>
from . import main
File "D:\odoo_13_projects\odoo13\addons\calendar\controllers\main.py", line 6, in <module>
from odoo.api import Environment
File "D:\odoo_13_projects\odoo13\odoo\api.py", line 29, in <module>
from .tools.translate import _
File "D:\odoo_13_projects\odoo13\odoo\tools\translate.py", line 21, in <module>
from babel.messages import extract
File "C:\Users\Pc\AppData\Local\Programs\Python\Python37\lib\site-packages\babel\messages\__init__.py", line 12, in <module>
from babel.messages.catalog import *
File "C:\Users\Pc\AppData\Local\Programs\Python\Python37\lib\site-packages\babel\messages\catalog.py", line 15, in <module>
from cgi import parse_header
File "C:\Users\Pc\AppData\Local\Programs\Python\Python37\lib\cgi.py", line 39, in <module>
from email.parser import FeedParser
File "C:\Users\Pc\AppData\Local\Programs\Python\Python37\lib\email\parser.py", line 12, in <module>
from email.feedparser import FeedParser, BytesFeedParser
File "C:\Users\Pc\AppData\Local\Programs\Python\Python37\lib\email\feedparser.py", line 27, in <module>
from email._policybase import compat32
File "C:\Users\Pc\AppData\Local\Programs\Python\Python37\lib\email\_policybase.py", line 9, in <module>
from email.utils import _has_surrogates
ImportError: cannot import name '_has_surrogates' from 'email.utils' (C:\Users\Pc\AppData\Local\Programs\Python\Python37\lib\email\utils.py)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:/odoo_13_projects/odoo13/odoo-bin", line 5, in <module>
import odoo
File "D:\odoo_13_projects\odoo13\odoo\__init__.py", line 113, in <module>
from . import modules
File "D:\odoo_13_projects\odoo13\odoo\modules\__init__.py", line 8, in <module>
from . import db, graph, loading, migration, module, registry
File "D:\odoo_13_projects\odoo13\odoo\modules\graph.py", line 10, in <module>
import odoo.tools as tools
File "D:\odoo_13_projects\odoo13\odoo\tools\__init__.py", line 10, in <module>
from .misc import *
File "D:\odoo_13_projects\odoo13\odoo\tools\misc.py", line 29, in <module>
import werkzeug.utils
File "C:\Users\Pc\AppData\Local\Programs\Python\Python37\lib\site-packages\werkzeug\__init__.py", line 218, in <module>
from .serving import run_simple
File "C:\Users\Pc\AppData\Local\Programs\Python\Python37\lib\site-packages\werkzeug\serving.py", line 59, in <module>
import SocketServer as socketserver
ModuleNotFoundError: No module named 'SocketServer'
can any one help me please
Can you use python3.6?
because I am already using odoo 13 with python3.6 and I can't see any problem.
I think in your case there will be library mismatch for SocketServer because in python3.7 package name is socketserver.
I found the solution, I use two versions of python so I have to uncheck add content roots to PYTHONPATH and add source roots to PYTHONPATH in pycharm. Thank you guys
Do not use virtual interpreter pythons
that is okey
check this configuration
enter image description here
import seaborn
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\HP\Anaconda3\lib\site-packages\seaborn\__init__.py", line 6, in <module>
from .rcmod import *
File "C:\Users\HP\Anaconda3\lib\site-packages\seaborn\rcmod.py", line 5, in <module>
from . import palettes, _orig_rc_params
File "C:\Users\HP\Anaconda3\lib\site-packages\seaborn\palettes.py", line 12, in <module>
from .utils import desaturate, set_hls_values, get_color_cycle
File "C:\Users\HP\Anaconda3\lib\site-packages\seaborn\utils.py", line 7, in <module>
from scipy import stats
File "C:\Users\HP\Anaconda3\lib\site-packages\scipy\stats\__init__.py", line 345, in <module>
from .morestats import *
File "C:\Users\HP\Anaconda3\lib\site-packages\scipy\stats\morestats.py", line 12, in <module>
from numpy.testing.decorators import setastest
ModuleNotFoundError: No module named 'numpy.testing.decorators'
Welcome to Stackoverflow and Happy New Year!
I think you haven't installed numpy.testing.decorators.
Run pip install numpy and retry.
While importing xarray following error was observed. Earlier it was running fine. Does anyone have any suggestions for why?
import xarray as xr
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/jives/anaconda3/lib/python3.7/site-packages/xarray/__init__.py", line 4, in <module>
from .core.dataset import Dataset
File "/home/jives/anaconda3/lib/python3.7/site-packages/xarray/core/dataset.py", line 16, in <module>
from .. import conventions
File "/home/jives/anaconda3/lib/python3.7/site-packages/xarray/conventions.py", line 9, in <module>
from pandas.tslib import OutOfBoundsDatetime
ModuleNotFoundError: No module named 'pandas.tslib'
I'm trying to run script like https://github.com/InstaPy/instapy-quickstart/blob/master/quickstart_templates/good_commenting_strategy_and_new_qs_system.py
on my new raspbery pi 4 B 2Gb but I get a mistake, which I do not know how to solve.
I want It to work normally but instead I get this
Traceback (most recent call last):
File "/home/pi/Desktop/Sakura/Bot/daprostitnasbog.py", line 1, in <module>
from instapy import InstaPy
File "/home/pi/.local/lib/python3.7/site-packages/instapy /__init__.py", line 6, in <module>
from .instapy import InstaPy
File "/home/pi/.local/lib/python3.7/site-packages/instapy/instapy.py", line 28, in <module>
from .clarifai_util import check_image
File "/home/pi/.local/lib/python3.7/site-packages/instapy/clarifai_util.py", line 3, in <module>
from clarifai.rest import ClarifaiApp
File "/home/pi/.local/lib/python3.7/site-packages/clarifai/rest/__init__.py", line 3, in <module>
from clarifai.rest.client import ApiClient
File "/home/pi/.local/lib/python3.7/site-packages/clarifai/rest/client.py", line 36, in <module>
from clarifai.rest.grpc.proto.clarifai.api.endpoint_pb2_grpc import V2Stub
File "/home/pi/.local/lib/python3.7/site-packages/clarifai/rest/grpc/proto/clarifai/api/endpoint_pb2_grpc.py", line 2, in <module>
import grpc
File "/home/pi/.local/lib/python3.7/site-packages/grpc/__init__.py", line 23, in <module>
from grpc._cython import cygrpc as _cygrpc
ImportError: /home/pi/.local/lib/python3.7/site-packages/grpc/_cython/cygrpc.cpython-37m-arm-linux-gnueabihf.so: undefined symbol: __atomic_exchange_8
Try this:
pip3 install 'grpcio==1.23.0' --force-reinstall
Every time I try to install any package using pip3 this error comes.
And when I open python3 in terminal and try to import string module the same error comes. I am not able to figure out any solution for it. My OS version is Ubuntu 16.04.
Traceback (most recent call last):
File "/usr/bin/pip3", line 9, in <module>
from pip import main
File "/usr/lib/python3/dist-packages/pip/__init__.py", line 5, in <module>
import logging
File "/usr/lib/python3.5/logging/__init__.py", line 28, in <module>
from string import Template
ImportError: No module named 'string'
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 21, in <module>
from urllib.request import urlopen
File "/usr/lib/python3.5/urllib/request.py", line 88, in <module>
import http.client
File "/usr/lib/python3.5/http/client.py", line 71, in <module>
import email.parser
File "/usr/lib/python3.5/email/parser.py", line 12, in <module>
from email.feedparser import FeedParser, BytesFeedParser
File "/usr/lib/python3.5/email/feedparser.py", line 27, in <module>
from email import message
File "/usr/lib/python3.5/email/message.py", line 16, in <module>
from email import utils
File "/usr/lib/python3.5/email/utils.py", line 40, in <module>
from email.charset import Charset
File "/usr/lib/python3.5/email/charset.py", line 15, in <module>
import email.quoprimime
File "/usr/lib/python3.5/email/quoprimime.py", line 44, in <module>
from string import ascii_letters, digits, hexdigits
ImportError: No module named 'string'
Original exception was:
Traceback (most recent call last):
File "/usr/bin/pip3", line 9, in <module>
from pip import main
File "/usr/lib/python3/dist-packages/pip/__init__.py", line 5, in <module>
import logging
File "/usr/lib/python3.5/logging/__init__.py", line 28, in <module>
from string import Template
ImportError: No module named 'string'
The problem solved since my python 3.5 directory was missing string.py file.