robocorp / rcc

Repeatable, movable and isolated Python environments for your automation. 🚀
https://robocorp.com/docs/
Apache License 2.0
453 stars 92 forks source link

pandas and sqlalchemy not recognised in Visual studio #52

Closed robottester-sketch closed 1 year ago

robottester-sketch commented 1 year ago

I installed all robot libraries including pandas and sqlalchemy and I am using Visual Studio, it was working fine until yesterday and now I cannot fix the issue, I tried re-installing all libraries but should I update something in Visual Studio? I get Module not found error. But when executed from command prompt the test works fine, its only through VS it does not work

Environment: Windows

Tried Python : Select Interpreter option too but does not fix the issue

Libraries Package Version

attrs 23.1.0 beautifulsoup4 4.12.2 cached-property 1.5.2 certifi 2023.7.22 cffi 1.15.1 chardet 3.0.4 charset-normalizer 3.2.0 click 8.1.6 colorama 0.4.6 comtypes 1.2.0 convertdate 2.4.0 cryptography 41.0.2 cx-Oracle 8.3.0 decorator 5.1.1 defusedxml 0.7.1 dnspython 2.4.1 docutils 0.20.1 et-xmlfile 1.1.0 exceptiongroup 1.1.2 exchangelib 4.9.0 fire 0.4.0 fonttools 4.41.1 fpdf2 2.7.4 furl 2.1.3 graphviz 0.13.2 greenlet 2.0.2 h11 0.14.0 hijri-converter 2.3.1 holidays 0.21.13 htmldocx 0.0.6 hubspot-api-client 4.0.6 idna 3.4 importlib-metadata 4.13.0 isodate 0.6.1 java-access-bridge-wrapper 0.14.1 jsonpath-ng 1.5.3 jsonschema 4.18.4 jsonschema-specifications 2023.7.1 korean-lunar-calendar 0.3.1 lxml 4.9.3 mss 6.1.0 mysqlclient 2.2.0 natsort 8.4.0 netsuitesdk 1.24.0 notifiers 1.3.3 numpy 1.25.2 O365 2.0.26 oauthlib 3.2.2 openpyxl 3.1.2 orderedmultidict 1.0.1 outcome 1.2.0 packaging 23.1 pandas 2.0.3 pdfminer.six 20221105 pendulum 2.1.2 Pillow 9.5.0 pip 23.2.1 platformdirs 3.10.0 ply 3.11 psutil 5.9.5 pycparser 2.21 Pygments 2.15.1 PyJWT 2.8.0 PyMeeus 0.5.12 pynput-robocorp-fork 5.0.0 pyotp 2.9.0 pypdf 3.14.0 pyperclip 1.8.2 PySocks 1.7.1 pyspnego 0.9.1 python-dateutil 2.8.2 python-docx 0.8.11 python-dotenv 1.0.0 pytz 2023.3 pytz-deprecation-shim 0.1.0.post0 pytzdata 2020.1 pywin32 303 pywinauto 0.6.8 PyYAML 6.0.1 referencing 0.30.0 requests 2.31.0 requests-file 1.5.1 requests-ntlm 1.2.0 requests-oauthlib 1.3.1 requests-toolbelt 1.0.0 robocorp-storage 0.3.2 robotframework 5.0.1 robotframework-databaselibrary 1.3.1 robotframework-excellib 2.0.1 robotframework-oracledb 2.0.2 robotframework-pabot 2.16.0 robotframework-pythonlibcore 4.2.0 robotframework-requests 0.9.5 robotframework-sapguilibrary 1.1 robotframework-seleniumlibrary 6.1.0 robotframework-seleniumtestability 2.1.0 robotframework-stacktrace 0.4.1 rpaframework 24.1.2 rpaframework-core 11.0.5 rpaframework-pdf 7.1.5 rpaframework-windows 7.3.2 rpds-py 0.9.2 selenium 4.9.1 setuptools 65.5.0 simple-salesforce 1.12.4 six 1.16.0 smartsheet-python-sdk 3.0.2 sniffio 1.3.0 sortedcontainers 2.4.0 soupsieve 2.4.1 SQLAlchemy 1.4.47 sqlparse 0.4.4 stringcase 1.2.0 tenacity 8.2.2 termcolor 2.3.0 trio 0.22.2 trio-websocket 0.10.3 tweepy 3.10.0 tzdata 2023.3 tzlocal 4.3.1 uiautomation 2.0.18 urllib3 2.0.4 validators 0.20.0 webdriver-manager 3.9.1 wrapt 1.15.0 wsproto 1.2.0 xlrd 2.0.1 XlsxWriter 3.1.2 xlutils 2.0.0 xlwt 1.3.0 zeep 4.2.1 zipp 3.16.2 image

image

vjmp commented 1 year ago

@robottester-sketch

First of all, please do not ask support issues here. Join Robocorp slack to ask support questions where more people can discuss and help on these kind of usage issues: https://robocorp-developers.slack.com/

Second, this repo is about rcc, not about Visual Studio. And documentation for VS Code and Robocorp tooling can be found at https://robocorp.com/docs/developer-tools/visual-studio-code

But as solution to your environment related question, few notes:

  1. for Robocorp tooling managed environments, add your dependencies to conda.yaml and do not install them manually (so sqlalchemy and pandas should go there)
  2. you don't need add selenium dependency, since it is already rpaframework dependency

So, you conda.yaml should be something like:

channels:
- conda-forge
dependencies:
- python=3.9.13
- pip=22.1.2
- pandas=2.0.3
- sqlalchemy=2.0.19
- pip:
  - rpaframework==24.1.2