From the start of using pycharm i am facing problems with working with libraries
I tried reinstalling python, pip, pycharm; adding and readding to path. I also tried using pipenv instead of virtenv.. and it worked once, but.. now again-
i use $pip install numpy |as example| in cmd window it says to be successfully installed. Go to pycharm, type 'import numpy'.. and nothing happens. I know i can download manually: go to settings and so on.. but it would be much beter if pip installed with cmd would be instantly displayed in Pycharm. Anybody, please, help.
Check if you have activated the virtual environment in which you have installed the packages. For instance you may have installed the package on Global python version and running your program on a virtual environment which will not work. So maybe try activating your virtual environment before installing the Packages.
Step 1:-
activate {name_of_pipenv}
pip install numpy
Related
I have downloaded anaconda and always used Jupiter Notebook, and Spyder with no problem. Now I need to run some code on my computer's python shell (I don't know if this is the appropriate name, I am quite new to coding) but when trying to import numpy I get:
ModuleNotFoundError: No module named 'numpy'
I have tried everything whit pip but is not resolving the problem, it actually shows a syntax error. Should I try to uninstall and install everything? I don't really know how to move, thanks a lot in advance.
When you start a new terminal instance the base conda environment is not activated, so when you do python, the interpreter that is called is not Anaconda's Python, it is most likely the system-wide Python installation.
So to access Anaconda's Python from the terminal:
conda activate to activate the base conda environment
which python should show the path to the Anaconda interpreter
python
Interactive shell:
import numpy
Anaconda is a virtual environment for python. It does not install packages globaly. I strongly recomend reading about VENV (virtual enviroment).
You can install does packages globally, by pip:
pip install numpy
or for python3:
pip3 install numpy
I am fairly new to using virtual environments for python projects but I have spent many hours trying to resolve this issue I've been having through various posts on this site and on others and have come up short. I have even resorted to uninstalling all python distributions and reinstalling with no luck.
I have the anaconda distribution of python installed on Windows 10. I have the problem that after I create a virtual environment, called venv, in a project folder I am unable to then activate this virtual environment using the anaconda prompt to install packages through pip. What I have done so far is as follows:
(base) C:\Users\[User]\Documents\GitHub\[project_folder]> virtualenv venv
This then successfully creates a virtual environment folder in my project folder called venv. Working in this directory I navigate to:
(base) venv> cd Scripts
(base) venv\Scripts> activate
There are a number of activate files to choose from and neither turns the environment from base to env as expected.
The reason I am using anaconda prompt as opposed to the standard command prompt or Windows PowerShell is because when I'm using the pip install <package> anywhere but in the anaconda prompt I get an error message that reads:
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
I'm not sure what this means and have tried to do some googling to solve this issue but to no avail. Note I do not have this issue when working on python projects on my MacBook and I can easily enter virtual environments and install the packages there with no issues. I'm relatively new to Windows so perhaps I'm missing something here...?
An interesting observation is that I can enter any virtual environment I've created through Windows PowerShell but I encounter the pip problem described above when trying to install packages into this environment.
I'm desperate for some help resolving this issue as it's greatly hindering the work on all my projects, and unfortunately I cannot just use my MacBook to code either.
use those command for python virtualenv
For activate
WINDOWS: activate nameofvenv
LINUX, macOS: source activate nameofvenv
For deactivate
WINDOWS: deactivate
macOS, LINUX: source deactivate
I tried created a project with virtualenv setting in pycharm. I see pip is missing in the virtual env that was created by pycharm. Could someone help me with fix it.
My python version is python3.6.5 and pycharm 2018.1
When I created a virtualenv from terminal it does create a pip ad works fine. I'm assuming thats something to do with pycharm setting that I'm missing
To install pip, download this script and run it with python.
https://bootstrap.pypa.io/get-pip.py
If pip still doesn't show up, it is likely an environment variable issue.
I had to download my python version from 3.5 to 3.4 because one of the packages I needed wasn't supported in 3.5. I downgraded the python version using the conda command prompt, and everything worked fine - got my package to install with all its dependencies and no conflicts. But now when I try to open Juypter notebook or Spyder, nothing happens. My IPython works just fine. I'm thinking maybe i have to downgrade Juypter and Spyder, but I'm not sure. Anyone have any ideas?
After a day of searching I finally figured it out.
I initially used
conda install python=3.4
Bad idea - ended up having to do a fresh install of anaconda to get spyder and juypter working again.
What ended up working is creating a separate environment.
conda create -n py34 python=3.4 anaconda
activate py34
... then install packages ...
This added spyder(py34), juypter(py34), and all its "py34 brothers and sisters" to my start menu. Using these new shortcuts/environment, I now have access to the packages I need by choosing the appropriate short cut. Yes, my start menu has extra python shortcuts now, but whatever - it works.
Just make sure Make sure you install the packages you're looking for before you close the anaconda console. Perfect for installing theano dependencies mingw and libpython.
I have installed Anaconda and currently using Spyder IDE.
I am trying to install a package (IbPy -> https://github.com/blampe/IbPy) so that it can be used in Spyder.
So far I tried pip install ibpy, as well as conda install ibpy, but without success since the package is not available in the anaconda repository where I would normally update and download the most common packages.
I have also tried to move the folder downloaded from GitHub to the correct site-packages folder of Anaconda (C:\Users\Username\Anaconda2\Lib\site-packages), but still it does not work.
I also tried to run the setup.py (shift + right click on the folder, open new process here, Setup.py install), but without any success.
I tried to look for a solution everywhere, but I have had no luck so far.
If someone more tech savvy than me and practical with these specific could help, it would be highly appreciated.
You need to install it from github. Use the following.
pip install https://github.com/blampe/IbPy/zipball/master
You need to do a open terminal from the Anaconda Navigator and run the command:
conda install -c tibkiss ibpy2