cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2312
Views
1
Helpful
1
Replies

How do I install the Cobra module into PyCharm venv?

jbekk
Level 1
Level 1

G'day,

I am starting to use the PyCharm IDE from Windows. It currently has a venv setup for Python2.7 and works fine for ACI Toolkit/etc (using Windows BTW). I was hoping to have a go at interacting with ACI using Cobra from the PyCharm venv .

As Cobra isn't an official python app it doesn't show in the standard Python repositories and I can't import into the venv as a result. I can see that the .egg files are hosted on the APIC address (https://[IP]/cobra/_downloads/) and I've been able to install cobra into my native python environment but not into PyCharm.

I am guessing that I will have to run up my own HTTP repository server to make this work? Is there any way to interact with the venv directly outside of PyCharm and install the modules that way?

Bit new at this, hoping there's an easy way to fix this without too much messing about. I'd prefer to work on python files within the IDE and its associated venvs. I am guessing I could somehow link PyCharm into the native python environment instead of the venv one (if that's possible). Looking for some general guru advice here... still have my training wheels on.

1 Accepted Solution

Accepted Solutions

jbekk
Level 1
Level 1

I figured it out. Essentially PyCharm builds a folder for the project, within which is the venv folder... which is much like the local Python environment. Browse to the scripts folder, run easy_install <cobra.egg> for the files specific to your APIC and you're sorted.

View solution in original post

1 Reply 1

jbekk
Level 1
Level 1

I figured it out. Essentially PyCharm builds a folder for the project, within which is the venv folder... which is much like the local Python environment. Browse to the scripts folder, run easy_install <cobra.egg> for the files specific to your APIC and you're sorted.