Monday, April 18, 2022

[SOLVED] Python problem with extensions in virtual enviroment

Issue

I am using python 3.7.5 version, however I downloaded 3.6 version for specific project and created virtual enviroment, installed required extensions (numpy, matplotlib...). However when I try to run python script, there comes a lot of errors related to extensions. The code worked flawlessly with 3.7 version of python. Any thoughts what can be wrong?

File "c:/Users/zabul/OneDrive/Desktop/pyCode/Data_observation.py", line 4, in <module>
import pandas as pd
File "C:\Users\zabul\OneDrive\Desktop\pyCode\.virtenv\lib\site-packages\pandas\__init__.py", 
line 55, in <module>
from pandas.core.api import (
File "C:\Users\zabul\OneDrive\Desktop\pyCode\.virtenv\lib\site-packages\pandas\core\api.py", 
line 24, in <module>
from pandas.core.groupby import Grouper, NamedAgg
File "C:\Users\zabul\OneDrive\Desktop\pyCode\.virtenv\lib\site- 
packages\pandas\core\groupby\__init__.py", line 1, in <module>
from pandas.core.groupby.generic import (  # noqa: F401
File "C:\Users\zabul\OneDrive\Desktop\pyCode\.virtenv\lib\site- 
packages\pandas\core\groupby\generic.py", line 44, in <module>
from pandas.core.frame import DataFrame
File "C:\Users\zabul\OneDrive\Desktop\pyCode\.virtenv\lib\site-packages\pandas\core\frame.py", 
line 115, in <module>
from pandas.core.series import Series
File "C:\Users\zabul\OneDrive\Desktop\pyCode\.virtenv\lib\site- 
packages\pandas\core\series.py", line 84, in <module>
import pandas.plotting
File "C:\Users\zabul\OneDrive\Desktop\pyCode\.virtenv\lib\site- 
packages\pandas\plotting\__init__.py", line 59, in <module>
from pandas.plotting._core import (
File "C:\Users\zabul\OneDrive\Desktop\pyCode\.virtenv\lib\site- 
packages\pandas\plotting\_core.py", line 17, in <module>
import pandas.plotting._matplotlib  # noqa
File "C:\Users\zabul\OneDrive\Desktop\pyCode\.virtenv\lib\site- 
packages\pandas\plotting\_matplotlib\__init__.py", line 3, in <module>
from pandas.plotting._matplotlib.boxplot import (
File "C:\Users\zabul\OneDrive\Desktop\pyCode\.virtenv\lib\site- 
packages\pandas\plotting\_matplotlib\boxplot.py", line 4, in <module>
from matplotlib.artist import setp
File "C:\Users\zabul\OneDrive\Desktop\pyCode\.virtenv\lib\site- 
packages\matplotlib\__init__.py", line 128, in <module>
from matplotlib.rcsetup import defaultParams, validate_backend, cycler
File "C:\Users\zabul\OneDrive\Desktop\pyCode\.virtenv\lib\site- 
packages\matplotlib\rcsetup.py", line 29, in <module>
from matplotlib.fontconfig_pattern import parse_fontconfig_pattern
File "C:\Users\zabul\OneDrive\Desktop\pyCode\.virtenv\lib\site- 
packages\matplotlib\fontconfig_pattern.py", line 26, in <module>
from pyparsing import (Literal, ZeroOrMore, Optional, Regex, StringEnd,
File "C:\Users\zabul\OneDrive\Desktop\pyCode\.virtenv\lib\site- 
packages\pyparsing\__init__.py", line 130, in <module>
__version__ = __version_info__.__version__
AttributeError: 'version_info' object has no attribute '__version__'

Solution

This subject unknown version in python library pyparsing is the same as this one. Your error seems to be on pyparsing.



Answered By - Maxime Challon
Answer Checked By - Candace Johnson (WPSolving Volunteer)