Page 1 of 1

Can't access package outside virtual environment from inside of virtual environment

Posted: Wed Jul 10, 2019 5:39 am
by Bicky
Some days ago i installed opencv in my raspberry pi in a virtual environment then some days later i installed tensor flow outside of the virtual environment.
Now i am stuck because tensor flow only works outside of the environment and open cv only inside virtual environment.What should i do?😭😭😭

Re: Can't access package outside virtual environment from inside of virtual environment

Posted: Wed Jul 10, 2019 1:58 pm
by topguy
Can't access package outside virtual environment from inside of virtual environment
I think this is basically the definition of a virtual environment...
tensor flow only works outside of the environment and open cv only inside virtual environment
What is the basis for using the work "only" ? Is there some special verison of OpenCV that cant be installed directly on Raspbian ?
Are there two wildly different versions of Python used ?

Re: Can't access package outside virtual environment from inside of virtual environment

Posted: Wed Jul 10, 2019 2:50 pm
by DirkS
Which virtual environment software do you use?

I use virtualenv and it has the option to use globally installed modules.
Can't remember the exact option though.

I wouldn't be surprised if other packages offer the same functionality

Re: Can't access package outside virtual environment from inside of virtual environment

Posted: Wed Jul 10, 2019 2:59 pm
by Bicky
Actually i mistakenly forgot to activate the virtual environment for tensor flow installation.
Do i have to do everything all over again in virtual environment ?
The tutorial i've been following is [/url] https://github.com/EdjeElectronics/Tens ... spberry-Pi [url]

Re: Can't access package outside virtual environment from inside of virtual environment

Posted: Thu Jul 11, 2019 2:35 am
by blimpyway
yes you activate your target environment and run again

Code: Select all

sudo pip3 install /home/pi/tf/tensorflow-1.8.0-cp35-none-linux_armv7l.whl
and whatever other pip install packages are mentioned