DEV Community

Fred Reck
Fred Reck

Posted on

3 2

VSCode autocomplete on private package import do not working

Vscode autocomplete do not working when i import my private package from git and shows this message error on code line: Unable to import 'elixir_tools' pylint(import-error)

my setup.py structure:

from setuptools import setup

setup(
    name='elixir_tools',
    url='***',
    author='Elixir AI',
    author_email='***',
    packages=[
        'elixir_tools',
        'elixir_tools.executors',
        'elixir_tools.models',
        'elixir_tools.transforms',
        'elixir_tools.utils'
    ],
    install_requires=[
        'pandas',
        'numpy',
        'datetime',
        'xlrd',
        'psycopg2-binary',
        'flask_bcrypt',
        'flake8',
        'bayesian-optimization',
        'scikit-learn',
        'python-dateutil',
        'xgboost',
        'croston'
    ],
    version='0.1',
    license='MIT',
)

Enter fullscreen mode Exit fullscreen mode

any suggestion?

Top comments (3)

Collapse
 
freddsr profile image
Fred Reck • Edited

Thanks for your response! I tried your first suggestion, but to no avail, the pip show elixir_tools command shows information about the package, including the path. Attaching the package path with sys.path.append to the code is also unsuccessful. I installed elixir_tools from a gitlab repository with pip install and the code works, but vscode does not autocomplete and shows this error message. Look:

 
freddsr profile image
Fred Reck

That worked, thank you very much!

Thread Thread
 
christophergaudig profile image
christophergaudig

what worked? I have the same problem with gsfpy_09

thanks!

Eliminate Context Switching and Maximize Productivity

Pieces.app

Pieces Copilot is your personalized workflow assistant, working alongside your favorite apps. Ask questions about entire repositories, generate contextualized code, save and reuse useful snippets, and streamline your development process.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay