I have been struggling with upgrading my version of scipy from 0.13.0b1 to 0.16.0. I downloaded 0.16.0 and after much failure, realized that my python program was looking in the wrong place and finding the old version but not the new one. I modified the sys.path to include the location of the new scipy download, but this still didn't work.
So, I have tried to remove the old version of scipy from the directory holding it and copy in the new version of scipy (I could not simply remove this directory from the sys.path due to other dependancies). However, when I run the relevant command
sudo cp -R scipy/ /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python
nothing happens. There is no error message, but the new scipy does not go into the directory. Does anyone know why this is, or have an alternate solution to upgrading my scipy?
Related
Apologies if this is a duplicate post, I've looked around and can't figure out why my issue isn't being solved by other answers I've found. Using Anaconda, python 3.9, Windows 10.
I'm trying to run a setup.py script that includes "from Cython.Build import cythonize". When I run setup.py I get the "ImportError: No module named Cython.Build"
I have tried installing with pip, upgrading cython with pip and pip3, upgrading pip and trying again, installing/updating with conda, and I still am getting the error. When I check the cython version (cython -V) I can see that I have Cython version 0.29.28.
I'm assuming and hoping this is an obvious question/answer to someone out there. Apologies again if this is a redundant post, I'm still fairly new and just recently switched to windows/python from mac/matlab.
I also keep coming across a solution to install the Microsoft Visual C++ Build Tools? That doesn't really make sense to me as a solution, but I tried it. It was an 8GB commitment which seems kind of ridiculous.
first time on stack overflow. Basically pip is installing packages and Jupyter notebook can't find them to import. I've searched other similar questions and found some tips, but none of them have worked in my particular instance. I've shown the information that was helpful in other posts so you can see what I' mworking with:
My Notebook
In similar questions they've asked what "jupyter kernelspec list" returns in the terminal, so I've inlcuded that here:
KernelSpec Results
I would include my kernel.json file as well, but I tried changing with it, and upon seeing no change, tried deleting it altogether and my notebook runs fine.
So I'm thoroughly confused, and could really use some help.
Thankyou
Make sure the packages you think you installed are really installed to the running environment.
E.g. from inside notebook run:
!pip list | grep package_name
If the package in question is installed, get details using [pip show][1]
!pip show pyyaml
Name: PyYAML
Version: 5.1
Summary: YAML parser and emitter for Python
Home-page: https://github.com/yaml/pyyaml
Author: Kirill Simonov
Author-email: xi#resolvent.net
License: MIT
Location: /home/ntg/anaconda3/lib/python3.7/site-packages
Requires:
Required-by: bokeh, anaconda-client
Remember that for some libraries the import is not the name of the module,e.g. to install pyyaml I did pip install pyyaml, but to import it I will need import yaml... When in doubt, google the specific module.
Keep in mind that pip deals with modules (think libraries such as pandas).
If you cannot find some of your code, make sure it is in the directory you think it is, if not in the same directory, make sure the other directory has a file named init.py to denote the dir is a module, and possibly check
Cannot import from __init__ in a subfolder
I'm trying to add a module to my PYTHONPATH permanently, I know this could sound like a duplicated question, but I tried all the solution that i could find.
what I want to do is:
add PyLit module (https://github.com/gmilde/PyLit) to my PYTHONPATH permanently.
the instructions to install it are:
Install
As PyLit is a pure Python module, installation is straightforward: Put pylit.py in Python's Module Search Path.
I need this module to be added permanently. I tried:
adding it in my .bash_profile in my $PATH
creating in my .bash_profile a $PYTHONPATH new var
adding it to my: /Library/Python/2.7/site-packages
tried using Anaconda (and pip)
I'm a newbie with Python, but I have given a look at the module I want to add, and the structure seems weerd, usually I use a setup.py file but it is missing.
python setup.py install
I hope someone can help me out...
Thanks
I just solved my issue... There were conflicts between ma python versions. I basically removed python 2.7 and reinstalled it.
Then I tried again with the pip approach and, after rebooting my mac book pro, everything worked just fine.
I am on windows 64bit, I have installed anaconda, and managed to create an environment with python 2.7
I have numpy, pylearn2, theano, and every package is built properly
I have been able to import all these modules, however I get some very esoteric messages when I try to complete the model, like
ImportError: Could not import pylearn2.models.softmax_regression but could import pylearn2.models. Original exception: No module named dnn
Then I tried to actually find the package in the installation, but inside the cuda folder, there is no module named dnn. Looking at github, I see that it should be there.
Why is theano missing modules? I installed using conda install theano, and it gave some suggestions, I have managed to pick the correct one.
I have uninstalled and installed theano many time, I can import it but I can never get the proper modules.
What is going wrong?
Ok, after a few days of search, it seems like Theano installed from anaconda is missing a lot of modules. However, installing theano by cloning the repository with
pip install --upgrade --no-deps git+git://github.com/Theano/Theano.git
seems to resolve the issue. Since windows normally does not have git, it can be easily installed (seems to take care of the environment's path variable) from here
https://git-scm.com/download/win
I have been having a heck of a time trying to install Pyramid on my Python 3.3 Windows 7 x64 machine. I have done the following from scratch with no luck. I have double checked all of my install files:
Install python 3.3
Install Python for Windows extensions
Install Distribute 0.6.34 (latest)
easy_install Virtualenv
Activated my new virtualenv
easy_install pyramid
I followed Pyramid's install guide here while substituting Python32 for Python33:
easy_install pyramid finishes and puts the following egg files in my venv\liv\site-packages folder:
mako-0.7.3-py3.3.egg
pastedeploy-1.5.0-py3.3.egg
pyramid-1.4-py3.3.egg
repoze.lru-0.6-py3.3.egg
translationstring-1.1-py3.3.egg
venusian-1.0a7-py3.3.egg
webob-1.2.3-py3.3.egg
zope.deprecation-4.0.2-py3.3.egg
zope.interface-4.0.3-py3.3-win-amd64.egg
However the actual folders are still in the egg folders and not have been copied to the site-packages folder. Should they be? Seems like an incomplete installation to me because the code can't even see the import modules from those egg folders.
I try to run this test code and I get import errors.
As a test, I moved all the folders in the egg folders up one level so they are now in the site-packages folder. I run the test code and I get different import errors. In fact, I have done this whole install process at least 10 times today from scratch. The import errors can be different. It's almost like the pyramid install is getting corrupted or incomplete. However, the install always finishes with no errors.
Any ideas what is going on?
I've used pip for python and everything went fine, all dependencies were installed and
import pyramid
did not throw any error afterwards.
Have a look at http://pastebin.com/bdv1SK7k.
Note: to install pip you need to, ironically, call easy_install pip